This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Compiling Krita-Posted wrong forum-please move

Tags: None
(comma "," separated)
User avatar
edgarejm
Registered Member
Posts
50
Karma
0
OS
I'm following David Revoy's tutorial on how to compile Krita. I'm currently stuck at configuring the build environment. When I was configuring the build environment, I ran into this problem:
Code: Select all
Old KConfig (< 5.24.0) found.
CMake Error at CMakeLists.txt:231 (find_package):
  Could not find a configuration file for package "Qt5" that is compatible
  with requested version "5.6.0".

  The following configuration files were considered but not accepted:

    /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake, version: 5.5.1



-- Configuring incomplete, errors occurred!
See also "/home/edgarej/krita/build/CMakeFiles/CMakeOutput.log".


Now this is the part that I think I made my mistake At first I thought I just needed to update another package, so I went over to the qt website: https://www.qt.io/developers/ and downloaded qt5.8. The linux installer installed the program in my home directory. I don't remember if I ran the configure code again (I don't think I did - I was multitasking so I don't remember), but I do know that at some point in time this morning I read a comment by Lauren in David Revoy's comment section to use this qt launchpad site instead: https://launchpad.net/~beineri/+archive/ubuntu/opt-qt571-xenial. Silly me installed this version too. So now I think I have two versions of qt, qt 5.7 installed in root, qt 5.8 installed in home.

When I ran configure again and ran into the problem below;

Code: Select all
CMake Error at /opt/qt57/lib/cmake/Qt5/Qt5Config.cmake:26 (find_package):
  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:231 (find_package)


I did a search for the cmake file and found it in the qt5.8 directory, not the qt57 that cmake is clearly using.

Now I don't know how to proceed, cause even when I added -DCMAKE_PREFIX_PATH= pointing to the qt5.8 cmake version, the error above keeps spitting out. Any help would be great. Thanks.


User avatar
edgarejm
Registered Member
Posts
50
Karma
0
OS
Farid010
Registered Member
Posts
5
Karma
1
I have the same problem when trying to build Krita on Ubuntu 16.04. I get the same error message:

Code: Select all
Old KConfig (< 5.24.0) found.
CMake Error at CMakeLists.txt:231 (find_package):
  Could not find a configuration file for package "Qt5" that is compatible
  with requested version "5.6.0".

  The following configuration files were considered but not accepted:

    /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake, version: 5.5.1



-- Configuring incomplete, errors occurred!
See also "/home/<MyUserName>/Documents/Krita/build/CMakeFiles/CMakeOutput.log".


Does anyone know how to solve this problem?
Thank you in advance
User avatar
scottpetrovic
Registered Member
Posts
520
Karma
4
OS
The error states that the version of Qt is too old to build with, so that is what is going on. Ubuntu 16.04 is too old. It is probably going to be easiest to get 16.10 and build from that. That should work
Farid010
Registered Member
Posts
5
Karma
1
Thank you scottpetrovic. I solved my problem.

For those who have the same problem:
Check if you have installed the latest version of Qt. Then from the qtcreator, choose menu Tools -> Options -> Build & Run and then select "Qt versions" tab. In this tab, you can see the qt versions installed in your computer. For me it was like this:
Code: Select all
Qt 5.8.0 GCC 64bit
Qt 4.8.7 in PATH (qt4)
Qt 4.8.7 in PATH (System)
Qt 5.5.1 in PATH (qt5)

If you also have several qt versions (the latest one and an older one), follow the instructions.
You have to change the "Qt5ConfigVersion.cmake". In a terminal type:
Code: Select all
cd /usr/lib/x86_64-linux-gnu/cmake/Qt5
gksudo gedit Qt5ConfigVersion.cmake

In the opened file, the fist line reads as:
Code: Select all
set(PACKAGE_VERSION 5.5.1)

I simply changed the version to 5.6.0 and it worked!

It is not the best solution, but at least it does the job.
beojan
Registered Member
Posts
9
Karma
0
OS
Farid010 wrote:Thank you scottpetrovic. I solved my problem.

For those who have the same problem:
Check if you have installed the latest version of Qt. Then from the qtcreator, choose menu Tools -> Options -> Build & Run and then select "Qt versions" tab. In this tab, you can see the qt versions installed in your computer. For me it was like this:
Code: Select all
Qt 5.8.0 GCC 64bit
Qt 4.8.7 in PATH (qt4)
Qt 4.8.7 in PATH (System)
Qt 5.5.1 in PATH (qt5)

If you also have several qt versions (the latest one and an older one), follow the instructions.
You have to change the "Qt5ConfigVersion.cmake". In a terminal type:
Code: Select all
cd /usr/lib/x86_64-linux-gnu/cmake/Qt5
gksudo gedit Qt5ConfigVersion.cmake

In the opened file, the fist line reads as:
Code: Select all
set(PACKAGE_VERSION 5.5.1)

I simply changed the version to 5.6.0 and it worked!

It is not the best solution, but at least it does the job.


No, your solution tricks the build system into building with Qt 5.5 by pretending it's Qt 5.6. You need to point CMake to Qt 5.8 using the `CMAKE_PREFIX_PATH` environment variable.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
there is also the OVERRIDE_QT_VERSION cmake option to build with Qt < 5.6. Though, in fact, Qt 5.6 is the best version to build with, since older versions miss features, and newer features have some weird focus bugs that are hard to pin down.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan