Building KDevelop/KDevPlatform with clang?

Milian Wolff mail at milianw.de
Mon Jan 13 21:24:23 UTC 2014


On Monday 13 January 2014 20:19:14 Andreas Pakulat wrote:
> Hi,
> 
> On Mon, Jan 13, 2014 at 11:47 AM, Milian Wolff <mail at milianw.de> wrote:
> > On Sunday 12 January 2014 18:45:31 Andreas Pakulat wrote:
> > > Hi,
> > > 
> > > On Sat, Jan 11, 2014 at 2:23 PM, Milian Wolff <mail at milianw.de> wrote:
> > > > On Saturday 11 January 2014 00:33:18 Andreas Pakulat wrote:
> > > > > Hi,
> > > > > 
> > > > > since I recall Milian bringing up one or two problems with the KDE
> > 
> > cmake
> > 
> > > > > scripts and clang I'm wondering wether those are resolved for KDE
> > 
> > 4.113
> > 
> > > > > already? I happened to try out clang just earlier today and
> > > > > instantly
> > > > > ran
> > > > 
> > > > > into multiple problems in kdevplatform (while kate built just fine):
> > > > I'm building KDev* with clang & ccache on my laptop just fine. What
> > 
> > clang
> > 
> > > > version do you use? Could you try to run make VERBOSE=1 and verify
> > > > that
> > > > there
> > > > is _no_ trace of -fdelayed-template-parsing ? That could explain at
> > 
> > least
> > 
> > > > some
> > > > of the STL issues below.
> > > > 
> > > > Generally, what verison of GCC & clang do you use? I have 4.8.2 and
> > > > 3.3
> > > > respectively.
> > > 
> > > Similar versions here, I'd tried to pass -fno-delayed-template-parsing
> > 
> > but
> > 
> > > that didn't help. I've switches to libc++ for now for building
> > 
> > kdevplatform.
> > 
> > How does make invoke clang for you? Does it pass the -fdelayed-template-
> > parsing? Or not?
> 
> ninja calls (for example):
> 
> FAILED: /usr/bin/clang++   -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=17
> -DKDE_DEFAULT_DEBUG_AREA=9505 -DKDE_DEPRECATED_WARNINGS
> -DMAKE_KDEVPLATFORMLANGUAGE_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_STL
> -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS
> -DQURL_NO_CAST_FROM_QSTRING -D_BSD_SOURCE -D_REENTRANT -D_XOPEN_SOURCE=500
> -pedantic -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align
> -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security
> -Woverloaded-virtual -fno-exceptions -DQT_NO_EXCEPTIONS -fno-common
> -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden
> -fdelayed-template-parsing -Wno-return-type-c-linkage -std=c++11 -g -O2
> -fno-inline -fPIC -Ilanguage -I/home/andreas/src/kdevplatform/language
> -I/home/andreas/src/kdevplatform -I. -I/home/andreas/src/kdevplatform/util
> -I/usr/include/KDE -I/usr/include/qt4/phonon
> -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtXml
> -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools
> -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtSql
> -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript
> -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork
> -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtDesigner
> -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4/QtDBus
> -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtGui
> -I/usr/include/qt4/QtCore -I/usr/include/qt4/Qt
> -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4
> -I/home/andreas/grantlee/include    -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
> -D_FILE_OFFSET_BITS=64 -MMD -MT
> language/CMakeFiles/kdevplatformlanguage.dir/backgroundparser/parsejob.cpp.o
> -MF
> "language/CMakeFiles/kdevplatformlanguage.dir/backgroundparser/parsejob.cpp.
> o.d" -o
> language/CMakeFiles/kdevplatformlanguage.dir/backgroundparser/parsejob.cpp.o
> -c /home/andreas/src/kdevplatform/language/backgroundparser/parsejob.cpp
> 
> So yes, -fdelayed-template-parsing is included there (didn't spot this the
> first time around). As I said this is kdelibs 4.11.3 and cmake 2.8.12.1. I
> had tried to build with passing -fno-delayed-template-parsing through
> CMAKE_CXX_FLAGS but that didn't work the last time around. It seems the
> flag comes from FindKDE4Internal.cmake and I recall that you opened one or
> more review requests for kdelibs to fix such things related to building
> with clang.

For now, just edit your FindKDE4Internal.cmake and strip out the line which 
adds -fdelayed-template-parsing. Apparently that was only fixed for 4.12 which 
I run.

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de


More information about the KDevelop-devel mailing list