[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/17952] New: confusing undefined reference error message when mix
From: |
ossman at cendio dot se |
Subject: |
[Bug ld/17952] New: confusing undefined reference error message when mixing DSO and .a (and .o?) |
Date: |
Tue, 10 Feb 2015 12:25:17 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=17952
Bug ID: 17952
Summary: confusing undefined reference error message when
mixing DSO and .a (and .o?)
Product: binutils
Version: 2.25
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: ossman at cendio dot se
Under some circumstances ld can complain that I haven't fulfilled the
dependencies of a DSO given on the command line. This is of course absolute
nonsense as I should only provide dependencies for my object files, not any
DSOs I happen to use.
The complaint is half right though as one of my object files actually needs
this library. ld is just not telling me this. This is my link attempt:
> /local/home/ossman/devel/tigervnc/builddir/solsparc/vncviewer
> address@hidden cbrun solsparc /usr/bin/sparc-sun-solaris2.10-c++ -v -pg -g
> -nodefaultlibs -Wl,--no-copy-dt-needed-entries
> CMakeFiles/vncviewer.dir/menukey.cxx.o CMakeFiles/vncviewer.dir/CConn.cxx.o
> CMakeFiles/vncviewer.dir/DesktopWindow.cxx.o
> CMakeFiles/vncviewer.dir/FLTKPixelBuffer.cxx.o
> CMakeFiles/vncviewer.dir/UserDialog.cxx.o
> CMakeFiles/vncviewer.dir/ServerDialog.cxx.o
> CMakeFiles/vncviewer.dir/OptionsDialog.cxx.o
> CMakeFiles/vncviewer.dir/PlatformPixelBuffer.cxx.o
> CMakeFiles/vncviewer.dir/Viewport.cxx.o
> CMakeFiles/vncviewer.dir/parameters.cxx.o
> CMakeFiles/vncviewer.dir/keysym2ucs.c.o
> CMakeFiles/vncviewer.dir/vncviewer.cxx.o
> CMakeFiles/vncviewer.dir/X11PixelBuffer.cxx.o -o vncviewer
> ../common/rfb/librfb.a ../common/network/libnetwork.a ../common/rdr/librdr.a
> ../common/os/libos.a ../common/Xregion/libXregion.a -Wl,-Bstatic
> -lfltk_images -lpng -ljpeg -lfltk -Wl,-Bdynamic -lm -ldl -lXcursor
> /usr/sparc-sun-solaris2.10/sys-root/usr/sfw/lib/libXfixes.so -Wl,-Bstatic
> -lXft -Wl,-Bdynamic -lfontconfig -lXext -R/usr/sfw/lib -lX11 -lz -Wl,-Bstatic
> -ljpeg -Wl,-Bdynamic -lpam -Wl,-Bstatic -lgnutls -ltasn1 -lnettle -lhogweed
> -lgmp -Wl,-Bdynamic -lrt -lsocket
> /usr/sparc-sun-solaris2.10/sys-root/usr/lib/libz.so -Wl,-Bstatic -lstdc++
> -Wl,-Bdynamic -lgcc -lgcc_eh -lc
> Using built-in specs.
> COLLECT_GCC=/usr/bin/sparc-sun-solaris2.10-c++
> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/sparc-sun-solaris2.10/4.6.4/lto-wrapper
> Target: sparc-sun-solaris2.10
> Configured with: ../configure --target=sparc-sun-solaris2.10 --prefix=/usr
> --mandir=/usr/share/man --infodir=/usr/share/info
> --with-sysroot=/usr/sparc-sun-solaris2.10/sys-root --with-system-zlib
> --with-gnu-as --with-gnu-ld --disable-nls --disable-multilib
> --disable-libquadmath --disable-libmudflap --disable-gnu-unique-object
> --host=i686-pc-linux-gnu --enable-threads=posix --enable-languages=c,c++
> Thread model: posix
> gcc version 4.6.4 (GCC)
> COMPILER_PATH=/usr/libexec/gcc/sparc-sun-solaris2.10/4.6.4/:/usr/libexec/gcc/sparc-sun-solaris2.10/4.6.4/:/usr/libexec/gcc/sparc-sun-solaris2.10/:/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/:/usr/lib/gcc/sparc-sun-solaris2.10/:/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/../../../../sparc-sun-solaris2.10/bin/
> LIBRARY_PATH=/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/:/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/../../../../sparc-sun-solaris2.10/lib/:/usr/sparc-sun-solaris2.10/sys-root/lib/:/usr/sparc-sun-solaris2.10/sys-root/usr/lib/
> COLLECT_GCC_OPTIONS='-v' '-pg' '-g' '-nodefaultlibs' '-o' 'vncviewer' '-R'
> '/usr/sfw/lib' '-shared-libgcc' '-mcpu=v9'
> /usr/libexec/gcc/sparc-sun-solaris2.10/4.6.4/collect2
> --sysroot=/usr/sparc-sun-solaris2.10/sys-root -V -R /usr/sfw/lib -Y
> P,/usr/sparc-sun-solaris2.10/sys-root/usr/ccs/lib/libp:/usr/sparc-sun-solaris2.10/sys-root/usr/lib/libp:/usr/sparc-sun-solaris2.10/sys-root/usr/ccs/lib:/usr/sparc-sun-solaris2.10/sys-root/usr/lib:/usr/sparc-sun-solaris2.10/sys-root/lib
> -rpath-link /usr/sparc-sun-solaris2.10/sys-root/usr/lib -Qy -o vncviewer
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/gcrt1.o
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/gmon.o
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/crti.o
> /usr/sparc-sun-solaris2.10/sys-root/usr/lib/values-Xa.o
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/crtbegin.o
> -L/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4
> -L/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/../../../../sparc-sun-solaris2.10/lib
> -L/usr/sparc-sun-solaris2.10/sys-root/lib
> -L/usr/sparc-sun-solaris2.10/sys-root/usr/lib --no-copy-dt-needed-entries
> CMakeFiles/vncviewer.dir/menukey.cxx.o CMakeFiles/vncviewer.dir/CConn.cxx.o
> CMakeFiles/vncviewer.dir/DesktopWindow.cxx.o
> CMakeFiles/vncviewer.dir/FLTKPixelBuffer.cxx.o
> CMakeFiles/vncviewer.dir/UserDialog.cxx.o
> CMakeFiles/vncviewer.dir/ServerDialog.cxx.o
> CMakeFiles/vncviewer.dir/OptionsDialog.cxx.o
> CMakeFiles/vncviewer.dir/PlatformPixelBuffer.cxx.o
> CMakeFiles/vncviewer.dir/Viewport.cxx.o
> CMakeFiles/vncviewer.dir/parameters.cxx.o
> CMakeFiles/vncviewer.dir/keysym2ucs.c.o
> CMakeFiles/vncviewer.dir/vncviewer.cxx.o
> CMakeFiles/vncviewer.dir/X11PixelBuffer.cxx.o ../common/rfb/librfb.a
> ../common/network/libnetwork.a ../common/rdr/librdr.a ../common/os/libos.a
> ../common/Xregion/libXregion.a -Bstatic -lfltk_images -lpng -ljpeg -lfltk
> -Bdynamic -lm -ldl -lXcursor
> /usr/sparc-sun-solaris2.10/sys-root/usr/sfw/lib/libXfixes.so -Bstatic -lXft
> -Bdynamic -lfontconfig -lXext -lX11 -lz -Bstatic -ljpeg -Bdynamic -lpam
> -Bstatic -lgnutls -ltasn1 -lnettle -lhogweed -lgmp -Bdynamic -lrt -lsocket
> /usr/sparc-sun-solaris2.10/sys-root/usr/lib/libz.so -Bstatic -lstdc++
> -Bdynamic -lgcc -lgcc_eh -lc
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/crtend.o
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/crtn.o
> GNU ld (GNU Binutils) 2.25
> Supported emulations:
> elf32_sparc_sol2
> elf32_sparc
> elf64_sparc_sol2
> elf64_sparc
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/../../../../sparc-sun-solaris2.10/bin/ld:
> /usr/sparc-sun-solaris2.10/sys-root/usr/lib/libXcursor.so: undefined
> reference to symbol 'XRenderFindStandardFormat@@RENDER_0.5'
> /usr/sparc-sun-solaris2.10/sys-root/usr/openwin/sfw/lib/libXrender.so.1:
> error adding symbols: DSO missing from command line
> collect2: ld returned 1 exit status
Absolutely confusing.
But if I shuffle things around a bit I get at the real reason that things are
failing:
> /local/home/ossman/devel/tigervnc/builddir/solsparc/vncviewer
> address@hidden cbrun solsparc /usr/bin/sparc-sun-solaris2.10-c++ -v -pg -g
> -nodefaultlibs -Wl,--no-copy-dt-needed-entries
> CMakeFiles/vncviewer.dir/menukey.cxx.o CMakeFiles/vncviewer.dir/CConn.cxx.o
> CMakeFiles/vncviewer.dir/DesktopWindow.cxx.o
> CMakeFiles/vncviewer.dir/FLTKPixelBuffer.cxx.o
> CMakeFiles/vncviewer.dir/UserDialog.cxx.o
> CMakeFiles/vncviewer.dir/ServerDialog.cxx.o
> CMakeFiles/vncviewer.dir/OptionsDialog.cxx.o
> CMakeFiles/vncviewer.dir/PlatformPixelBuffer.cxx.o
> CMakeFiles/vncviewer.dir/Viewport.cxx.o
> CMakeFiles/vncviewer.dir/parameters.cxx.o
> CMakeFiles/vncviewer.dir/keysym2ucs.c.o
> CMakeFiles/vncviewer.dir/vncviewer.cxx.o
> CMakeFiles/vncviewer.dir/X11PixelBuffer.cxx.o -o vncviewer
> ../common/rfb/librfb.a ../common/network/libnetwork.a ../common/rdr/librdr.a
> ../common/os/libos.a ../common/Xregion/libXregion.a -Wl,-Bstatic
> -lfltk_images -lpng -ljpeg -lfltk -Wl,-Bdynamic -lm -ldl -Wl,-Bstatic -lXft
> -Wl,-Bdynamic -lXcursor
> /usr/sparc-sun-solaris2.10/sys-root/usr/sfw/lib/libXfixes.so -lfontconfig
> -lXext -R/usr/sfw/lib -lX11 -lz -Wl,-Bstatic -ljpeg -Wl,-Bdynamic -lpam
> -Wl,-Bstatic -lgnutls -ltasn1 -lnettle -lhogweed -lgmp -Wl,-Bdynamic -lrt
> -lsocket /usr/sparc-sun-solaris2.10/sys-root/usr/lib/libz.so -Wl,-Bstatic
> -lstdc++ -Wl,-Bdynamic -lgcc -lgcc_eh -lc
> Using built-in specs.
> COLLECT_GCC=/usr/bin/sparc-sun-solaris2.10-c++
> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/sparc-sun-solaris2.10/4.6.4/lto-wrapper
> Target: sparc-sun-solaris2.10
> Configured with: ../configure --target=sparc-sun-solaris2.10 --prefix=/usr
> --mandir=/usr/share/man --infodir=/usr/share/info
> --with-sysroot=/usr/sparc-sun-solaris2.10/sys-root --with-system-zlib
> --with-gnu-as --with-gnu-ld --disable-nls --disable-multilib
> --disable-libquadmath --disable-libmudflap --disable-gnu-unique-object
> --host=i686-pc-linux-gnu --enable-threads=posix --enable-languages=c,c++
> Thread model: posix
> gcc version 4.6.4 (GCC)
> COMPILER_PATH=/usr/libexec/gcc/sparc-sun-solaris2.10/4.6.4/:/usr/libexec/gcc/sparc-sun-solaris2.10/4.6.4/:/usr/libexec/gcc/sparc-sun-solaris2.10/:/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/:/usr/lib/gcc/sparc-sun-solaris2.10/:/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/../../../../sparc-sun-solaris2.10/bin/
> LIBRARY_PATH=/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/:/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/../../../../sparc-sun-solaris2.10/lib/:/usr/sparc-sun-solaris2.10/sys-root/lib/:/usr/sparc-sun-solaris2.10/sys-root/usr/lib/
> COLLECT_GCC_OPTIONS='-v' '-pg' '-g' '-nodefaultlibs' '-o' 'vncviewer' '-R'
> '/usr/sfw/lib' '-shared-libgcc' '-mcpu=v9'
> /usr/libexec/gcc/sparc-sun-solaris2.10/4.6.4/collect2
> --sysroot=/usr/sparc-sun-solaris2.10/sys-root -V -R /usr/sfw/lib -Y
> P,/usr/sparc-sun-solaris2.10/sys-root/usr/ccs/lib/libp:/usr/sparc-sun-solaris2.10/sys-root/usr/lib/libp:/usr/sparc-sun-solaris2.10/sys-root/usr/ccs/lib:/usr/sparc-sun-solaris2.10/sys-root/usr/lib:/usr/sparc-sun-solaris2.10/sys-root/lib
> -rpath-link /usr/sparc-sun-solaris2.10/sys-root/usr/lib -Qy -o vncviewer
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/gcrt1.o
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/gmon.o
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/crti.o
> /usr/sparc-sun-solaris2.10/sys-root/usr/lib/values-Xa.o
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/crtbegin.o
> -L/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4
> -L/usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/../../../../sparc-sun-solaris2.10/lib
> -L/usr/sparc-sun-solaris2.10/sys-root/lib
> -L/usr/sparc-sun-solaris2.10/sys-root/usr/lib --no-copy-dt-needed-entries
> CMakeFiles/vncviewer.dir/menukey.cxx.o CMakeFiles/vncviewer.dir/CConn.cxx.o
> CMakeFiles/vncviewer.dir/DesktopWindow.cxx.o
> CMakeFiles/vncviewer.dir/FLTKPixelBuffer.cxx.o
> CMakeFiles/vncviewer.dir/UserDialog.cxx.o
> CMakeFiles/vncviewer.dir/ServerDialog.cxx.o
> CMakeFiles/vncviewer.dir/OptionsDialog.cxx.o
> CMakeFiles/vncviewer.dir/PlatformPixelBuffer.cxx.o
> CMakeFiles/vncviewer.dir/Viewport.cxx.o
> CMakeFiles/vncviewer.dir/parameters.cxx.o
> CMakeFiles/vncviewer.dir/keysym2ucs.c.o
> CMakeFiles/vncviewer.dir/vncviewer.cxx.o
> CMakeFiles/vncviewer.dir/X11PixelBuffer.cxx.o ../common/rfb/librfb.a
> ../common/network/libnetwork.a ../common/rdr/librdr.a ../common/os/libos.a
> ../common/Xregion/libXregion.a -Bstatic -lfltk_images -lpng -ljpeg -lfltk
> -Bdynamic -lm -ldl -Bstatic -lXft -Bdynamic -lXcursor
> /usr/sparc-sun-solaris2.10/sys-root/usr/sfw/lib/libXfixes.so -lfontconfig
> -lXext -lX11 -lz -Bstatic -ljpeg -Bdynamic -lpam -Bstatic -lgnutls -ltasn1
> -lnettle -lhogweed -lgmp -Bdynamic -lrt -lsocket
> /usr/sparc-sun-solaris2.10/sys-root/usr/lib/libz.so -Bstatic -lstdc++
> -Bdynamic -lgcc -lgcc_eh -lc
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/crtend.o
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/crtn.o
> GNU ld (GNU Binutils) 2.25
> Supported emulations:
> elf32_sparc_sol2
> elf32_sparc
> elf64_sparc_sol2
> elf64_sparc
> /usr/lib/gcc/sparc-sun-solaris2.10/4.6.4/../../../../sparc-sun-solaris2.10/bin/ld:
> /usr/sparc-sun-solaris2.10/sys-root/usr/lib/libXft.a(xftfreetype.o):
> undefined reference to symbol 'XRenderFindStandardFormat@@RENDER_0.5'
> /usr/sparc-sun-solaris2.10/sys-root/usr/openwin/sfw/lib/libXrender.so.1:
> error adding symbols: DSO missing from command line
> collect2: ld returned 1 exit status
Hopefully you can fix this error message so it is easier to figure out what's
going on.
Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug ld/17952] New: confusing undefined reference error message when mixing DSO and .a (and .o?),
ossman at cendio dot se <=