bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with ld


From: Jürgen Braun
Subject: Problem with ld
Date: Thu, 07 Feb 2002 20:21:27 +0100

Hi

I've a problem with ld (GNU ld version 2.11.93 20020207). It looks like,
ld searches for libs a program depend on, but it don't search for libs
another lib depend on. For example:

The following program compile and run without any problems:


#include <stdlib.h>
void bla()
{}
int main()
{
  atexit(bla);
  return 0;
}

but if I compile a program depending on libdl.so witch needs atexit I
get this Error:

gcc -g -O2 -o wxcopy wxcopy.o  -L/usr/X11R6/lib -lX11
/lib/libdl.so.2: undefined reference to `atexit'
collect2: ld returned 1 exit status

First I thought it is a problem with the glib (2.2.5) and the
libc_nonshared.a, but I get errormessages for other programs as well:

gcc -g -O2 -o .libs/fontl fontl.o  ../../WINGs/libWINGs.a
../../wrlib/.libs/libwraster.so -L/usr/local/lib -L/usr/X11R6/lib -ltiff
/usr/lib/libHermes.so -lpng -lz /usr/lib/libjpeg.so -lX11 -lm 
-D__LIBTOOL_IS_A_FOOL__ 
../../wrlib/.libs/libwraster.so: undefined reference to
`DGifGetExtensionNext'
../../wrlib/.libs/libwraster.so: undefined reference to
`DGifGetRecordType'
../../wrlib/.libs/libwraster.so: undefined reference to
`DGifGetImageDesc'
../../wrlib/.libs/libwraster.so: undefined reference to
`DGifOpenFileName'
../../wrlib/.libs/libwraster.so: undefined reference to `DGifGetLine'
../../wrlib/.libs/libwraster.so: undefined reference to `DGifCloseFile'
../../wrlib/.libs/libwraster.so: undefined reference to
`DGifGetExtension'
../../wrlib/.libs/libwraster.so: undefined reference to `GifLastError'
collect2: ld returned 1 exit status

the libwraster.so is part of the WindowMaker0.80.0 and it uses the
libungif. This lib is compiles a few lines up without any error.
configure says it can compile WindowMaker using libungif.so. It looks
like ld includes the libwraster.so but not the libungif.so witch is
needed by libwraster.so.

I had this problem with glibc 2.1.3, 2.2.4 and now with 2.2.5. I use
Linuxkernel 2.4.17. First I used binutils 2.11.2. Now I use the 2.11.93
with I get from cvs today. I use the gcc 2.95.3, and the binutils I
configures with "configure --with-gnu-ld --enable-targets=all
--enable-commonbfdlib --with-mmap --prefix=/usr --enable-bfd-assembler
--enable-64-bit-bfd --with-newlib"
It don't work if I configure with --prefix=/usr as well.

If you have a hint or a solution or any questions about this problem
please let me know. I'm not a member of this list, so please could you
send an answer directly to my mail address. Thanks.

Jürgen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]