This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

Unresolved symbols which are present in linked libs


Hello all!

I have a problem using or understanding the behaviour of GCC linker.
While building a Qt-based application I get a following error:

$ /home/user/bbndk-2.0.0/host/linux/x86/usr/bin/arm-unknown-nto-qnx6.5.0eabi-g++
-Wl,-rpath-link,/home/user/bbndk-2.0.0/target/qnx6/armle-v7/lib
-Wl,-rpath-link,/home/user/bbndk-2.0.0/target/qnx6/armle-v7/usr/lib
-Wl,-O1 -Wl,-rpath,/home/user/workspace/playbook_prefix/peregrine/lib
-o peregrine-tablet-common main.o KeyboardHandler.o
-L/home/user/bbndk-2.0.0/target/qnx6/armle-v7/lib
-L/home/user/bbndk-2.0.0/target/qnx6/armle-v7/usr/lib
-L/home/user/workspace/qt-qnx/stage/nto/armle-v7/usr/lib/qt4/lib
-L/home/user/workspace/playbook_prefix/lib -ltelepathy-qt4
-ltelepathy-qt4-farsight -ltelepathy-glib
-L/home/user/workspace/glib/../playbook_prefix/lib
-L/home/user/workspace/gstreamer0.10-0.10.35/../playbook_prefix/lib
-L/home/user/bbndk-2.0.0/target/qnx6/armle-v7/lib -lgstreamer-0.10
-lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lxml2 -lglib-2.0 -lintl
-liconv -ldbus-1 -lQtDeclarative
-L/home/user/workspace/qt-qnx/stage/nto/armle-v7/usr/lib/qt4/lib
-L/home/user/bbndk-2.0.0/target/qnx6/armle-v7/usr/lib -lQtScript
-lQtSvg -lQtSql -lQtXmlPatterns -lQtNetwork -lsocket -lQtOpenGL
-lQtGui -lQtCore -lm -lGLESv2 -lEGL
/home/user/workspace/playbook_prefix/lib/libtelepathy-glib.so:
warning: The 'tmpnam' function is dangerous. Use 'mkstemp' instead.
/home/user/workspace/playbook_prefix/lib/libtelepathy-qt4-farsight.so:
undefined reference to `Tp::DBusProxy::busName() const'
/home/user/workspace/playbook_prefix/lib/libtelepathy-qt4-farsight.so:
undefined reference to
`Tp::StreamedMediaChannel::handlerStreamingRequired() const'
/home/user/workspace/playbook_prefix/lib/libtelepathy-qt4-farsight.so:
undefined reference to `Tp::DBusProxy::objectPath() const'
/home/user/workspace/playbook_prefix/lib/libtelepathy-qt4-farsight.so:
undefined reference to `Tp::Channel::targetHandleType() const'
/home/user/workspace/playbook_prefix/lib/libtelepathy-qt4-farsight.so:
undefined reference to `Tp::Channel::connection() const'
/home/user/workspace/playbook_prefix/lib/libtelepathy-qt4-farsight.so:
undefined reference to `Tp::Debug::invokeDebugCallback()'
/home/user/workspace/playbook_prefix/lib/libtelepathy-qt4-farsight.so:
undefined reference to `Tp::Channel::targetHandle() const'
/home/user/workspace/playbook_prefix/lib/libtelepathy-qt4-farsight.so:
undefined reference to `Tp::enabledWarning()'
collect2: ld returned 1 exit status

All those symbols should be present in libtelepathy-qt4 which is in
library path and specified in command string (GCC does load it, I
checked via strace -e open).
So, I took a look using objdump on both libtelepathy-qt4-farsight and
libtelepathy-qt4 libs. Let's look at 'Tp::DBusProxy::busName() const'
for example:

$ objdump -t /home/user/workspace/playbook_prefix/lib/libtelepathy-qt4.so
| grep busName
001b68b4 l     F .text	0000006c .hidden _ZNK2Tp9DBusProxy7busNameEv

$ objdump -T /home/user/workspace/playbook_prefix/lib/libtelepathy-qt4-farsight.so
| grep busName
00000000      D  *UND*	00000000 _ZNK2Tp9DBusProxy7busNameEv

So, as I can understand, the symbol in question has a signature
'_ZNK2Tp9DBusProxy7busNameEv' and is present in both a dynamic symbol
table of telepathy-qt4-farsight and a symbol table of telepathy-qt4.
The situation is the same for all symbols with problems. Why they do
not resolve? On a side note, both these libs were not provided by a
professional maintainer and were build by me, so they can be built
wrong.

Can you please provide me with any suggestions? I am totally out of ideas.


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