Bug 383786

Summary: Installation: CMake error when building from source on Ubuntu 16.04 LTS
Product: [Applications] umbrello Reporter: Robert Hairgrove <code>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: critical CC: code, ralf.habacker
Priority: NOR Keywords: triaged
Version: 2.22.90 (KDE Applications 17.07.90)   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Robert Hairgrove 2017-08-21 12:14:13 UTC
Couldn't find Umbrello 2.23.0 because there was only a link to "latest" on the Umbrello website (which is 2.22.90). So I extracted the sources, created the "build" folder ran the cmake command as listed in the "INSTALL" file from the build directory:

```cmake -DCMAKE_INSTALL_PREFIX=$HOME/umbrello -DCMAKE_BUILD_TYPE=Debug ../```

The error message was:

```CMake Error at CMakeLists.txt:172 (ki18n_wrap_ui):
  Unknown CMake command "ki18n_wrap_ui".```

Not sure what to do here since I don't usually compile anything with CMake.

The version of Umbrello in the Ubuntu packages is several years old, so I would like to use the latest version because a lot of the bugs I am seeing have apparently been fixed in the meantime.
Comment 1 Ralf Habacker 2017-08-21 14:31:41 UTC
(In reply to Robert Hairgrove from comment #0)
> Couldn't find Umbrello 2.23.0 because there was only a link to "latest" on
> the Umbrello website (which is 2.22.90). So I extracted the sources, created
> the "build" folder ran the cmake command as listed in the "INSTALL" file
> from the build directory:
> 
> ```cmake -DCMAKE_INSTALL_PREFIX=$HOME/umbrello -DCMAKE_BUILD_TYPE=Debug
> ../```
> 
> The error message was:
> 
> ```CMake Error at CMakeLists.txt:172 (ki18n_wrap_ui):
>   Unknown CMake command "ki18n_wrap_ui".```
I guess there are some dependencies missing. See https://umbrello.kde.org/installation.php#install-source-code-linux for further details. 

Also it is required to see all messages cmake displays on running because it may indicates what's going wrong.
Comment 2 Robert Hairgrove 2017-08-21 17:03:21 UTC
(In reply to Ralf Habacker from comment #1)
> (In reply to Robert Hairgrove from comment #0)
> I guess there are some dependencies missing. See
> https://umbrello.kde.org/installation.php#install-source-code-linux for
> further details. 
> 
> Also it is required to see all messages cmake displays on running because it
> may indicates what's going wrong.

Here is the complete cmake output after deleting the sources and extracting them again:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:30 (add_definitions):
  Policy CMP0005 is not set: Preprocessor definition values are now escaped
  automatically.  Run "cmake --help-policy CMP0005" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:176 (ki18n_wrap_ui):
  Unknown CMake command "ki18n_wrap_ui".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/bob/umbrello-2.22.90.4e6b85b87/umbrello/build/CMakeFiles/CMakeOutput.log".
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I didn't see anything unusual in the CMakeOutput.log file. The only thing I did differently was to use the command for compiling with Qt5/KF5. I have Qt 5.8.0, so that should work.
Comment 3 Robert Hairgrove 2017-08-21 17:08:22 UTC
(In reply to Robert Hairgrove from comment #2)
> I didn't see anything unusual in the CMakeOutput.log file. The only thing I
> did differently was to use the command for compiling with Qt5/KF5. I have Qt
> 5.8.0, so that should work.

My CMake version is 3.5.1, BTW.
Comment 4 Ralf Habacker 2017-08-21 18:31:14 UTC
(In reply to Robert Hairgrove from comment #3)
> (In reply to Robert Hairgrove from comment #2)
> > I didn't see anything unusual in the CMakeOutput.log file. The only thing I
> > did differently was to use the command for compiling with Qt5/KF5. I have Qt
> > 5.8.0, so that should work.

The missing macro is located in the ki18n development package which is part of kf5 (see https://cgit.kde.org/ki18n.git/tree/cmake/KF5I18NMacros.cmake). This indicates that you have no development packages of kf5 libraries installed. See https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/Install_the_dependencies for more information about the required dependencies.
Comment 5 Robert Hairgrove 2017-08-21 22:10:08 UTC
(In reply to Ralf Habacker from comment #4)
> The missing macro is located in the ki18n development package which is part
> of kf5 (see https://cgit.kde.org/ki18n.git/tree/cmake/KF5I18NMacros.cmake).
> This indicates that you have no development packages of kf5 libraries
> installed. See
> https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/
> Install_the_dependencies for more information about the required
> dependencies.

Ralf, thank you for your patience, but the issue seems to be more than that. I have kf5-dev packages already installed on my system. These are:

libkf5i18n-data
libkf5i18n-dev
libkf5i18n5
libkf5i18n5-dbg

Also, I have qtbase5-dev installed.

Still, cmake cannot kind the macro "ki18n_wrap_ui" anywhere.

Is it possible that Ubuntu is putting this somewhere where cmake cannot find it? I have Qt installed in a directory under my home directory, not in /usr or /usr/local ... I did find many Qt header files which make use of that macro.
Comment 6 Robert Hairgrove 2017-08-21 22:11:19 UTC
(In reply to Robert Hairgrove from comment #5)
> Still, cmake cannot kind the macro "ki18n_wrap_ui" anywhere.

Shouold be "find" ... not "kind"...
Comment 7 Ralf Habacker 2017-08-21 22:32:59 UTC
https://askubuntu.com/questions/912767/install-latest-umbrello-version mentions some packages required for compiling umbrello on ubuntu. May be this helps.
Comment 8 Robert Hairgrove 2017-08-22 09:39:21 UTC
(In reply to Ralf Habacker from comment #7)
> https://askubuntu.com/questions/912767/install-latest-umbrello-version
> mentions some packages required for compiling umbrello on ubuntu. May be
> this helps.

Sadly, it didn't help.

I have ki18n installed here:
/usr/lib/x86_64-linux-gnu/cmake/KF5I18n

In that folder, I have this:
KF5I18nConfig.cmake
KF5I18nConfigVersion.cmake
KF5I18NMacros.cmake
KF5I18nTargets.cmake
KF5I18nTargets-debian.cmake
kf5i18nuic.cmake
ts-pmap-compile.py

CMake should be able to find it, IMHO ...
Comment 9 Ralf Habacker 2017-08-22 20:51:12 UTC
(In reply to Robert Hairgrove from comment #8)
> (In reply to Ralf Habacker from comment #7)
> > https://askubuntu.com/questions/912767/install-latest-umbrello-version
> > mentions some packages required for compiling umbrello on ubuntu. May be
> > this helps.
> 
> Sadly, it didn't help.
> 
I following the steps mentioned at the first answer on a 16.04 vm. At step 6 I got a list of required but not installed packages. I did install then and umbrello build afterwards out the box.
Comment 10 Robert Hairgrove 2017-08-23 04:21:30 UTC
(In reply to Ralf Habacker from comment #9)
> I following the steps mentioned at the first answer on a 16.04 vm. At step 6
> I got a list of required but not installed packages. I did install then and
> umbrello build afterwards out the box.

I tried that too, but got this when I tried to download the sources:
~~~~~~~~
bob@my-laptop:~/Downloads/build$ dget http://archive.neon.kde.org/user/pool/main/u/umbrello/umbrello_17.04.1-0neon+16.04+build22.dsc
dget: retrieving http://archive.neon.kde.org/user/pool/main/u/umbrello/umbrello_17.04.1-0neon+16.04+build22.dsc
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1770  100  1770    0     0   6897      0 --:--:-- --:--:-- --:--:--  6914
dget: retrieving http://archive.neon.kde.org/user/pool/main/u/umbrello/umbrello_17.04.1.orig.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1608k  100 1608k    0     0  4443k      0 --:--:-- --:--:-- --:--:-- 4443k
dget: retrieving http://archive.neon.kde.org/user/pool/main/u/umbrello/umbrello_17.04.1-0neon+16.04+build22.debian.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9300  100  9300    0     0   127k      0 --:--:-- --:--:-- --:--:--  127k
umbrello_17.04.1-0neon+16.04+build22.dsc:
dscverify: umbrello_17.04.1-0neon+16.04+build22.dsc failed signature check:
gpg: no valid OpenPGP data found.
gpg: processing message failed: Unknown system error
Validation FAILED!!
Comment 11 Robert Hairgrove 2017-08-24 13:34:42 UTC
OK, after finding a Debian .deb package of umbrello with the latest version, I saw that I have all of the dependencies installed, but the versions are not new enough. I will probably not be able to upgrade because it would break other things on my system. Maybe I need to upgrade Ubuntu to 17.04, but I have 16.04 LTS which has longer support.

I am very confused about the way KDE programs are built and installed because it is so different from Ubuntu/Debian packaging. Most things I build from source use autotools, which I find much easier to follow if some dependency isn't installed. I remember the trouble I had trying to get kdenlive to work. It isn't much fun!
Comment 12 Andrew Crouthamel 2018-09-28 02:37:12 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Robert Hairgrove 2018-09-28 08:21:32 UTC
In the meantime, I have upgraded my system to Ubuntu 18.04.1 LTS and have not yet tried to install or build Umbrello on my system. So perhaps this should be closed now?
Comment 14 Ralf Habacker 2019-07-12 22:37:45 UTC
There is a snap package for umbrello at https://snapcraft.io/umbrello, which provides distribution independent installation.