kdevelop build error: undefined reference to `KDevelop::EditorContext::currentWord() const'

René J.V. Bertin rjvbertin at gmail.com
Fri Jun 24 17:40:12 UTC 2016


On Friday June 24 2016 17:01:55 Aetf wrote:

> I noticed this error on CI right after I pushed the patch to master.
> However I can't reproduce it on my box with clean build of kdevplatform and
> kdevelop... So I don't know where to look at. :/
> 
> It seems that libKDevPlatformLanguage does contain the missing symbol. No
> idea why the linker couldn't find it. I'll try rebuild on my box again to
> see if I can find something else.

It also seems (from nm output) that the symbol ought to be visible but I have been known to misinterpret that information before. It's something to look at, as well as any custom compiler flags you might be using. Or the compiler version ...
Maybe use the -loadall linker option?

I thought I'd be nice and tried to build on OS X using clang 3.8 (from MacPorts). The debuggers subdir builds there after correcting a single error:

kf5-kdevelop-5/debuggers/common/midebugger.cpp:105:11: error: 
      no member named 'kill' in the global namespace
        ::kill(pid, SIGINT);
        ~~^
1 error generated.
make[2]: *** [debuggers/common/CMakeFiles/kdevdebuggercommon.dir/midebugger.cpp.o] Error 1

-> you need to `#include <signal.h>` on OS X, not `#include "sys/signal.h"` 

Not even an error building kdevgdb. I do see this however, linking test_gdb:


%> /opt/local/bin/clang++-mp-3.8   -O3 -march=native -g -DNDEBUG -DQT_USE_EXTSTANDARDPATHS -DQT_EXTSTANDARDPATHS_XDG_DEFAULT=true -stdlib=libc++  -std=c++0x -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-vi
rtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=undefined-bool-conversion -Werror=tautological-undefined-compare -fexcep
tions -arch x86_64 -mmacosx-version-min=10.9 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  -Wl,-headerpad_max_install_na
mes CMakeFiles/test_gdb.dir/unittests/test_gdb.cpp.o CMakeFiles/test_gdb.dir/debuggerplugin.cpp.o CMakeFiles/test_gdb.dir/gdb.cpp.o 
CMakeFiles/test_gdb.dir/disassemblewidget.cpp.o CMakeFiles/test_gdb.dir/gdboutputwidget.cpp.o CMakeFiles/test_gdb.dir/debugsession.c
pp.o CMakeFiles/test_gdb.dir/gdbbreakpointcontroller.cpp.o CMakeFiles/test_gdb.dir/gdbconfigpage.cpp.o CMakeFiles/test_gdb.dir/varia
blecontroller.cpp.o CMakeFiles/test_gdb.dir/gdbframestackmodel.cpp.o CMakeFiles/test_gdb.dir/gdbvariable.cpp.o CMakeFiles/test_gdb.d
ir/registers/registersview.cpp.o CMakeFiles/test_gdb.dir/registers/registercontroller.cpp.o CMakeFiles/test_gdb.dir/registers/regist
ersmanager.cpp.o CMakeFiles/test_gdb.dir/registers/registercontroller_x86.cpp.o CMakeFiles/test_gdb.dir/registers/registercontroller
_arm.cpp.o CMakeFiles/test_gdb.dir/registers/modelsmanager.cpp.o CMakeFiles/test_gdb.dir/registers/converters.cpp.o CMakeFiles/test_
gdb.dir/qrc_kdevgdb.cpp.o CMakeFiles/test_gdb.dir/test_gdb_automoc.cpp.o  -o test_gdb  /opt/local/lib/libKDevPlatformTests.10.0.0.dy
lib ../common/libkdevdebuggercommon.a /opt/local/libexec/qt5/Library/Frameworks/QtTest.framework/QtTest /opt/local/lib/libKDevPlatfo
rmShell.10.0.0.dylib /opt/local/lib/libKDevPlatformLanguage.10.0.0.dylib /opt/local/lib/libKDevPlatformProject.10.0.0.dylib /opt/loc
al/lib/libKDevPlatformOutputView.10.0.0.dylib /opt/local/lib/libKF5ThreadWeaver.5.22.0.dylib /opt/local/lib/libKDevPlatformSerializa
tion.10.0.0.dylib /opt/local/lib/libKDevPlatformDebugger.10.0.0.dylib /opt/local/lib/libKDevPlatformSublime.10.0.0.dylib /opt/local/
lib/libKDevPlatformUtil.10.0.0.dylib /opt/local/lib/libKDevPlatformInterfaces.10.0.0.dylib /opt/local/lib/libKF5TextEditor.5.22.0.dy
lib /opt/local/lib/libKF5Parts.5.22.0.dylib /opt/local/lib/libKF5KIOWidgets.5.22.0.dylib /opt/local/lib/libKF5KIOCore.5.22.0.dylib /
opt/local/lib/libKF5JobWidgets.5.22.0.dylib /opt/local/lib/libKF5XmlGui.5.22.0.dylib /opt/local/lib/libKF5TextWidgets.5.22.0.dylib /
opt/local/lib/libKF5Service.5.22.0.dylib /opt/local/lib/libKF5SonnetUi.5.22.0.dylib /opt/local/lib/libKF5ItemModels.5.22.0.dylib /op
t/local/lib/libprocessui.5.6.5.dylib /opt/local/lib/libKF5Completion.5.22.0.dylib /opt/local/lib/libprocesscore.5.6.5.dylib /opt/loc
al/lib/libKF5ConfigWidgets.5.22.0.dylib /opt/local/lib/libKF5WidgetsAddons.5.22.0.dylib /opt/local/lib/libKF5Codecs.5.22.0.dylib /op
t/local/lib/libKF5ConfigGui.5.22.0.dylib /opt/local/libexec/qt5/Library/Frameworks/QtXml.framework/QtXml /opt/local/lib/libKF5Config
Core.5.22.0.dylib /opt/local/lib/libKF5Auth.5.22.0.dylib /opt/local/libexec/qt5/Library/Frameworks/QtDBus.framework/QtDBus /opt/loca
l/lib/libKF5CoreAddons.5.22.0.dylib /opt/local/lib/libKF5I18n.5.22.0.dylib /opt/local/libexec/qt5/Library/Frameworks/QtWidgets.frame
work/QtWidgets /opt/local/libexec/qt5/Library/Frameworks/QtNetwork.framework/QtNetwork /opt/local/libexec/qt5/Library/Frameworks/QtG
ui.framework/QtGui /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/QtCore -Wl,-rpath,/opt/local/lib 
ld: warning: direct access in KDevMI::MIDebugSession::startDebugger(KDevelop::ILaunchConfiguration*) to global weak symbol QtPrivate
::QSlotObject<void (KDevMI::MIDebugSession::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**,
 bool*) means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled 
