Bug 424794 - Cannot build on Ubuntu 18.04 (#include <ThreadWeaver/Sequence> is not found)
Summary: Cannot build on Ubuntu 18.04 (#include <ThreadWeaver/Sequence> is not found)
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: installer/packages (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR critical
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-29 12:19 UTC by Robert Hairgrove
Modified: 2020-07-31 06:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.31.90 (KDE releases 20.07.90)


Attachments
CMake output log file (55.68 KB, text/x-log)
2020-07-29 12:19 UTC, Robert Hairgrove
Details
stdout.log from CMake on empty build directory (7.84 KB, text/plain)
2020-07-30 14:25 UTC, Robert Hairgrove
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Hairgrove 2020-07-29 12:19:51 UTC
Created attachment 130484 [details]
CMake output log file

SUMMARY
After installing all dependencies listed on the Umbrello webpage, CMake runs without error (logfile is included as an attachment).

Running "make" returns the following error:
===============
In file included from /usr/include/kdevplatform/language/backgroundparser/backgroundparser.h:31:0,
                 from /home/bob/code/src/umbrello/lib/kdevplatform/tests/testcore.cpp:29:
/usr/include/kdevplatform/language/backgroundparser/parsejob.h:28:10: fatal error: ThreadWeaver/Sequence: No such file or directory
 #include <ThreadWeaver/Sequence>
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
lib/kdevplatform/CMakeFiles/KDevTests.dir/build.make:62: recipe for target 'lib/kdevplatform/CMakeFiles/KDevTests.dir/tests/testcore.cpp.o' failed
make[2]: *** [lib/kdevplatform/CMakeFiles/KDevTests.dir/tests/testcore.cpp.o] Error 1
CMakeFiles/Makefile2:320: recipe for target 'lib/kdevplatform/CMakeFiles/KDevTests.dir/all' failed
make[1]: *** [lib/kdevplatform/CMakeFiles/KDevTests.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
===============================

However, the file is installed here:
/usr/include/KF5/ThreadWeaver/ThreadWeaver/Sequence

The offending #include directive is found in this file:
/usr/include/kdevplatform/language/backgroundparser/parsejob.h

STEPS TO REPRODUCE
1. Download Umbrello sources from https://invent.kde.org/sdk/umbrello (not "anongit") according to website instructions;
2. Install dependencies from Ubuntu repositories until CMake is satisfied;
3. Run "make".

OBSERVED RESULT
(see SUMMARY)

EXPECTED RESULT
no error

SOFTWARE/OS VERSIONS
Linux Ubuntu 18.04.4 LTS
KDE Plasma Version: ???
KDE Frameworks Version: ???
Qt Version: 5.44

ADDITIONAL INFORMATION
Installing via snap works, but I would like to build it from sources so that I can try to debug some issues (see latest mailing list archives).
Comment 1 Robert Hairgrove 2020-07-30 10:48:06 UTC
Seems like CMake is creating an extra ThreadWeaver subdirectory under /usr/include/KF5/ThreadWeaver?
Comment 2 Ralf Habacker 2020-07-30 11:43:33 UTC
(In reply to Robert Hairgrove from comment #1)
> Seems like CMake is creating an extra ThreadWeaver subdirectory under
> /usr/include/KF5/ThreadWeaver?

which is provided by the threadewever development package  
$ rpm -q -f /usr/include/KF5/ThreadWeaver/
threadweaver-devel-5.55.0-lp151.1.1.x86_64

This package also provides the associated cmake config files to support find_package(). 

grep -rn INCLUDE  /usr/lib64/cmake/KF5ThreadWeaver/KF5ThreadWeaverTargets.cmake
66:  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/KF5/ThreadWeaver;${_IMPORT_PREFIX}/include/KF5"

At least on opensuse leap 15.1 it includes the initial mentioned directoy and should be added to the compile line by default.

running 

make VERBOSE=1

gives some more hints which directories are included.
Comment 3 Ralf Habacker 2020-07-30 12:01:44 UTC
(In reply to Ralf Habacker from comment #2)
> (In reply to Robert Hairgrove from comment #1)
> > Seems like CMake is creating an extra ThreadWeaver subdirectory under
> > /usr/include/KF5/ThreadWeaver?
> 
> which is provided by the threadewever development package  
> $ rpm -q -f /usr/include/KF5/ThreadWeaver/
> threadweaver-devel-5.55.0-lp151.1.1.x86_64
> 
> This package also provides the associated cmake config files to support
> find_package(). 
> 
> grep -rn INCLUDE 
> /usr/lib64/cmake/KF5ThreadWeaver/KF5ThreadWeaverTargets.cmake
> 66:  INTERFACE_INCLUDE_DIRECTORIES
> "${_IMPORT_PREFIX}/include/KF5/ThreadWeaver;${_IMPORT_PREFIX}/include/KF5"
> 
> At least on opensuse leap 15.1 it includes the initial mentioned directoy
> and should be added to the compile line by default.
> 
> running 
> 
> make VERBOSE=1
> 
> gives some more hints which directories are included.

$~/src/umbrello-master-kf5-build/lib/kdevplatform> make tests/testcore.o VERBOSE=1
...
cd /home/xxx/src/umbrello-master-kf5-build/lib/kdevplatform && /usr/bin/g++  -DENABLE_PHP_IMPORT -DKCOREADDONS_LIB -DKDEVPHPPARSER_EXPORT="" -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/home/ralf.habacker/src/umbrello-master-kf5-build/lib/kdevplatform -I/home/ralf.habacker/src/umbrello-master/lib/kdevplatform -I/home/ralf.habacker/src/umbrello-master-kf5-build/lib/kdevplatform/KDevTests_autogen/include -I/home/ralf.habacker/src/umbrello-master/lib/kdev5-php/parser -I/home/ralf.habacker/src/umbrello-master-kf5-build/lib/kdev5-php/parser -I/home/ralf.habacker/src/umbrello-master/lib/kdevplatform/tests -I/usr/include/kdevelop-pg-qt -isystem /usr/include/kdevplatform -isystem /usr/include/KF5/KParts -isystem /usr/include/KF5 -isystem /usr/include/KF5/KIOWidgets -isystem /usr/include/KF5/KIOCore -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/KF5/KService -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtDBus -isystem /usr/include/KF5/KJobWidgets -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/KF5/KCompletion -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KXmlGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/KF5/KAuth -isystem /usr/include/KF5/KTextWidgets -isystem /usr/include/KF5/SonnetUi -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5/KTextEditor -isystem /usr/include/KF5/ThreadWeaver  -fno-delete-null-pointer-checks -Wno-deprecated-declarations -std=c++11 -std=c++0x -fno-operator-names -fno-exceptions -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  -Wlogical-op -g -fvisibility=hidden -fvisibility-inlines-hidden   -fPIC -o CMakeFiles/KDevTests.dir/tests/testcore.cpp.o -c /home/ralf.habacker/src/umbrello-master/lib/kdevplatform/tests/testcore.cpp

This command line has 

-isystem
/usr/include/KF5/ThreadWeaver

included.

As the library KDevTests, which testcore.o is added, only links to KDev::Shell, the issue seems to be located in the cmake support for that library.
It would be for interest, which kdevplatform is used to compile umbrello

With 

$: rpm -q  kdevplatform-devel
kdevplatform-devel-5.3.2-lp151.1.3.x86_64

it works.
Comment 4 Robert Hairgrove 2020-07-30 13:21:06 UTC
(In reply to Ralf Habacker from comment #3)
> (In reply to Ralf Habacker from comment #2)
> > (In reply to Robert Hairgrove from comment #1)
> > > Seems like CMake is creating an extra ThreadWeaver subdirectory under
> > > /usr/include/KF5/ThreadWeaver?
> > 
> > which is provided by the threadewever development package  
> > $ rpm -q -f /usr/include/KF5/ThreadWeaver/
> > threadweaver-devel-5.55.0-lp151.1.1.x86_64
> > 
> > This package also provides the associated cmake config files to support
> > find_package(). 
> > 
> > grep -rn INCLUDE 
> > /usr/lib64/cmake/KF5ThreadWeaver/KF5ThreadWeaverTargets.cmake
> > 66:  INTERFACE_INCLUDE_DIRECTORIES
> > "${_IMPORT_PREFIX}/include/KF5/ThreadWeaver;${_IMPORT_PREFIX}/include/KF5"
> > 
> > At least on opensuse leap 15.1 it includes the initial mentioned directoy
> > and should be added to the compile line by default.
> > 
> > running 
> > 
> > make VERBOSE=1
> > 
> > gives some more hints which directories are included.
> 
> $~/src/umbrello-master-kf5-build/lib/kdevplatform> make tests/testcore.o
> VERBOSE=1
>
> ...8<...snip...
> 
> This command line has 
> 
> -isystem
> /usr/include/KF5/ThreadWeaver
> 
> included.
> 
> As the library KDevTests, which testcore.o is added, only links to
> KDev::Shell, the issue seems to be located in the cmake support for that
> library.
> It would be for interest, which kdevplatform is used to compile umbrello
> 
> With 
> 
> $: rpm -q  kdevplatform-devel
> kdevplatform-devel-5.3.2-lp151.1.3.x86_64
> 
> it works.

Here is the CMake command I used:

cmake -DCMAKE_INSTALL_PREFIX=$HOME/umbrello -DBUILD_KF5=1 -DCMAKE_BUILD_TYPE=Debug ../

Let me know if I should add any additional information (I included the CMake log file in my initial report).
Comment 5 Ralf Habacker 2020-07-30 13:40:09 UTC
(In reply to Robert Hairgrove from comment #4)
> (In reply to Ralf Habacker from comment #3)
> > (In reply to Ralf Habacker from comment #2)
> > > (In reply to Robert Hairgrove from comment #1)
> > > > Seems like CMake is creating an extra ThreadWeaver subdirectory under
> > > > /usr/include/KF5/ThreadWeaver?
> > > 
> > > which is provided by the threadewever development package  
> > > $ rpm -q -f /usr/include/KF5/ThreadWeaver/
> > > threadweaver-devel-5.55.0-lp151.1.1.x86_64
> > > 
> > > This package also provides the associated cmake config files to support
> > > find_package(). 
> > > 
> > > grep -rn INCLUDE 
> > > /usr/lib64/cmake/KF5ThreadWeaver/KF5ThreadWeaverTargets.cmake
> > > 66:  INTERFACE_INCLUDE_DIRECTORIES
> > > "${_IMPORT_PREFIX}/include/KF5/ThreadWeaver;${_IMPORT_PREFIX}/include/KF5"
> > > 
> > > At least on opensuse leap 15.1 it includes the initial mentioned directoy
> > > and should be added to the compile line by default.
> > > 
> > > running 
> > > 
> > > make VERBOSE=1
> > > 
> > > gives some more hints which directories are included.
> > 
> > $~/src/umbrello-master-kf5-build/lib/kdevplatform> make tests/testcore.o
> > VERBOSE=1
> >
> > ...8<...snip...
> > 
> > This command line has 
> > 
> > -isystem
> > /usr/include/KF5/ThreadWeaver
> > 
> > included.
> > 
> > As the library KDevTests, which testcore.o is added, only links to
> > KDev::Shell, the issue seems to be located in the cmake support for that
> > library.
> > It would be for interest, which kdevplatform is used to compile umbrello
> > 
> > With 
> > 
> > $: rpm -q  kdevplatform-devel
> > kdevplatform-devel-5.3.2-lp151.1.3.x86_64
> > 
> > it works.
> 
> Here is the CMake command I used:
> 
> cmake -DCMAKE_INSTALL_PREFIX=$HOME/umbrello -DBUILD_KF5=1
> -DCMAKE_BUILD_TYPE=Debug ../
> 
> Let me know if I should add any additional information (I included the CMake
> log file in my initial report).
Unfortunally it does not include the versions of the detected packages, which is available with running

cmake ... > stdout.log

on a empty build dir.

Can you confirm that you have kdevplatform and kdevelop-dev 5.2.1 installed as indicated at https://packages.ubuntu.com/bionic/kdevplatform-dev and https://packages.ubuntu.com/bionic/kdevelop-dev ?
Comment 6 Robert Hairgrove 2020-07-30 14:25:55 UTC
Created attachment 130517 [details]
stdout.log from CMake on empty build directory
Comment 7 Robert Hairgrove 2020-07-30 14:27:03 UTC
Yes, the installed versions of kdevelop and kdevplatform are 5.2.1.
Comment 8 Ralf Habacker 2020-07-30 14:48:30 UTC
I can confirm that the required path is not added to the compile line probably caused by a hidden issue in the kdeplatform and/or kdevelop package.s

A workaround is configure the build with 

cmake -DINSTALL_PATH=/usr/include/KF5/ThreadWeaver <source-dir>
Comment 9 Ralf Habacker 2020-07-30 15:11:08 UTC
Git commit b479b3fc1f64cf83ddf2cf9eb91e43296e055cfb by Ralf Habacker.
Committed on 30/07/2020 at 15:10.
Pushed by habacker into branch 'release/20.08'.

cmake: Fix build issue with kdevelop 5.2.1 on Ubuntu 18.04

Add KF5::ThreadWeaver as a dependency to KDevTest target.

Because kdevelop 5.2.1 uses include headers from the Threadweaver
library in it's public api, but did not add KF5::ThreadWeaver as
a public dependency, clients get an error when compiling.
FIXED-IN:2.31.90 (KDE releases 20.07.90)

M  +2    -0    lib/kdevplatform/CMakeLists.txt

https://invent.kde.org/sdk/umbrello/commit/b479b3fc1f64cf83ddf2cf9eb91e43296e055cfb
Comment 10 Robert Hairgrove 2020-07-30 19:35:51 UTC
(In reply to Ralf Habacker from comment #8)
> I can confirm that the required path is not added to the compile line
> probably caused by a hidden issue in the kdeplatform and/or kdevelop
> package.s
> 
> A workaround is configure the build with 
> 
> cmake -DINSTALL_PATH=/usr/include/KF5/ThreadWeaver <source-dir>

Would this be equivalent to:
cmake -DINSTALL_PATH=/usr/include/KF5/ThreadWeaver ../

?

Thanks for the quick replies!
Comment 11 Ralf Habacker 2020-07-31 06:22:24 UTC
(In reply to Robert Hairgrove from comment #10)
> Would this be equivalent to:
> cmake -DINSTALL_PATH=/usr/include/KF5/ThreadWeaver ../

yes, if umbrello source is located in ../.

BTW: a fix has been applied to git branch release/20.08, so you may clone the git repo from https://invent.kde.org/sdk/umbrello to get up to date sources.