This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Installing glibc


On Mon, Feb 05, 2001 at 02:21:15PM +0000, James Inge wrote:
> The problem comes when I try to run the generated programs on the
> target, ARM box.  It currently has glibc 2.2.1 installed in /lib. 
> Wherever I try and put the new libraries, either 
>    a) Precompiled programs can't find their 2.1.2 libraries (causing the
> system to die)
>    b) New programs can't find the 2.2.1 libraries.
> or c) New programs can find the new libraries, but the library then
> looks for other libraries (eg ld-linux.so.2) in the path from the PC,
> not the ARM filesystem.
> 
> The things I really need to know are:
>    a) How to add 2.2.1 to the ARM box without crippling glibc 2.1.2
> programs.
>    b) How to cross compile programs on the PC that will find the
> libraries on the ARM.
> 
> Points to note are:
>    a) There are no native compilers, etc. on the ARM box.
>    b) glibc 2.1.2 won't compile on the PC (hence I'm using 2.2.1)
>    c) I can mount the ARM filesystem on the PC.

I have found that the loader will complain by default if an app is looking
for glibc 2.1 and all that's on the system is glibc 2.2. However, setting
LD_LIBRARY_PATH to /lib makes it magically work. Beats me as to why.

That's more of a hack than anything.

What I ended up doing is recompiling everything against glibc 2.2.1.

Also, as a warning, glibc 2.2.1 seems to embed the prefix into ld.so and
ldconfig. So if you compile it with the /usr/local/arm-linux prefix, ld.so
will look for it's ld.so.cache in /usr/local/arm-linux/etc/. So I've compiled
two versions of glibc 2.2.1; one for cross compiling on an Intel host, and
one for installing on the target platform.

Someone let me know if there's an easier way...

-Jon

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]