LD Changes To Implicit DSO Linking Update
roland at redhat.com
Tue Feb 16 21:47:24 UTC 2010
> Sure? For the libpng case I have a build failure which looks like this
> isn't the case (bug 565047):
> /usr/bin/ld: /usr/lib/gcc/i686-redhat-linux/4.4.3/../../../libpng12.so:
> undefined reference to symbol 'crc32'
> /usr/bin/ld: note: 'crc32' is defined in DSO /lib/libz.so.1 so try
> adding it to the linker command line
> Which made me think -lz is needed on the command line even if zlib is
> used only indirectly via libpng (and likewise that -lX11 should be there
> for gtk2 because gtk2 needs it).
That looks suspicious to me. libpng12.so has a DT_NEEDED for libz.so.1,
so its reference should not produce this error. This might be an ld bug.
Are you sure you don't have other references to 'crc32'? It could be
that it is just citing the wrong one for the error. If that's not it,
then AFAICT it's just a bug. Either way, file a binutils bug--but say
whether it's a spurious message or a message misidentifying which reference
has the problem.
More information about the devel