gcc --with-sysroot

Chris Croswhite csc@cadence.com
Thu Nov 13 06:17:00 GMT 2003


Hello again,

Need some help still.  I am trying to configure gcc to pull headers out
of a glibc2.2.4 (my running system is on 2.3.2).  I have configured gcc
as such:

../configure --enable-languages=c,c++ --disable-multilibs --disable-nls
--with-sysroot=/opt/RH72-BUILD-PKGS/GLIBC-2.2.4-IMAGE
--prefix=/opt/RH72-BUILD-PKGS/gcc323

Everything built correctly.  However, when I try to compile an
executable I get this:
/opt/RH72-BUILD-PKGS/gcc323/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libstdc++.so: undefined reference to `__strftime_l@GLIBC_2.3'
/opt/RH72-BUILD-PKGS/gcc323/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libstdc++.so: undefined reference to `__wcsftime_l@GLIBC_2.3'
/opt/RH72-BUILD-PKGS/gcc323/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libstdc++.so: undefined reference to `__uselocale@GLIBC_2.3'
collect2: ld returned 1 exit status

So it looks like the libstc++ is linked against glibc 2.3.2 (the system
libraries).  What am I doing wrong?  I want to be able to compile the
executable with glibc2.2.4.

TIA,
Chris



More information about the Gcc-help mailing list