Installing glibc

James Inge
Tue Feb 6 08:02:00 GMT 2001

Thanks to everyone who gave me suggestions for cross-upgrading glibc. 
I've now solved the problem, here's a summary for those who are


How to cross compile glibc 2.2.1 on i586, and install it on a glibc
2.2.1 ARM box, without trashing either existing system, or having
"version GLIBC_2.2 not found" errors.


1) Configure glibc on the build system, with a prefix to match the local
file system, eg --prefix=/usr/local/arm-linux
2) Cross compile and install (make; make install).  This installs the
ARM libraries and binaries on the PC, in directories lib, bin, sbin
under the prefix entered above.
3) Reconfigure glibc with --prefix=/
4) Do "make", but not "make install", or you could wreck the libraries
on the machine you're building on.
5) Mount the target machine's filesystem on the build system, and
manually copy the libraries into /lib and executables into
/usr/local/bin and /usr/local/sbin , renaming as appropriate.  I wrote a
script to do this - if you want a copy it's at
6) Remount the target filesystem on the target machine, boot up, and do
"ldconfig -v" as root to update

My system now works, so I've stopped fiddling.  However there are a few
points which could be experimented on:
1) "ldconfig -p" now reports paths with a double slash at the front (eg
//lib ).  This doesn't appear to be a problem, but who knows? 
"--prefix=" might fix this, but it would take me too long to find out to
be worth the effort.
2) At point 4 above, I rebuilt from scratch (I've not got enough disk
space to keep 250+ Mb of object files hanging around).  Maybe time could
be saved by reconfiguring in the original build directory, but that
might well not work.


	James Inge


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list