OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> Cross-compile Libs, Libjpeg In Particular, problems with libtool
matthis
post Mar 14 2007, 07:35 PM
Post #1





Group: Members
Posts: 218
Joined: 12-February 06
From: Tokyo
Member No.: 9,124



Dear devs, I'd be happy if someone could give me a hand with this. I've spent too many hours without success and I'm starting to be depressed blink.gif

Here is my problem. I've been trying to cross-compile libjeg so that I can cross-compile programs that need it. I need shared libs to I configured with --enable-shared

When trying to make, it complained that it couldn't find libtool, so I copied it from /usr/bin/libtool to ./
Then it complained that libtool couldn't find the proper tags so I added --tag=$(CC), with $(CC) pointing to arm-linux-gcc

But then when making, towards the end it uses gcc instead of arm-linux-gcc, and /usr/bin/ld instead of arm-linux-ld although I specified LD=arm-linux-ld at configure.

So, how to use libtool correctly??

If no one knows whats going on, a tarball of cross-compiled libjpeg libs/headers would also make me happy smile.gif

Thanks!
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
uth
post Mar 15 2007, 10:18 AM
Post #2





Group: Members
Posts: 106
Joined: 27-February 06
Member No.: 9,243



Hi,

cross-compiling will give you major heartburn until you get all of your environment vars setup correctly

The sharp sdk comes with shell scripts that help do this, though I found some bugs in them.

Basically, I set my PATH variable to point to the directory containing the arm-linux-* and other arm tools, then source this when I want to cross-compile.

so if I type 'which gcc', it should show the one in the sharp sdk, not the one in /usr/bin.

I also created a directory /opt/sharplibs/arm, where I install my cross-compiled libs into (not sure if libjpeg is in there, it might be, I'll look tonight.)

But in short, though the apps are supposed to obey the CC and LD vars, it sounds like they are being ignored in your case, so setting your PATH should fix this

I'm not sure if you can use /usr/bin/libtool

I hope this helps, if it's confusing, I can send the script I source for cross-compiling
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th July 2014 - 09:15 PM