kdevclangsupport link error
René J.V. Bertin
rjvbertin at gmail.com
Fri Mar 11 17:45:41 UTC 2016
Hi,
I've been experimenting with ways to increase performance of LLVM+Clang builds. I'm getting an almost 15% decrease of compile times by building without RTTI and using "-O3 -march=native -mdynamic-no-pic".
However, when I try to build KDevelop against the resulting libclang.dylib, I'm getting the linker error below, about missing symbols that clearly are supposed to be provided by kdevelop, not llvm/clang.
I don't really understand how this could be related to an LLVM build without RTTI support (ditto for clang??) but even less how -mdynamic-no-pic could be involved.
My earlier question about this remained unanswered : does the clang parser (and/or kdevclangsupport) require RTTI support in LLVM and/or clang?
Thanks,
R.
cd /opt/local/var/macports/build/_opt_local_site-ports_kf5_kdevelop5/kf5-kdevelop-devel/work/build/languages/clang && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/kdevclangsupport.dir/link.txt --verbose=ON
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -O3 -march=native -g -DNDEBUG -stdlib=libc++ -std=c++0x -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=undefined-bool-conversion -Werror=tautological-undefined-compare -arch x86_64 -mmacosx-version-min=10.9 -bundle -Wl,-headerpad_max_install_names -multiply_defined suppress -Wl,-headerpad_max_install_names -o kdevclangsupport.so CMakeFiles/kdevclangsupport.dir/clangparsejob.cpp.o CMakeFiles/kdevclangsupport.dir/clangsupport.cpp.o CMakeFiles/kdevclangsupport.dir/clanghighlighting.cpp.o CMakeFiles/kdevclangsupport.dir/qrc_kdevclangsupport.cpp.o CMakeFiles/kdevclangsupport.dir/kdevclangsupport_automoc.cpp.o libKDevClangPrivate.25.dylib /opt/local/lib/libKDevPlatformLanguage.10.0.0.dylib /opt/local/lib/libKF5ThreadWeaver.5.19.0.dylib /opt/local/lib/libKDevPlatformProject.10.0.0.dylib /opt/local/lib/libKDevPlatformSerialization.10.0.0.dylib /opt/local/lib/libKDevPlatformUtil.10.0.0.dylib /opt/local/lib/libKF5ItemModels.5.19.0.dylib /opt/local/lib/libKDevPlatformInterfaces.10.0.0.dylib /opt/local/lib/libKF5TextEditor.5.19.0.dylib /opt/local/lib/libKF5Parts.5.19.0.dylib /opt/local/lib/libKF5KIOWidgets.5.19.0.dylib /opt/local/lib/libKF5KIOCore.5.19.0.dylib /opt/local/lib/libKF5JobWidgets.5.19.0.dylib /opt/local/lib/libKF5XmlGui.5.19.0.dylib /opt/local/libexec/qt5/Library/Frameworks/QtNetwork.framework/QtNetwork /opt/local/lib/libKF5TextWidgets.5.19.0.dylib /opt/local/lib/libKF5Completion.5.19.0.dylib /opt/local/lib/libKF5SonnetUi.5.19.0.dylib /opt/local/lib/libKF5ConfigWidgets.5.19.0.dylib /opt/local/lib/libKF5WidgetsAddons.5.19.0.dylib /opt/local/lib/libKF5Codecs.5.19.0.dylib /opt/local/lib/libKF5ConfigGui.5.19.0.dylib /opt/local/lib/libKF5Auth.5.19.0.dylib /opt/local/libexec/qt5/Library/Frameworks/QtDBus.framework/QtDBus /opt/local/libexec/qt5/Library/Frameworks/QtWidgets.framework/QtWidgets /opt/local/lib/libKF5Service.5.19.0.dylib /opt/local/libexec/qt5/Library/Frameworks/QtXml.framework/QtXml /opt/local/lib/libKF5CoreAddons.5.19.0.dylib /opt/local/libexec/qt5/Library/Frameworks/QtGui.framework/QtGui /opt/local/lib/libKF5ConfigCore.5.19.0.dylib /opt/local/lib/libKF5I18n.5.19.0.dylib /opt/local/libexec/llvm-3.8/lib/libclang.dylib /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/QtCore -Wl,-rpath,/opt/local/lib
Undefined symbols for architecture x86_64:
"KDEV_CLANG()", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
(anonymous namespace)::importedContextForPosition(QUrl const&, KTextEditor::Cursor const&) in clangsupport.cpp.o
"ClangIndex::translationUnitForUrl(KDevelop::IndexedString const&)", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
ClangSupport::documentActivated(KDevelop::IDocument*) in clangsupport.cpp.o
"ClangIndex::unpinTranslationUnitForUrl(KDevelop::IndexedString const&)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ClangIndex::pch(ClangParsingEnvironment const&)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ClangIndex::ClangIndex()", referenced from:
ClangSupport::ClangSupport(QObject*, QList<QVariant> const&) in clangsupport.cpp.o
"ClangIndex::~ClangIndex()", referenced from:
ClangSupport::ClangSupport(QObject*, QList<QVariant> const&) in clangsupport.cpp.o
ClangSupport::~ClangSupport() in clangsupport.cpp.o
"ClangUtils::rangeForIncludePathSpec(QString const&, KTextEditor::Range const&)", referenced from:
(anonymous namespace)::importedContextForPosition(QUrl const&, KTextEditor::Cursor const&) in clangsupport.cpp.o
"UnsavedFile::UnsavedFile(QString const&, QStringList const&)", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
QVector<UnsavedFile>::defaultConstruct(UnsavedFile*, UnsavedFile*) in clangparsejob.cpp.o
"ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ClangHelpers::isSource(QString const&)", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
"ClangHelpers::tuImports(CXTranslationUnitImpl*)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ParseSession::languageString()", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ParseSession::reparse(QVector<UnsavedFile> const&, ClangParsingEnvironment const&)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ParseSession::setData(QExplicitlySharedDataPointer<ParseSessionData> const&)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ParseSession::ParseSession(QExplicitlySharedDataPointer<ParseSessionData> const&)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ParseSession::~ParseSession()", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"SessionSettings::SessionSettings(QWidget*)", referenced from:
ClangSupport::configPage(int, QWidget*) in clangsupport.cpp.o
"ClangIntegration::DUChainUtils::findParseSessionData(KDevelop::IndexedString const&, KDevelop::IndexedString const&)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
ClangSupport::documentActivated(KDevelop::IDocument*) in clangsupport.cpp.o
"ClangIntegration::DUChainUtils::registerDUChainItems()", referenced from:
ClangSupport::ClangSupport(QObject*, QList<QVariant> const&) in clangsupport.cpp.o
"ClangIntegration::DUChainUtils::unregisterDUChainItems()", referenced from:
ClangSupport::~ClangSupport() in clangsupport.cpp.o
"ClangRefactoring::executeMoveIntoSourceAction()", referenced from:
ClangSupport::createActionsForMainWindow(Sublime::MainWindow*, QString&, KActionCollection&) in clangsupport.cpp.o
"ClangRefactoring::ClangRefactoring(QObject*)", referenced from:
ClangSupport::ClangSupport(QObject*, QList<QVariant> const&) in clangsupport.cpp.o
"ParseSessionData::ParseSessionData(QVector<UnsavedFile> const&, ClangIndex*, ClangParsingEnvironment const&, QFlags<ParseSessionData::Option>)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
ClangParseJob::createSessionData() const in clangparsejob.cpp.o
"ClangSettingsManager::self()", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
"ClangNavigationWidget::ClangNavigationWidget(KDevelop::DUChainPointer<MacroDefinition> const&, KDevelop::DocumentCursor const&)", referenced from:
ClangSupport::specialLanguageObjectNavigationWidget(QUrl const&, KTextEditor::Cursor const&) in clangsupport.cpp.o
"DocumentFinderHelpers::areBuddies(QUrl const&, QUrl const&)", referenced from:
ClangSupport::areBuddies(QUrl const&, QUrl const&) in clangsupport.cpp.o
non-virtual thunk to ClangSupport::areBuddies(QUrl const&, QUrl const&) in clangsupport.cpp.o
"DocumentFinderHelpers::buddyOrder(QUrl const&, QUrl const&)", referenced from:
ClangSupport::buddyOrder(QUrl const&, QUrl const&) in clangsupport.cpp.o
non-virtual thunk to ClangSupport::buddyOrder(QUrl const&, QUrl const&) in clangsupport.cpp.o
"DocumentFinderHelpers::mimeTypesList()", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
ClangSupport::ClangSupport(QObject*, QList<QVariant> const&) in clangsupport.cpp.o
ClangSupport::~ClangSupport() in clangsupport.cpp.o
"DocumentFinderHelpers::getPotentialBuddies(QUrl const&, bool)", referenced from:
ClangSupport::getPotentialBuddies(QUrl const&) const in clangsupport.cpp.o
non-virtual thunk to ClangSupport::getPotentialBuddies(QUrl const&) const in clangsupport.cpp.o
"AdaptSignatureAssistant::AdaptSignatureAssistant(KDevelop::ILanguageSupport*)", referenced from:
ClangSupport::ClangSupport(QObject*, QList<QVariant> const&) in clangsupport.cpp.o
"ClangParsingEnvironment::addDefines(QHash<QString, QString> const&)", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ClangParsingEnvironment::setQuality(ClangParsingEnvironment::Quality)", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
"ClangParsingEnvironment::addIncludes(QVector<KDevelop::Path> const&)", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ClangParsingEnvironment::setPchInclude(KDevelop::Path const&)", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ClangParsingEnvironment::setProjectPaths(QVector<KDevelop::Path> const&)", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
"ClangParsingEnvironment::setParserSettings(ParserSettings const&)", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
"ClangParsingEnvironment::setTranslationUnitUrl(KDevelop::IndexedString const&)", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
"ClangCodeCompletionModel::ClangCodeCompletionModel(ClangIndex*, QObject*)", referenced from:
ClangSupport::ClangSupport(QObject*, QList<QVariant> const&) in clangsupport.cpp.o
"ParseSession::data() const", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ParseSession::unit() const", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ParseSession::mainFile() const", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"MacroDefinition::isFunctionLike() const", referenced from:
ClangHighlighting::Instance::typeForDeclaration(KDevelop::Declaration*, KDevelop::DUContext*) const in clanghighlighting.cpp.o
"ClangSettingsManager::parserSettings(KDevelop::ProjectBaseItem*) const", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
"ClangSettingsManager::parserSettings(QString const&) const", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
"ClangParsingEnvironment::translationUnitUrl() const", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ClangPCH::mapIncludes(CXTranslationUnitImpl*) const", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ClangPCH::context() const", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"ClangPCH::mapFile(CXTranslationUnitImpl*) const", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"typeinfo for MacroDefinition", referenced from:
(anonymous namespace)::macroExpansionForPosition(QUrl const&, KTextEditor::Cursor const&) in clangsupport.cpp.o
ClangSupport::specialLanguageObjectNavigationWidget(QUrl const&, KTextEditor::Cursor const&) in clangsupport.cpp.o
ClangHighlighting::Instance::typeForDeclaration(KDevelop::Declaration*, KDevelop::DUContext*) const in clanghighlighting.cpp.o
"typeinfo for ClangParsingEnvironmentFile", referenced from:
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) in clangparsejob.cpp.o
"vtable for ClangParsingEnvironment", referenced from:
ClangParseJob::ClangParseJob(KDevelop::IndexedString const&, KDevelop::ILanguageSupport*) in clangparsejob.cpp.o
ClangParsingEnvironment::~ClangParsingEnvironment() in clangparsejob.cpp.o
ClangSupport::standardContext(QUrl const&, bool) in clangsupport.cpp.o
non-virtual thunk to ClangSupport::standardContext(QUrl const&, bool) in clangsupport.cpp.o
ClangParsingEnvironment::~ClangParsingEnvironment() in clangsupport.cpp.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [languages/clang/kdevclangsupport.so] Error 1
More information about the KDevelop-devel
mailing list