Kdevplatform /usr/lib64/libQtWebKit.so.4: undefined reference to `g_mutex_lock'

Andreas Pakulat apaku at gmx.de
Sun Feb 19 18:54:23 UTC 2012


On 18.02.12 12:29:37, Michael Hart wrote:
> Hopefully that will help
> Linking CXX executable projectmodeltest
> cd
> /home/XMan/Documents/Projects/kdevelop4/src/kdevplatform/build/project/tests
> && /usr/bin/cmake -E cmake_link_script
> CMakeFiles/projectmodeltest.dir/link.txt
> --verbose=1
> 
> /usr/bin/c++    -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef
> -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security
> -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common
> -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden
> -Werror=return-type -fvisibility-inlines-hidden -O2 -g -DNDEBUG
> -DQT_NO_DEBUG  -Wl,--enable-new-dtags
> CMakeFiles/projectmodeltest.dir/projectmodeltest_automoc.o
> CMakeFiles/projectmodeltest.dir/projectmodeltest.o
> CMakeFiles/projectmodeltest.dir/dummyproject.o
> CMakeFiles/projectmodeltest.dir/__/__/tests/modeltest.o  -o
> projectmodeltest -rdynamic
> -L/home/XMan/Documents/Projects/kdevelop4/src/kdevplatform/build/lib
> /usr/lib64/libQtTest.so ../../lib/libkdevplatforminterfaces.so.6.0.0
> ../../lib/libkdevplatformproject.so.6.0.0
> ../../lib/libkdevplatformlanguage.so.6.0.0
> ../../lib/libkdevplatformtests.so.6.0.0
> ../../lib/libkdevplatformshell.so.6.0.0
> ../../lib/libkdevplatformoutputview.so.6.0.0 ../../lib/libsublime.so.6.0.0
> ../../lib/libkdevplatformdebugger.so.6.0.0
> ../../lib/libkdevplatformproject.so.6.0.0
> ../../lib/libkdevplatformlanguage.so.6.0.0
> ../../lib/libkdevplatformutil.so.6.0.0
> ../../lib/libkdevplatforminterfaces.so.6.0.0
> /usr/lib64/libktexteditor.so.4.7.0 /usr/lib64/libkparts.so.4.7.0
> /usr/lib64/libkio.so.5.7.0 /usr/lib64/libnepomukutils.so.4.7.0
> /usr/lib64/libQtNetwork.so /usr/lib64/libQtXml.so
> /usr/lib64/libnepomuk.so.4.7.0 -lsoprano /usr/lib64/libkdeui.so.5.7.0
> /usr/lib64/libkdecore.so.5.7.0 /usr/lib64/libQtCore.so -lpthread
> /usr/lib64/libQtDBus.so /usr/lib64/libQtGui.so /usr/lib64/libQtSvg.so
> -Wl,-rpath,/home/XMan/Documents/Projects/kdevelop4/src/kdevplatform/build/lib
> -Wl,-rpath-link,/home/XMan/Documents/Projects/kdevelop4/src/kdevplatform/build/lib
> 
> /usr/lib64/libQtWebKit.so.4: undefined reference to `g_mutex_lock'

Hmm, I'm not sure whats going on here, but you might want to check with
someone having more a clue about linkers. It looks like your QtWebKit
wasn't build with the pthread library but some other that prevents the
threading-API. In addition for some strange reason libQtWebKit exposes
this C api again in its public ABI and hence every lib linking agsinst
QtWebKit also needs to link against this threading library.

If I'd have to guess I'd say this is either a bug in Qt's buildsystem,
your linker or maybe CMake's FindThreads stuff.

Which compiler/OS is this?

Andreas





More information about the KDevelop-devel mailing list