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

CMake compile from source error when configuring Krita

Tags: None
(comma "," separated)
kkamg
Registered Member
Posts
5
Karma
0
I am following the building krita on linux for cats guide. I have minimal experience with cmake, and the documentation isn't very good. I consulted it first and another thread with a similar problem. I'm running Debian 7.8 Wheezy in a virtual machine on top of OSX. The build tutorial said to use the following line.

Code: Select all
 cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde4/inst $HOME/kde4/src/calligra -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRODUCTSET=KRITA


It looks like it's using -D to set a make configuration, then just setting path variables. I get the following output. Is there a good way to troubleshoot this process? I found one other thread https://forum.kde.org/viewtopic.php?f=221&t=126838&p=336528&hilit=macro_ensure_out_of_source_build#p336528 with a similar complaint. It doesn't tell me anything new.



Code: Select all
-- Calligra version: 2.9.7
-- Release build: TRUE
-- -------------------------------------------------------------------
-- Configured with product set "KRITA"
-- -------------------------------------------------------------------
-- Found Qt-Version 4.8.2 (using /usr/bin/qmake)
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found KDE 4.8 include dir: /usr/include
-- Found KDE 4.8 library dir: /usr/lib
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- Found Qt-Version 4.8.2 (using /usr/bin/qmake)
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found Qt-Version 4.8.2 (using /usr/bin/qmake)
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
CMake Error at /usr/share/kde4/apps/cmake/modules/MacroEnsureOutOfSourceBuild.cmake:17 (MESSAGE):
  Compiling Calligra inside the source directory is not possible.  Please
  refer to the build instruction
  http://community.kde.org/Calligra/Building/Building_Calligra
Call Stack (most recent call first):
  CMakeLists.txt:193 (macro_ensure_out_of_source_build)


-- Configuring incomplete, errors occurred!
Stefano Bonicatti
KDE Developer
Posts
16
Karma
0
OS
From which path are you launching that command?

As the error and the other page you linked say, you cannot try to build inside the source directory (that is $HOME/kde4/src/calligra).
You should launch that command when being, for instance, inside $HOME/kde4/build.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
The cat's guide is pretty explicit:

Configuring

Configuring with cmake will check if your system is ready and if you get the good libraries installed. So, if any configuration problem happen you'll be able to read what libraries are missing. That's why it's important to read if all is ok.

Also, we will inform cmake our directories structure, and also ask to build only Krita. But before, a cd to do this at the proper place :

cd ~/kde4/build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde4/inst $HOME/kde4/src/calligra -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRODUCTSET=KRITA

And you skipped the cd ~/kde4/build step.

Now you will have to do

cd ~/kde4/src/calligra
git reset --hard
git clean -fd

before you can continue.
kkamg
Registered Member
Posts
5
Karma
0
boudewijn wrote:And you skipped the cd ~/kde4/build step.

Now you will have to do

cd ~/kde4/src/calligra
git reset --hard
git clean -fd

before you can continue.


Oh I did that from the build directory. It was missing some libraries the first time. I installed those manually, then got this error. I didn't know it would require a hard reset, but that fixed it. Thank you. It also mentions a number of optional libraries. Do those need to be installed before generating make files?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]