v5.1.4/5.2 problems parsing its own code - due to the kdevplatform merge and reorganisation?

René J.V. Bertin rjvbertin at gmail.com
Mon Sep 18 08:41:59 UTC 2017


On Monday September 18 2017 01:31:49 Alexander Zhigalin wrote:
>I'm having the same issue but it behaves correctly until I make any edit and then it breaks and remain broken until I clear the cache...

Whew, so it's not just me missing something. 

I even tried creating a whole new session yesterday. At first I thought it had worked when I opened one of the files with the errors that just don't make sense. Until I reloaded the file, without even editing it. (Hitting the problem reporter's reload button doesn't always seem to trigger a reparse anymore.)

I checked if this was related to 54a8aa75f94e750bb303f6fa5eae6475996c0542 but the situation actually seemed worse before that commit (hard to quantify of course).

I'm beginning to think though that this is related to the build tree reorganisation and possibly even more to the embedding of KDevPlatform. Because even if I *can* build I do see errors much more regularly when I do incremental or partial builds, esp. the kind where you chdir into a subdirectory (say build/plugins/cmake and do a make in order to rebuild just that part plus any of its dependencies that need rebuilding. That's always worked reliably with cmake-based projects for me but with the new KDevelop tree I find I often have to rerun cmake manually and then do a build from the toplevel build.dir.

In the example below I chdir into that build.dir subfolder through a symlink (the build.dir has a much deeper path, don't ask :-/). Evidently make is being executed in the actual directory, as shown by the output from `pwd` just underneath the `CD` line.
Notice though how the failing build of iplugin.cpp uses search paths that include the link that don't work with the relative include paths generated by the moc compiler. I have no clue how this could happen, I have asked about it on the CMake ML too.

%> ls -l kdevd-lnx-work
lrwxrwxrwx 1 bertin bertin 92 Sep  5 15:18 kdevld-lnx-work -> /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work
%> where CD
CD is aliased to (cd  !:^ ; !:2*)
%> CD kdevld-lnx-work/build/plugins/ wmake
### now in /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/plugins
### make -w
### Sun Sep 17 20:32:06 CEST 2017

make: Entering directory `/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/plugins'
<SNIP>
[  0%] Building CXX object kdevplatform/interfaces/CMakeFiles/KDevPlatformInterfaces.dir/iplugin.cpp.o
cd /home/bertin/work/src/Scratch/KDE/KF5/kdevld-lnx-work/build/kdevplatform/interfaces && /opt/local/bin/ccache /opt/local/bin/clang++-mp-4.0  -DKCOREADDONS_LIB -DKDevPlatformInterfaces_EXPORTS -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050500 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_XML_LIB -DTRANSLATION_DOMAIN=\"kdevplatform\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/home/bertin/work/src/Scratch/KDE/KF5/kdevld-lnx-work/build/kdevplatform/interfaces -I/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/interfaces -I/home/bertin/work/src/Scratch/KDE/KF5/kdevld-lnx-work/build/kdevplatform/interfaces/KDevPlatformInterfaces_autogen/include -I/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5 -I/home/bertin/work/src/Scratch/KDE/KF5/kdevld-lnx-work/build -I/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform -I/home/bertin/work/src/Scratch/KDE/KF5/kdevld-lnx-work/build/kdevplatform -isystem /opt/local/include/KF5/KParts -isystem /opt/local/include/KF5 -isystem /opt/local/include/KF5/KIOWidgets -isystem /opt/local/include/KF5/KIOCore -isystem /opt/local/include/KF5/KCoreAddons -isystem /opt/local/include/qt5 -isystem /opt/local/include/qt5/QtCore -isystem /opt/local/share/qt5/mkspecs/linux-g++-64 -isystem /opt/local/include/KF5/KService -isystem /opt/local/include/KF5/KConfigCore -isystem /opt/local/include/KF5/KJobWidgets -isystem /opt/local/include/qt5/QtWidgets -isystem /opt/local/include/qt5/QtGui -isystem /opt/local/include/qt5/QtNetwork -isystem /opt/local/include/KF5/KCompletion -isystem /opt/local/include/KF5/KWidgetsAddons -isystem /opt/local/include/KF5/KXmlGui -isystem /opt/local/include/qt5/QtDBus -isystem /opt/local/include/qt5/QtXml -isystem /opt/local/include/KF5/KConfigWidgets -isystem /opt/local/include/KF5/KCodecs -isystem /opt/local/include/KF5/KConfigGui -isystem /opt/local/include/KF5/KAuth -isystem /opt/local/include/KF5/KTextWidgets -isystem /opt/local/include/KF5/SonnetUi -isystem /opt/local/include/KF5/KI18n -isystem /opt/local/include/KF5/KTextEditor  -Ofast -g -DNDEBUG -std=c++11 -m64 -std=c++0x -fno-operator-names -fno-exceptions -DQT_NO_EXCEPTIONS -Wno-gnu-zero-variadic-macro-arguments -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -Wno-missing-field-initializers -Werror=undefined-bool-conversion -Werror=tautological-undefined-compare -Wdocumentation -Wno-gnu-zero-variadic-macro-arguments -pedantic -fPIC -std=gnu++11 -o CMakeFiles/KDevPlatformInterfaces.dir/iplugin.cpp.o -c /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/interfaces/iplugin.cpp
In file included from /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/interfaces/iplugin.cpp:207:
/home/bertin/work/src/Scratch/KDE/KF5/kdevld-lnx-work/build/kdevplatform/interfaces/KDevPlatformInterfaces_autogen/include/moc_iplugin.cpp:9:10: fatal error: 
      '../../../../../../kdevelop-git-5/kdevplatform/interfaces/iplugin.h' file not found
#include "../../../../../../kdevelop-git-5/kdevplatform/interfaces/iplugin.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [kdevplatform/interfaces/CMakeFiles/KDevPlatformInterfaces.dir/iplugin.cpp.o] Error 1



More information about the KDevelop-devel mailing list