unresolved symbols more
Frank Schafer
frank.schafer@setuza.cz
Tue Sep 25 00:29:00 GMT 2001
Frank Schafer wrote:
> Hi there,
>
> I have the following problem compiling ( it happened compiling GNOME, so
> I'll use this as an
> example:
>
> During compile of libgtop i get the following errors:
>
> /usr/local/lib/libz.so.1: undefined reference to `atexit'
> collect2: ld returned 1 exit status
> make[3]: *** [libgtop_daemon] Error 1
> make[3]: Leaving directory `/v_dsk/src/libgtop-1.0.12/src/daemon'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/v_dsk/src/libgtop-1.0.12/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/v_dsk/src/libgtop-1.0.12'
> make: *** [all-recursive-am] Error 2
>
> ... and indeed, ``nm /usr/local/lib/libz.so.1 | grep " U "'' shows up
> the following:
>
> U ___brk_addr@@GLIBC_2.0
> U __curbrk@@GLIBC_2.0
> U __environ@@GLIBC_2.0
> U __errno_location@@GLIBC_2.0
> U atexit
> U fseek@@GLIBC_2.0
> U ftell@@GLIBC_2.0
> U fwrite@@GLIBC_2.0
> U malloc@@GLIBC_2.0
> U memcpy@@GLIBC_2.0
> U memset@@GLIBC_2.0
> U rewind@@GLIBC_2.0
> U sprintf@@GLIBC_2.0
> U strcat@@GLIBC_2.0
> U strcpy@@GLIBC_2.0
> U vsprintf@@GLIBC_2.0
> U calloc@@GLIBC_2.0
> U fclose@@GLIBC_2.1
> U fdopen@@GLIBC_2.1
> U ferror@@GLIBC_2.0
> U fflush@@GLIBC_2.0
> U fopen@@GLIBC_2.1
> U fprintf@@GLIBC_2.0
> U fputc@@GLIBC_2.0
> U fread@@GLIBC_2.0
> U free@@GLIBC_2.0
>
> I've looked up some further libraries and programs and in fact --
> everywhere ``atexit'' is
> unresolved.
>
> I got a response from gzip.org, stating that this is a version problem
> between GCC and
> glibc ( maybe binutils too??? ).
>
> I'm running a LFS system with Linux kernel 2.4.6 and glibc-2.2.3,
> binutils version 2.11 and
> GCC version 2.95.3.
>
> The statically linked GCC and binutils were built on a Linux box with
> kernel 2.2.16, glibc 2.1.3,
> binutils 2.10.91 and egcs 2.91.91.
>
> Can anybody tell me, what I have to do ( use ) to make ``atexit''
> resolved?
>
> Every help is VERY regarded.
>
> Thanks in advance
> Frank
Now I'm totally confused.
# ldd /usr/local/lib/libz.so.1 # gives me
libc.so.6 => /lib/libc.so.6 (0x40014000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
# # and
# readelf -s /lib/libc.so.6 | grep atexit # shows
1008: 00030954 54 FUNC GLOBAL DEFAULT 17 atexit@GLIBC_2.0
1197: 00030764 70 FUNC GLOBAL DEFAULT 17
__cxa_atexit@@GLIBC_2.1.3
... so why the hell the ``atexit'' function ends up unresolved in libz????
Any suggestions?
Thanks in advance
Frank
More information about the Gcc-help
mailing list