This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AS_NEEDED in libc.so


Hi,

On Linux/x86, while installing glibc from CVS 2005-03-22, I get this error:

CC="gcc" /usr/bin/perl scripts/test-installation.pl /packages/glibc-20050322-build/
/usr/bin/ld:/usr/lib/libc.so: file format not recognized; treating as linker script
/usr/bin/ld:/usr/lib/libc.so:5: parse error
collect2: ld returned 1 exit status
Execution of gcc failed!
The script has found some problems with your installation!

The problem is in this file /usr/lib/libc.so:
=====================================================
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )
=====================================================

After I remove the AS_NEEDED(...) item, the test-installation.pl script
succeeds and says "Your new glibc installation seems to be ok.".

It seems that AS_NEEDED is only understood by newer versions of 'ld'. I'm
using

$ ld --version
GNU ld version 2.13.90.0.16 20021126

A newer version of ld appears to not be required for use with glibc; therefore
is it possible to change Makerules to emit this AS_NEEDED thing only when
the linker supports it?

Bruno


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