Reputation: 30517
I am getting below linker errors while building Qt for embedded ARM linux platform, Any ideas what can be the reason? or How to solve it?
.obj/release-shared-emb-arm/qtconcurrentiteratekernel.o: In function
getticks()': qtconcurrentiteratekernel.cpp:(.text+0x60): undefined reference to
clock_gettime' .obj/release-shared-emb-arm/qthread_unix.o: In functionset_thread_data(QThreadData*)': qthread_unix.cpp:(.text+0x40): undefined reference to
__tls_get_addr' .obj/release-shared-emb-arm/qthread_unix.o: In functionQThreadData::current()': qthread_unix.cpp:(.text+0x37c): undefined reference to
__tls_get_addr' .obj/release-shared-emb-arm/qresource.o: In functionQDynamicFileResourceRoot::registerSelf(QString const&)': qresource.cpp:(.text._ZN24QDynamicFileResourceRoot12registerSelfERK7QString[QDynamicFileResourceRoot::registerSelf(QString const&)]+0x88): undefined reference to
fstat' .obj/release-shared-emb-arm/qfilesystemengine.o: In functionQFileSystemEngine::fillMetaData(int, QFileSystemMetaData&)': qfilesystemengine.cpp:(.text+0x490): undefined reference to
fstat' .obj/release-shared-emb-arm/qfilesystemengine_unix.o: In functionQFileSystemEngine::currentPath()': qfilesystemengine_unix.cpp:(.text+0x34): undefined reference to
stat' .obj/release-shared-emb-arm/qfilesystemengine_unix.o: In functionQFileSystemEngine::removeDirectory(QFileSystemEntry const&, bool)': qfilesystemengine_unix.cpp:(.text+0x3bc): undefined reference to
stat' .obj/release-shared-emb-arm/qfilesystemengine_unix.o: In functionQFileSystemEngine::createDirectory(QFileSystemEntry const&, bool)': qfilesystemengine_unix.cpp:(.text+0x5c4): undefined reference to
stat' .obj/release-shared-emb-arm/qfilesystemengine_unix.o: In functionQFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>)': qfilesystemengine_unix.cpp:(.text+0xda4): undefined reference to
lstat' qfilesystemengine_unix.cpp:(.text+0xe34): undefined reference tostat' .obj/release-shared-emb-arm/qtranslator.o: In function
QTranslatorPrivate::do_load(QString const&)': qtranslator.cpp:(.text+0x1730): undefined reference to `fstat' collect2: ld returned 1 exit status make[1]: * [../../lib/libQtCore.so.4.8.0] Error 1
Upvotes: 0
Views: 3905
Reputation: 9986
It seems like there's something wrong with your toolchain or qmake.conf. Try to manually link to libc and to rt library either in your qmake.conf or in the configure using -l and -L: http://doc.qt.nokia.com/stable/configure-options.html.
Upvotes: 0