#36123 closed defect (fixed)
kdevelop fails to build with clang
Reported by: | mail.pourri@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | clang | Cc: | NicosPavlov, ryandesign (Ryan Carsten Schmidt) |
Port: | kdevelop |
Description (last modified by mf2k (Frank Schima))
The log shows:
cmake -E cmake_link_script CMakeFiles/kdev4cppduchain.dir/link.txt --verbose=1 /usr/bin/clang++ -Wno-reserved-user-defined-literal -stdlib=libc++ -fno-common -O3 -DNDEBUG -DQT_NO_DEBUG -arch x86_64 -shared -single_module -multiply_defined suppress -arch x86_64 -o ../../../lib/libkdev4cppduchain.dylib -install_name /opt/local/lib/libkdev4cppduchain.dylib CMakeFiles/kdev4cppduchain.dir/kdev4cppduchain_automoc.o CMakeFiles/kdev4cppduchain.dir/adlhelper.o CMakeFiles/kdev4cppduchain.dir/sourcemanipulation.o CMakeFiles/kdev4cppduchain.dir/missingdeclarationtype.o CMakeFiles/kdev4cppduchain.dir/missingdeclarationproblem.o CMakeFiles/kdev4cppduchain.dir/missingdeclarationassistant.o CMakeFiles/kdev4cppduchain.dir/contextbuilder.o CMakeFiles/kdev4cppduchain.dir/declarationbuilder.o CMakeFiles/kdev4cppduchain.dir/typebuilder.o CMakeFiles/kdev4cppduchain.dir/usebuilder.o CMakeFiles/kdev4cppduchain.dir/cppeditorintegrator.o CMakeFiles/kdev4cppduchain.dir/dumpchain.o CMakeFiles/kdev4cppduchain.dir/cpptypes.o CMakeFiles/kdev4cppduchain.dir/ptrtomembertype.o CMakeFiles/kdev4cppduchain.dir/dumptypes.o CMakeFiles/kdev4cppduchain.dir/environmentmanager.o CMakeFiles/kdev4cppduchain.dir/cppduchain.o CMakeFiles/kdev4cppduchain.dir/templateparameterdeclaration.o CMakeFiles/kdev4cppduchain.dir/qtfunctiondeclaration.o CMakeFiles/kdev4cppduchain.dir/qpropertydeclaration.o CMakeFiles/kdev4cppduchain.dir/cppducontext.o CMakeFiles/kdev4cppduchain.dir/typeutils.o CMakeFiles/kdev4cppduchain.dir/templatedeclaration.o CMakeFiles/kdev4cppduchain.dir/cpppreprocessenvironment.o CMakeFiles/kdev4cppduchain.dir/expressionparser.o CMakeFiles/kdev4cppduchain.dir/expressionvisitor.o CMakeFiles/kdev4cppduchain.dir/typeconversion.o CMakeFiles/kdev4cppduchain.dir/overloadresolution.o CMakeFiles/kdev4cppduchain.dir/viablefunctions.o CMakeFiles/kdev4cppduchain.dir/overloadresolutionhelper.o CMakeFiles/kdev4cppduchain.dir/name_visitor.o CMakeFiles/kdev4cppduchain.dir/type_visitor.o CMakeFiles/kdev4cppduchain.dir/builtinoperators.o CMakeFiles/kdev4cppduchain.dir/expressionevaluationresult.o CMakeFiles/kdev4cppduchain.dir/navigation/navigationwidget.o CMakeFiles/kdev4cppduchain.dir/navigation/declarationnavigationcontext.o CMakeFiles/kdev4cppduchain.dir/navigation/includenavigationcontext.o CMakeFiles/kdev4cppduchain.dir/navigation/macronavigationcontext.o /opt/local/lib/libkdevplatformlanguage.5.0.0.dylib /opt/local/lib/libkdevplatforminterfaces.5.0.0.dylib /opt/local/lib/libkdevplatformutil.5.0.0.dylib ../../../lib/libkdev4cppparser.dylib /opt/local/lib/libktexteditor.4.8.0.dylib ../../../lib/libkdev4cpprpp.dylib /opt/local/lib/libkdevplatformlanguage.5.0.0.dylib /opt/local/lib/libkdevplatformutil.5.0.0.dylib /opt/local/lib/libkdevplatforminterfaces.5.0.0.dylib /opt/local/lib/libktexteditor.4.8.0.dylib /opt/local/lib/libkparts.4.8.0.dylib /opt/local/lib/libkio.5.8.0.dylib /opt/local/lib/libQtNetwork.dylib /opt/local/lib/libQtXml.dylib /opt/local/lib/libnepomukutils.4.8.0.dylib /opt/local/lib/libnepomuk.4.8.0.dylib /opt/local/lib/libkdeui.5.8.0.dylib /opt/local/lib/libQtGui.dylib /opt/local/lib/libQtSvg.dylib /opt/local/lib/libsoprano.dylib /opt/local/lib/libkdecore.5.8.0.dylib /opt/local/lib/libQtCore.dylib /opt/local/lib/libQtDBus.dylib -framework Carbon Undefined symbols for architecture x86_64: "Utils::BasicSetRepository::createSet(std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int> > const&)", referenced from: Utils::StorableSet<rpp::pp_macro, Cpp::MacroIndexConversion, Cpp::StaticMacroSetRepository, true, Cpp::StaticMacroSetRepository::Locker>::StorableSet(std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int> > const&) in environmentmanager.o Utils::StorableSet<KDevelop::IndexedString, Cpp::IndexedStringConversion, Cpp::StaticStringSetRepository, true, Cpp::StaticStringSetRepository::Locker>::StorableSet(std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int> > const&) in environmentmanager.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've tried to build too using gcc with that command "sudo port clean kdevelop && sudo port install kdevelop configure.compiler=gcc" but it also fail with similar undefined symbol errors on different files.
Attachments (2)
Change History (13)
comment:1 Changed 12 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|
comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | nicos@… ryandesign@… added |
---|---|
Keywords: | kdevelop mountain lion removed |
Port: | kdevelop added |
Resolution: | → fixed |
Status: | new → closed |
Summary: | kdevelop fails to build on Mountain Lion → kdevelop fails to build with clang |
Remember to fill in the Port field properly and to Cc the maintainer of that port.
On my system, switching from clang to llvm-gcc did in fact fix the problem. So that's how I fixed it in r97737.
Changed 12 years ago by mail.pourri@…
comment:3 Changed 12 years ago by mail.pourri@…
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It doesn't work for me at all, even with the latest port revision. Please find the attached main.log file I currently get with llvm-gcc that was selected by default.
BTW, I've called "sudo port kdevelop clean" between retries.
comment:4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
:debug:main Skipping completed org.macports.configure (kdevelop)
This was not a clean attempt. Please run "sudo port clean kdevelop" and then try again, and if it fails again attach the new main.log.
comment:5 Changed 12 years ago by mail.pourri@…
MacBook-Pro-de-Cyril:~ cyril$ sudo port clean kdevelop Password: ---> Cleaning kdevelop MacBook-Pro-de-Cyril:~ cyril$ sudo port clean kdevelop ---> Cleaning kdevelop MacBook-Pro-de-Cyril:~ cyril$ sudo port clean kdevelop ---> Cleaning kdevelop MacBook-Pro-de-Cyril:~ cyril$ sudo port clean kdevelop ---> Cleaning kdevelop MacBook-Pro-de-Cyril:~ cyril$ sudo port clean kdevelop ---> Cleaning kdevelop MacBook-Pro-de-Cyril:~ cyril$ sudo port install kdevelop ---> Computing dependencies for kdevelop ---> Fetching archive for kdevelop ---> Attempting to fetch kdevelop-4.3.1_2.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/kdevelop ---> Attempting to fetch kdevelop-4.3.1_2.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/kdevelop ---> Attempting to fetch kdevelop-4.3.1_2.darwin_12.x86_64.tbz2 from http://packages.macports.org/kdevelop ---> Fetching distfiles for kdevelop ---> Verifying checksum(s) for kdevelop ---> Extracting kdevelop ---> Applying patches to kdevelop ---> Configuring kdevelop ---> Building kdevelop Error: org.macports.build for port kdevelop returned: command execution failed Please see the log file for port kdevelop for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_kdevelop/kdevelop/main.log To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port kdevelop failed
Changed 12 years ago by mail.pourri@…
Attachment: | main.2.log added |
---|
Last main.log from the output above
comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Thanks. What version of Xcode do you have? Are the command line tools up to date? (Xcode > Preferences > Downloads)
comment:7 Changed 12 years ago by mail.pourri@…
XCode 4.4 (downloaded 4 days ago from Apple's website). There is no new update for command line tools (installed) on the Preferences/Downloads dialog.
I must say that I've built all the other dependencies with no issue except for kde4libs, but the fix was easy by patching 3 lines in HashSet.h. This one is more painful.
comment:8 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Do you mean 4.4? or 4.4.1 (released August 7)?
As you know the kdelibs4 issue was already fixed; see #34378.
comment:10 Changed 12 years ago by NicosPavlov
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Sorry I did not answer yet to this ticket, but I did not see what to add as I did not understand the issue. I could indeed reproduce the problems (both with clang and llvm). It took me a while, but I think I found the problem, which was that kdevplatform was not building its code with libc++0x, so that kdevelop was not finding symbols afterwards. This should be fixed in r98077, along with r98078 which revbumps kdevelop, with an improvement of consistency.
Please attach the complete main.log file.
In the future, please use WikiFormatting, fill in the Port field of the failed port and Cc the port maintainer(s).