[geeks] 2 glibc's in separate directories

Jonathan C. Patschke jp at celestrion.net
Mon Jul 8 17:58:14 CDT 2002


On Mon, 8 Jul 2002, William S. wrote:

> "/usr/i386-slackware-linux/bin/ld: cannot open crt1.o: No such file or directory"
>
> Since crt1.o was nowhere on the system and appeared to be part of glibc
> I decided to install an additional glibc (from source) in a new path:
> 	(--prefix="/usr/glibc-2.2.5")

That really wasn't what you wanted to do.  There's a package in the "L"
Slackware installation series that contains the compile-time half of
glibc.  You only had the run-time half installed.

> My question is this, how do I compile other programs using the new
> glibc?

Again, you really don't want to do that.  If any of the configuration
options are different, you might end up with programs that won't run on
the libc that you have installed in /lib.

> Which arguments do I use with "./configure"? Do I need to set/reset any
> env variables like 'LD_LIBRARY_PATH'?

Set CFLAGS and LDFLAGS appropriately prior to calling configure:

CFLAGS='...' LDFLAGS='...' ./configure

> I came across the following quote in the glibc FAQ. Unfortunately
> the '--dynamic-linker' is not an item I can specify with the
> program I am compiling.

It goes in LDFLAGS or CFLAGS, I don't remember which.

> Any idea what to do?

rm -rf /usr/glibc-2.2.5
cd /tmp
$DIST=ftp://ftp.slackware.com/pub/slackware/slackware-8.1
wget $DIST/slackware/l/glibc-2.2.5-i386-2.tgz
pkgtool

Select "Current", and then install the glibc package from the
distribution.

--Jonathan



More information about the geeks mailing list