with different visibility settings.
ld: warning: direct access in KDevMI::MIDebugSession::startDebugger(KDevelop::ILaunchConfiguration*) to global weak symbol QtPrivate
::QSlotObject<void (KDevMI::MIDebugSession::*)(QString const&), QtPrivate::List<QString const&>, void>::impl(int, QtPrivate::QSlotOb
jectBase*, QObject*, void**, bool*) means the weak symbol cannot be overridden at runtime. This was likely caused by different trans
lation units being compiled with different visibility settings.
ld: warning: direct access in KDevMI::MIDebugSession::executeCmd() to global weak symbol typeinfo for KDevMI::MI::SentinelCommand me
ans the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with diffe
rent visibility settings.
ld: warning: direct access in KDevMI::MIDebuggerPlugin::setupActions() to global weak symbol QtPrivate::QSlotObject<void (KDevMI::MI
DebuggerPlugin::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) means the weak symbo
l cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility se
ttings.
ld: warning: direct access in KDevMI::MIDebuggerPlugin::slotDebugExternalProcess(QObject*) to global weak symbol QtPrivate::QSlotObj
ect<void (KDevMI::MIDebuggerPlugin::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) 
means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with dif
ferent visibility settings.
ld: warning: direct access in KDevelop::IBreakpointController::~IBreakpointController() to global weak symbol QHash<KDevelop::Breakp
oint::Column, QHashDummyValue>::deleteNode2(QHashData::Node*) means the weak symbol cannot be overridden at runtime. This was likely
 caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in KDevelop::IBreakpointController::~IBreakpointController() to global weak symbol QHash<KDevelop::Breakp
oint const*, QHashDummyValue>::deleteNode2(QHashData::Node*) means the weak symbol cannot be overridden at runtime. This was likely 
caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in KDevelop::IBreakpointController::~IBreakpointController() to global weak symbol QHash<KDevelop::Breakp
oint::Column, QHashDummyValue>::deleteNode2(QHashData::Node*) means the weak symbol cannot be overridden at runtime. This was likely
 caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in QMapNode<KDevelop::Breakpoint const*, QSet<KDevelop::Breakpoint::Column> >::doDestroySubTree(QtPrivate
::integral_constant<bool, true>) to global weak symbol QHash<KDevelop::Breakpoint::Column, QHashDummyValue>::deleteNode2(QHashData::
Node*) means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled w
ith different visibility settings.
[ 25%] Built target test_gdb




More information about the KDevelop-devel mailing list