Building Krita on Linux for cats

image data/images/blog/2013/11/krita-build/tuto-cover-build-krita-cat.jpg
Translations available :
- Español, by Gerson Alvarado : Lewatoto's blog
- Polish, by Adam Druzd : Adam's blog

Intro :

Almost a year after I released my Compilscripts on GitHub I discovered I made a mistake.
At the root of the project , Compilscript approach is broken by design. So,  I decided to stop support for it

What was Compilscript ? 

Compilscript was a set of scripts to help user to compile and install Krita ( last development version ) and doing maintenance auto-magically. The scripts met a little success. And I'm still proud about all the things I learned while making it.

What's wrong ?

When something irregular happens, Compilscript fail and stop to work  ...  And irregularities are common on Linux.  The user is dependent of a system he doesn't understand. And when it breaks, it breaks his production without letting him know how to fix it. That's not a solution.

A new approach 

That’s why I thought the best new approach is the Arch-way not to give an automatic tool , but creating a documentation dead-easy to make artist independent in the process and understand what they do.
Artists should be able to install, update, go back in the history of code if something doesn’t work for them ; all of this with a minimal and easy to use documentation.

Fully illustrated

I also offer here a set of illustrations about compiling ( all are released under CC-By  ). I hope those picture will help other project's documentation to be more user friendly and appear more simple to understand by using a simple analogy : a cat building a house. 

Why a cat ? 

Because it's well known on the Internet : you can't go wrong with cats. 


Setup directories



First obligatory step : preparing the place. Around 5GB of disk space will be needed on your home folder. We will set the structure advised by developers :
  • /home/<your-user-name>/kde4/src     for the source code.
  • /home/<your-user-name>/kde4/build   where Krita will be built
  • /home/<your-user-name>/kde4/inst  where Krita will be installed

Note : understand <your-user-name> as your user name on this documentation ( Ex :  /home/deevad/kde4/src )


To do it, open a Terminal,  copy the line under (Ctrl+C) then paste it on the Terminal (Ctrl+Shift+V ) :

mkdir -p ~/kde4/src ~/kde4/build ~/kde4/inst


Also check with your distribution package-manager that no calligra and krita packages are installed.

Use the search field of your package manager and remove packages.


Get the source code



Navigate your folder using the command cd ( change directories ) and the tab key for auto-completion.
cd ~/kde4/src

Install git from your distribution package-manager.
Then ask git to grab source files, pasting this line code in the Terminal , on the ~/kde4/src directory :
git clone git://anongit.kde.org/calligra.git


Get the libraries and dependencies


This part can be tricky : each distribution got a different way to manage packages and so installing required libraries.

Krita as a part of Calligra need a large amount of libraries ; and there is not always a single command to get them.
Some distributions ( Ubuntu , OpenSuse ) got a general meta package for this, but other , not.

Read the official wiki documentation section linked here to get the last code to auto-get the libraries list for your operating system.
 ( Note : this link is a wiki, so don't hesitate to edit, correct, and then smooth the installation process for other artist later. ) 

If your distribution is not listed, let's go plan B and find them one by one on your package manager . it sounds painfull, but it will not take really long.

( Note : Some distributions will get sometime naming convention for libraries <library-name>-dev or <library-name>-devel as package name) .


This list will help you :
git make cmake boost boost-build kdepimlibs eigen kdegraphics-okular 
libgsf libwpd libwpg libwps pstoedit glew gsl automoc4 boost libkdcraw
libpqxx fftw opengtl lcms2 vc exiv2

In rare case, and if your distribution is not recent, it might happen a library provided by your distribution is outdated. You'll need to build this dependencies. Remember , README files and internet search engine are your friends.


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


Building


After reading the configure output, if all sounds ok , then it's time to build your own Krita.
Still on the folder /kde4/build, call make with -j<number>, where <number> has to be replaced with the number of parallel job your processor is able to do ( and +1 recommended sometime ). Mine is a 8 core, let's use -j9 .
make -j9

Tip : if you don't know the number of core you have, this little command will answer you the number :

cat /proc/cpuinfo | grep processor | wc -l



Installing




If make built all the part of Krita without getting a mistake, and till 100% , you can ask make to install it in our install folder.
make install -j9


Path and environment variables



Your install is now done, but your system will not consider your install folder as a part of your system's application.
Let's show to your system the right path, inside a Terminal, copy line by line :
export KDEDIRS=$HOME/kde4/inst:$KDEDIRS
export PATH=$HOME/kde4/inst/bin:$PATH

Unfortunately those environment variable are not persistent, and will be lost after a shutdown or a restart of your system and our bridge will collapse.
To set them at any login , write them with your favorite text editor at the end of your ~/.profile file ( on certain distribution, the profile is named xprofile , check your hidden file in your home/<your-user-name> folder ).


And then you need to register Krita to the system, kbuildsycoca4 does it by executing in a terminal :
kbuildsycoca4


First run


Congratulation ! you can run "last-Krita-from-a-minute-ago" by typing krita on a Terminal or via your desktop main menu.
If this one doesn't show Krita, look at your desktop-environment 's documentation : "how to create a custom launcher" .

Updating





You've heard of a new feature developed , or you read about an annoying bug fixed, and want to update ?
Fine, call git again . This time it will only append to your source folder the missing code lines. Not downloading the whole source pack.



cd into the source folder, then ask git to pull to update your source :
cd ~/kde4/src/calligra/
git pull


But updating the source will not be sufficient ; to experience your new Krita version, we need to repeat the configure,compile and install process :
cd ~/kde4/build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde4/inst $HOME/kde4/src/calligra -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRODUCTSET=KRITA
make -j8
make install -j8

If you update daily, you might like to automatise those command by making your own minimal script. I share mine here on 'KDE paste' service .


Rescuing





Recent development version might break, and sometime be unusable. Experimental changes are made daily.

It might affect your productivity if you don't know how to 'go back in time' ( ex: your favorite brush doesn't work anymore ).

But If you know how to do it, no issue can really affect you, because you know how to come back to a previous state.




To travel the source in time we need to read the timeline history. The Terminal tool for it is git log
cd ~/kde4/src/calligra/
git log


With git log , you can consult all the last changes to the code, named 'commit' . What interrest us is the long identification number ( ex: 15c1749105a7e7cc56b646a66919c29646f8653a ). You can scroll git log , copy the ID number then quit ( letter Q on keyboard ). Then time-travel your source directory :

git checkout 15c1749105a7e7cc56b646a66919c29646f8653a


Now, configure, compile, and you'll be again in a safe place. Note that I advice the packages gitg or gitk to have a graphic user interface to visualise git history. Also an online version exist here .


To update again to the actual and fresh from a minute ago source-code named master , simply ask git to come back to it with git checkout  then  pull to update :

git checkout master
git pull

Conclusion

I hope this documentation will help many user to have good time using Krita development version.
Use the comments to give your feedbacks or ask questions, I'll do my best to update the information on this page.




Useful Links :
- Official Calligra building documentation wiki.
- Calligra Git activities and history
- List of the last updated Krita bugs
- Form to enter a Krita bug
- Old Compilscript repository ( will be deleted soon )
- Krita blog
- Krita forum
- Krita IRC channel  ( answer can arrive sometime after 1 or 2h, be patient )

Special Thanks :
Boudewijn Rempt, Aurélien Gâteau, M.Beast, Yu Asakusa, Matthieu Harel for feedback and help with corrections.
Gerson Alvarado for Spanish translation.

80 comments

Avatar Gravatar

  Aditia A. Pratama

Thanks David, I ended up deleting and uninstalling all packages from your compilescripts and following along this guide. Very nice visualization as well, I enjoy every step as there are cute little kitty accompany my progress. Again thanks a lot.

Avatar Gravatar

  Boudewijn Rempt

Totally awesome! I've just got two remarks:

* freetds isn't needed among the dependencies
* git fetch only 'fetches' the changes, it doesn't apply them to your current set of source files. After a 'git fetch' you still need to do a 'git checkout origin master' to update the sources.

Avatar Gravatar

  Chris

I don't need to build Krita but I liked to follow your cat during all the step of building his house :-). All manuals should use artwork like these ;-) to encourage users to read it...

Avatar Gravatar

  Rabah

Merci pour ce Tuto, j'utilise pas Krita mais j'ai adoré tes illustrations.

Avatar Gravatar

  yy

salut David

avez vous créez des tutos pour apprendre à dessiner ? merki :)

Avatar Gravatar

  Beast

As a end user you want "git pull" not "git fetch", pull does all the magic for you, get all the changes and applies them, while leaving your own changes (commits) intact.

Avatar Gravatar

  americo gobbo

Great Job!

Avatar Gravatar

  cajone

David, Awesome document, love the illustrations, one of the best how to docs I have ever seen :), I can see this becoming a sideline ;)

Avatar Gravatar

  Yu Asakusa

This was a lot of fun to read! I just realized one error in English which might confuse the reader: “if you ignore the number of core you have” → “if you don't know the number of core you have”

Avatar Gravatar

  Eike Hein

Dude, you're amazing! Those illustrations are so much fun.

  David REVOY

Thanks all for the feedback and also the corrections ( I've added a 'special thanks' part ).
In my effort of simplifications, for sure I made mistakes ( the biggest one was to thought 'git fetch' could be an easier 'git pull' , oh my ... ).
All , should be updated now.

Feel free to point me how to make it better :)

Avatar Gravatar

  David Tschumperlé

Thanks a lot David for this comprehensive tutorial. I've followed all the steps and finally succeeded in installing Krita with the support for the G'MIC filters. Thus, I'll probably have a look at the source code and play with it.

Avatar Gravatar

  Michael Tuttle

I want to animate this!

Avatar Gravatar

  xrg

Tried building it on Arch and it built correctly but I get some error about Calligra Little CMS not working (liblcms/liblcms2 are both installed if that is what it means). I'll have to mess with it later.

Really nice instructions though. Probably the easiest to follow build instructions I've seen.

Avatar Gravatar

  ghevan

A post like this only makes me smile. so fun and easy to follow.

Using git log to search for a checkout is nice, but If marking is important you could add a tag to the version it's working good for you. after you checkout the version you want:

git tag mytag

now to go back to the tagged state do:

git checkout mytag

To update the tag to a newer version. after checkout to the newer version

git tag -f mytag # this updates/overwrites the tag.

A recommended tag could be "stable".

Avatar Gravatar

  Danni

on debian based system the command "sudo apt-get build-dep krita" goes a long way towards downloading and installing the dependencies. Then you only have to worry about new dependencies since the most recent distro version of the application

Avatar Gravatar

  doozza

I tried multiple times (on a virtual machine) installing Krita on Ubuntu from kde-repos, and it never worked stand-alone: something was always missing. It finally ended up downloading the whole (hude) kde environment (around 1GB) to simply run Krita.
As I can see from your post, you do the same thing with the sources: download everything the KDE offers. But does this manual build only necessary dependencies of Krita, or the Calligra suite, or the KDE environment? I just can't find it in the manual (sorry, maybe I'm simply blind)?

Your manual encourages me to give this sandbox-fun-manual-installation-thingy a new try =) The cats are great. Thank you for such contributions to the community!

Avatar Gravatar

  lewatoto

this is the best "how-to" that i've seen, many thanks David, i made a translation of this post to spanish, this is the link http://frechako.blogspot.com/2013/11/co … gatos.html

  David REVOY

@doozza : Hey Dooza ; yes, I often end up installing a whole KDE base ; because with Krita-dev the extra package to get don't cost a lot more to grab. With full KDE installed, even if I use Gnome or Xfce ; I can call 'Kde-System-Setting' and tweak a bit the apperance of the oxygen GUI elements .

@lewatoto : Thanks ! translation link added :)

  David REVOY

@ghevan : Thanks for the tip, I'll use Git Tag on local before upgrade when I'm familiar with a version.

@Michael Tuttle : Animate ? cool ! It's CC-By material, feel free :)

@David Tschumperlé : Super !

Avatar Gravatar

  Olson

This is the best description of how cmake works I've ever seen, and entertaining too... it's not even Krita specific, this could obviously be applied to any cmake build system. Genius. You're a legend, Sir David.

Avatar Gravatar

  Marcos Nakamine

Very nice. You are the best.

  David REVOY

@Olson & @Marcos Nakamine : Thanks !
/me blush

Avatar Gravatar

  David Gowers

As a longtime programmer / developer, I was frustrated that I couldn't understand how to convince Krita to build (despite building many CMake-based projects in the past). You have resolved this. Thank you :)

As a result, I have implemented some improvements to the experiment brush, the options for winding fill (useful for working with silhouettes) and hard edge.
If you are interested, they are demoed in this image: https://bugs.kde.org/attachment.cgi?id=84475 ; the bug report is https://bugs.kde.org/show_bug.cgi?id=318701 . It currently looks like this will get into Krita 2.8.

  David REVOY

@David Gowers : Wooowww ! your screenshot looks promising.
Yes, I remember to see you around Mypaint. :-)
That's really cool to know my guide could help building Krita .
Have you got an idea of how the 'gradient' ( old feature of Al.chemy ) is done with such a tool ( experimental brush engine ) ?
It's like a Foreground color to Alpha gradient inside the stroke ; ref :
http://fav.me/d34xinm

Avatar Gravatar

  David Gowers

I agree with your assessment. When I look at the deviantart link, I suspect the direction of the gradient is also designed to be dependent on where the user started drawing. (lightest near the starting area?)

From my quick assessment of the kis_painter API, it seems like if we want a gradient on a experiment brush shape, we need to change the drawing process from one step to two:
First render the gradient in a temporary buffer, then mask that buffer by the actual shape we are drawing. This all seems quite doable -- the only obstacle is the need to understand how to create the temporary buffer in the correct way.

  David REVOY

@David Gowers : Oh, I understand about the buffer. It's probably complicating the code a lot ; as it wasn't designed this way. Good to know.

Yes, the gradient use the first point of the stroke and the last too ; and trace the gradient in between them at middle axis , perpendicular ; as I could guess.
But I'm not 100% sure. Ideal would be for me to reinstall Al.Chemy
Here is a graph of my thought :

Avatar Gravatar

  Gabri

My cat has something wrong... :)
I tried many times (and with different args in the configuration process (cmake), reading the docs http://community.kde.org/Calligra/Building), because I have Qt 4.8.1 that is buggy (but changing args should avoid that problem) and my "qmake -v" says:
QMake version 2.01a
Using Qt version 4.8.1 in /usr/lib/i386-linux-gnu

I have always errors on building process ("make -j3", in my case).
On 7% of the building process I have:

[ 7%] Building CXX object filters/stage/powerpoint/CMakeFiles/ppttoodplib.dir/PptToOdp.cpp.o
CMakeFiles/pigmentcms.dir/compositeops/KoOptimizedCompositeOpFactory.cpp.o: In function `KoReportCurrentArch::ReturnType createOptimizedClass<KoReportCurrentArch>(KoReportCurrentArch::ParamType)':
/home/gabri/Software/kde4/src/calligra/libs/pigment/compositeops/KoVcMultiArchBuildSupport.h:61: undefined reference to `void KoReportCurrentArch::create<(Vc::Implementation)7>(void*)'
CMakeFiles/pigmentcms.dir/compositeops/KoOptimizedCompositeOpFactory.cpp.o: In function `KoOptimizedCompositeOpFactoryPerArch<KoOptimizedCompositeOpAlphaDarken32>::ReturnType createOptimizedClass<KoOptimizedCompositeOpFactoryPerArch<KoOptimizedCompositeOpAlphaDarken32> >(KoOptimizedCompositeOpFactoryPerArch<KoOptimizedCompositeOpAlphaDarken32>::ParamType)':
/home/gabri/Software/kde4/src/calligra/libs/pigment/compositeops/KoVcMultiArchBuildSupport.h:61: undefined reference to `KoCompositeOp* KoOptimizedCompositeOpFactoryPerArch<KoOptimizedCompositeOpAlphaDarken32>::create<(Vc::Implementation)7>(KoColorSpace const*)'
CMakeFiles/pigmentcms.dir/compositeops/KoOptimizedCompositeOpFactory.cpp.o: In function `KoOptimizedCompositeOpFactoryPerArch<KoOptimizedCompositeOpOver32>::ReturnType createOptimizedClass<KoOptimizedCompositeOpFactoryPerArch<KoOptimizedCompositeOpOver32> >(KoOptimizedCompositeOpFactoryPerArch<KoOptimizedCompositeOpOver32>::ParamType)':
/home/gabri/Software/kde4/src/calligra/libs/pigment/compositeops/KoVcMultiArchBuildSupport.h:61: undefined reference to `KoCompositeOp* KoOptimizedCompositeOpFactoryPerArch<KoOptimizedCompositeOpOver32>::create<(Vc::Implementation)7>(KoColorSpace const*)'
collect2: ld returned 1 exit status
make[2]: *** [lib/libpigmentcms.so.14.0.0] Errore 1
make[1]: *** [libs/pigment/CMakeFiles/pigmentcms.dir/all] Errore 2
make[1]: *** Attesa per i processi non terminati....

And after few lines it stops. If someone had the same problem ..please, let me know ;)

Thanks

  David REVOY

@Gabri : Note this morning the source code was broken and couldn't compile. That's why you can read here http://quickgit.kde.org/?p=calligra.git&a=shortlog :
3d6b432 (5 hours ago) Dmitry Kazakov Fix build of calligra/2.8
I wonder if updating your source can't fix it ?
If not, come on the IRC channel to speak to boud and dmitryK about it ; I'm sure there is a flag to build it using other version of Qt, but this is out of my skill .

Avatar Gravatar

  David Gowers

@David Revoy:
I see, the line between the first and final point describes the transparent edge of a plane, and the centre point along that line can be projected towards the most distant edge of the polygon, to find the opaque edge of the plane. Then we know exactly what area the

You'd be right in saying the system is not actually designed for it, but on the other hand, Krita itself does these 'temporary buffer' operations a lot -- this is part of how 'wash' paint application mode operates, there could be no wash mode without temporary buffers. So when I think about it, I can probably use that same buffer.

It is not an 'it's complicated' problem -- making a temporary buffer, then rendering it later to the screen is quite common in image manipulation, and I've done it myself many times.
It's more like a 'language' problem -- I know how to do this task with NumPy, Allegro, SDL, and even just raw C. But I do not know Krita's API, so I do not know how -Krita- expects me to do such an operation. Give me time -- I've only been involved with Krita development for a few days :)

@Gabri:
My experience was that it built fine. As it happens, my latest build was after the commit David mentions above, and the previous build was 18-odd commits before that. So it's worth a try. (QT4 4.8.5 and QT5 5.2.0 here, FWIW, on Arch Linux x86_64)

Avatar Gravatar

  David Gowers

correction:
* Then we know exactly what area the gradient needs to cover.

Avatar Gravatar

  David Gowers

@David Revoy:

Actually, I already had al.chemy installed, I gave it a go, and it's much simpler, unless there is some customization of the gradient I'm missing:
It simply treats the first point as the 'start point' of the gradient (== full opacity), and the latest point the user has moved to as the 'end point' (full transparency)

It would also be a nice feature if the Krita experiment brush could do what al.chemy does with the fill rule, which is to fill with winding rule by default, then if the user reverses the direction of their drawing, then they begin using non-winding fill (known as 'odd-even rule'). This is a nice balance that lets you both do silhouette work without cutting holes needlessly, and do more complicated abstract shapes if you want.

Avatar Gravatar

  Mery Alison Thompson

I need another cat!

  David REVOY

@David Gowers : Oh nice for your research about the buffer ; it makes sens the 'wash' mode can only use something similar. Also cool you checked what Al.chemy does ; I saw really cool gallery of artist with this feature ( https://plus.google.com/u/0/photos/+Joh … 3799158897 ) No problem for the time ; take as much time as necessary on it, even don't feel forced to do it at all. It's pure bonus ! :-) As far as I know, LukasT wrote the Experimental Brush ; and a lot of enhancement and maintainance was done by DmitryK on it.

@Mery Alison Thompson : Hehe ; mine is 5 month old now and start to be a small adult cat, just a bit crazier :D

Avatar Gravatar

  Boudewijn Rempt

And now David has added that fill rule to krita :-)

Avatar Gravatar

  julasanakrupan

hello,sir
i want to do some brush development in krita,wat i need to do sir?
can you please help me for strat to end for build and all on ubuntu 13.10?
i trying for build from last 10 days but dont know wat happening ???

  David REVOY

@julasanakrupan : Hi, sorry, but I can't explain it more simplier how to build it than here. Please, recheck all the steps and read carefully. I actually have 13.10 ( ubuntu gnome edition ) and I can compile fine 2.8 ( git checkout origin/calligra/2.8 on the source to restrict them to 2.8 )

Avatar Gravatar

  Björn Sonnenschein

The Illustrations are awesomely sweet!
Really good work! ;)

Avatar Gravatar

  frfrfrfr

Hi,
I'm trying to compile, not getting very far. Hitting this:


CMakeFiles/koplugin.dir/KoPluginLoader.cpp.o: In function `QList<QVariant>::detach_helper(int)':
/X/tools/rnd/qt/qt_4.8.5/include/QtCore/qlist.h:709: undefined reference to `QListData::detach(int)'
CMakeFiles/koplugin.dir/KoPluginLoader.cpp.o: In function `QList<KSharedPtr<KService> >::detach_helper(int)':
/X/tools/rnd/qt/qt_4.8.5/include/QtCore/qlist.h:709: undefined reference to `QListData::detach(int)'
CMakeFiles/koplugin.dir/KoPluginLoader.cpp.o: In function `QList<KSharedPtr<KService> >::detach_helper_grow(int, int)':
/X/tools/rnd/qt/qt_4.8.5/include/QtCore/qlist.h:679: undefined reference to `QListData::detach_grow(int*, int)'
CMakeFiles/koplugin.dir/KoPluginLoader.cpp.o: In function `QList<QVariant>::detach_helper_grow(int, int)':
/X/tools/rnd/qt/qt_4.8.5/include/QtCore/qlist.h:679: undefined reference to `QListData::detach_grow(int*, int)'
CMakeFiles/koplugin.dir/KoPluginLoader.cpp.o: In function `QList<QString>::detach_helper_grow(int, int)':
/X/tools/rnd/qt/qt_4.8.5/include/QtCore/qlist.h:679: undefined reference to `QListData::detach_grow(int*, int)'
CMakeFiles/koplugin.dir/KoPluginLoader.cpp.o: In function `QList<QString>::detach_helper(int)':
/X/tools/rnd/qt/qt_4.8.5/include/QtCore/qlist.h:709: undefined reference to `QListData::detach(int)'
collect2: ld returned 1 exit status
make[2]: *** [lib/libkoplugin.so.13.0.0] Error 1
make[1]: *** [libs/koplugin/CMakeFiles/koplugin.dir/all] Error 2
make: *** [all] Error 2

I've also seen this:

[ 2%] Built target calligra_shape_text_automoc
make: *** [all] Error 2

I receive a lot of errors in relation to two different versions of QT on the system. I'm using -DQT_QMAKE_EXECUTABLE to specify a different qmake location but I get thrown a TON of warnings about there already being qt libs in /usr/lib64 (older QT version; i'm trying to build on centos 6.2 x64)

I for sure do not have *all* the recommended pre-req's but I have enough that cmake says krita *will* be built.. or is that misleading?

Avatar Gravatar

  frfrfrfr

Doing some reading, the function it's throwing errors for doesn't exist in the system version of QT i have. Doing a `grep -R libQtCore.so` in the build directory shows references to my copy in /usr/lib64/ instead of the version of QT i'm trying to build on.. I DO see references to the correct version, too, so something isn't happening properly when cmake is running perhaps?

  David REVOY

@frfrfrfr : Hey frfrfrfr, I think the developpers will be able to help you on the IRC channel #krita on Freenode , or with your browser here : http://krita.org/join-krita/irc-chat ( be patient, answer depends of who is awake, who can answer ... it can take hours. Here , I'm the only one to receive notifications for this blog. Good luck !

Avatar Gravatar

  Jussi Pakkanen

You don't need to run CMake again after doing a git pull. It will do it automatically by itself so you don't have to. The steps needed to update are simply this:

cd into/build/dir
git pull
make -j 9
make install

Avatar Gravatar

  Boudewijn Rempt

We updated the dependencies and now you need eigen3 instead of eigen2.

  David REVOY

@Boudewijn Rempt : thx :) I updated the Calligra/build official wiki a week ago about it. I forgot my own page ^__^

Avatar Gravatar

  Daniel

Hello, can you help me with krita install or with IRC chat directions?
I use stable (2.8.5) tarball since I have a slow connection atm and when I build it, there's no krita binary anywhere.

As with IRC, I cant see any directions on the page linked in the guide.

  David REVOY

@Daniel : Hi Daniel, my knowledge is limited to the content of this guide, so ; if you meet a problem, I 'm really not sure to can reply. The developpers of Krita on #krita freenode are at the best place to answer you about this; also the forum. It can be a problem of library ( distro ) or a problem with Krita 2.8.5 itself ...

Avatar Gravatar

  Daniel

@David REVOY
Thanks for the IRC and .. forums are broken for me.
Unless they allow me to register a usename I want, not usename they made up from my name, they can go scratch their backs with rusty swords.

As for distro problem.. that is indeed the case.
Just a little rant on my side but .. cant it tell that it cant do what I tell it to somewhere at the end of Cmake output, not buried in the log?

-- ---------------- The following required products can NOT be built -----
-- KRITA_APP: Full Krita (for Desktop) [[needed by: KRITA]] | SharedMimeInfo|libeigen2|libexiv2|lcms devel not found

I'll go bother Krita devs about it, because all those are installed.

  David REVOY

@Daniel : mm... A note : I updated in this guide the library for eigen3 ( mandatory for 2.9alpha ). You might just need to hunt manually libeigen2 if you try to build 2.8.5. That can be it.

Avatar Gravatar

  oscar

When I get to the cmake step I get the following error:

The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QT_QT_INCLUDE_DIR
used as include directory in directory /home/oscar/kde4/build/CMakeFiles/CMakeTmp


Any tips? How do I set this variable? I'm on Ubuntu 14.04

  David REVOY

@oscar : Hi Oscar ; sometime it's also happen the development version won't compile ( an error pushed to master happen ). It's not keep in this broken state really long ; and get fixed between 1h and 4h ; try to refresh your sources to update them to match last commit ( http://quickgit.kde.org/?p=calligra.git&a=shortlog ) ; if the problem continue, report on IRC channel ( #krita on freenode ). Good luck !

Avatar Gravatar

  Boudewijn Rempt

Ah, the Ubuntu 14.04 problem... This is because Ubuntu uses Qt5 by default. After installing all dependecies, you need to add the following to the cmake command:

-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4

to make sure that cmake finds the right Qt. This is only the case on Ubuntu 14.04 and up.

Avatar Gravatar

  Vasco Basque

Hey, it has come that i had to build krita on opensuse 13.2; there is one thing that i think should be mentioned (propably i have overread it somewhere..) How ever - the prequesite vc must be buildl from src, but not the latest version -> vc will be detected - okay let´s build, but the build fails then... the version that has to be compiled is 0.7.0 (i don´t know if higher or lower version works)

The vc repository could be found on gitorious:

https://gitorious.org/vc/vc/source/18e6 … 02df0957df:

steps to build are:

$ git clone [vc-repository_URL]
$ git checkout 0.7

(-> follow the INSTALL instructions included in the repository files)

$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/Vc -DBUILD_TESTING=OFF <srcdir>
$ make -j16
$ make install
(the last one may require root privilegs)

btw the number of cores to use is not so important as long as the option -j[cores] is higher than available cores "make" will simply use all.

If the above is not known it could be hard to figure out whats wrong and vc is not easy to search for in repositories or by searchengines. So, maybe this helps someone reading the comments or you include a hint in your article;

Good luck building, everyone :)
Ah, one last word: the features in 2.9 - holy shit! Amazing! :D

Avatar Gravatar

  Boudewijn Rempt

Here's my little tutorial on setting up more than one version:

http://www.valdyas.org/fading/index.cgi … ?seemore=y

Avatar Gravatar

  uga

Very great post. I simply stumbled upon your weblog and
wanted to say that I've truly enjoyed browsing your blog posts.
In any case I'll be subscribing for your rss feed and I am hoping
you write once more very soon!

Avatar Gravatar

  Frank

The illustrations that went along with the doc were great. Makes compile-from-source instructions a lot more interesting (and less intimidating).

Avatar Gravatar

  Ben

Hi,

Great tutorial and nice cat cartoon. I follow the instructions to build krita-2.8.7 (running git checkout calligra/2.8) But somehow kritasketch doesn't get built. Am I missing something?

Thanks

  David REVOY

@Ben : Hi Ben, I don't have any experience building Kritasketch or Kritagemini. In the official wiki ; https://community.kde.org/Calligra/Building#Using_Product_Sets ; they advice to get a look to cmake/productsets in the source to get a documentation of the productset available to be built. (eg. -DPRODUCTSET=GEMINI , but the doc says its available only after 2.9 ). In my guide, I write -DPRODUCTSET=KRITA to get only Krita. Maybe -DPRODUCTSET=CREATIVE will be a larger spectrum for 2.8 ? good luck, and don't hesitate to ask on the IRC channel ( #krita on freenode ) , and write back here your solution.

Avatar Gravatar

  Ben

Hi, Davild,

From Krita's forum
'Sketch and Gemini are broken due to Multiple Documents at the moment. We'll get them back up and running as soon as possible, but for now only desktop works. "

I think I may need kritasketch because on https://krita.org/download/krita-desktop/ it says under Ubuntu/Mint

sudo apt-get install kritasketch (otherwise you won't have the sketch brush in 2.8.0)

But it seems that sketch brush is already there for krita 2.8.7 without kritasketch

Thanks

P.S. -DPRODUCTSET=GEMINI returned unknown productset.

  David REVOY

@Ben :Hi,

>> Sketch and Gemini are broken due to Multiple Documents at the moment.
yes, in master and 2.9beta branch ; not in 2.8.x branch I guess

>> I think I may need kritasketch because on https://krita.org/download/krita-desktop/ it says under Ubuntu/Mint
>> sudo apt-get install kritasketch (otherwise you won't have the sketch brush in 2.8.0)
>> But it seems that sketch brush is already there for krita 2.8.7 without kritasketch
Probably, I don't use Krita official package for Mint/Ubuntu. Yes, by the past, the packager of Ubuntu split the 'sketch' brush presets from the Krita package. Probably thinking it's for Kritasketch. I think it was fixed after.

>> P.S. -DPRODUCTSET=GEMINI returned unknown productset.
Sure in 2.8.x branch ; and on 2.9 it's broken.

Avatar Gravatar

  Darko

So now I can officially say that day 4 linux noob (me :-)) managed to successfully build my first krita 2.9.1 on linux mint 17.1 (version 14.04 package base).

Thank you David :-)

  David REVOY

@Darko : As I said on IRC , I'm impressed ! Bravo!

Avatar Gravatar

  ~Antonio

I'm also experiencing an issue, by which no binary for Krita is installed. As far as I am aware, all dependencies are installed. There are NO error messages produced anywhere in the build process, and this happens whether building with the -DPRODUCTSET=KRITA or -DPRODUCTSET=CREATIVE option. There was, apparently an Ubuntu bug describing a similar issue. It was resolved, however, no one made mention of what the issue was, or how to fix it. So, I just filed it as a new bug in KDE's bug tracker. Hopefully, someone sees it soon. I also encountered a hiccup, where libkoversion.so.14.0.0 could not be found, when using the CREATIVE option, but was installed just fine with the KRITA option (this only happened once- I tested multiple times, cleaning out the directories before each test attempt). These are very strange bugs.

  David REVOY

@~Antonio : Thanks for the information ! Here I switched to Antergos, and I use the default package at the moment ( 2.9.1 ). I'll try to test an follow how it works. I'll probably recompile soon ; but the calligra/2.9 branch

Avatar Gravatar

  ~Antonio

Well, I learned something- there were MANY more dependencies I needed (some of which I had to build from source), than are listed, either here or in the KDE build docs. On the surface, this makes sense, as I am running Openbox on Void Linux. What doesn't make sense, however, is that, without those dependiencies, rather than cmake failing and exiting with an error message, for some reason, the folks who make the project figured it was fine for cmake to simply continue. This means being able to also complete a make and install with no error, the result being an install with no binary.

SO, after getting the dependencies sorted out, I am now facing an error on make, and there's no useful information provided to inform me of what's causing it:

CMakeFiles/Makefile2:34463: recipe for target 'libs/pigment/CMakeFiles/pigmentcms.dir/all' failed

Fun stuff. I really would like to give Krita a go, but have to decide, at this point, if it's worth the time I'm putting into building it.

  David REVOY

@~Antonio : I don't know about the status of the 'master' main git branch since month ; it seams the master trunk became experimental and the stable development all goes into the calligra/2.9 branch ; it was like this in January/february.
To switch to 2.9 ; you need to go into your 'src/calligra' folder ; then call 'git checkout calligra/2.9' . I hope it will work better.

Avatar Gravatar

  NETHead

@David Revoy
This doesn't work, same error as ~Antonio here too. I've already switched into 2.9 branch with 'git checkout calligra/2.9' before building.
I'm running LMDE 2 'Betsy' (Linux oberhaus 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01) x86_64 GNU/Linux).

Avatar Gravatar

  NETHead

Snippet from error log:

[...]
libs/pigment/CMakeFiles/pigmentcms.dir/build.make:953: recipe for target 'libs/pigment/CMakeFiles/pigmentcms.dir/KoOptimizedCompositeOpFactoryPerArch_AVX2.cpp.o' failed
make[2]: *** [libs/pigment/CMakeFiles/pigmentcms.dir/KoOptimizedCompositeOpFactoryPerArch_AVX2.cpp.o] Error 1
CMakeFiles/Makefile2:34189: recipe for target 'libs/pigment/CMakeFiles/pigmentcms.dir/all' failed
make[1]: *** [libs/pigment/CMakeFiles/pigmentcms.dir/all] Error 2
[...]

Avatar Gravatar

  NETHead

@~Antonio, @David Revoy

Playing around, solved it!
It fails due to a wrong version of vc. I simply cloned the git repository and didn't explicitly select branch 0.7 afterwards. For convenience, I've attached a short script to download, build and install the vc library:

-----------------------------------------------------------
#!/usr/bin/env bash

SOURCE=~/src/vc
BUILD=~/build/vc
INSTALL=/opt/Vc
GITREPO=git://code.compeng.uni-frankfurt.de/vc

# Prepare directories
mkdir -p ${SOURCE} ${BUILD} ${INSTALL}

# Download source code
git clone ${GITREPO} ${SOURCE}

### IMPORTANT ###
# Select the right branch (0.7 for calligra)
cd ${SOURCE}
git checkout 0.7

# Build
cd ${BUILD}
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL} -DBUILD_TESTING=OFF ${SOURCE}
make -j`nproc`

# Install
sudo make install
-----------------------------------------------------------

  David REVOY

@NETHead : Oh ! good job ! Too bad to see again the library issue with Krita using an old specific VC version :-/
Thank you for the fast build script and the solution !

Avatar Gravatar

  poppy-cat

these instructions are perfect for us cats, thanks

Avatar Gravatar

  morgan

Is there going to be a Plasma5.x version ?

  David REVOY

@poppy-cat : = ' . ' = meow !

@morgan : Yes, read here this blog post to know more about the portage experience from the point-of-view of the project leader : http://www.valdyas.org/fading/index.cgi … ngkritaqt5

Avatar Gravatar

  Sudhir Khanger

I see you use GNOME. Do you find it much more appealing as a graphic designer? What do you not like about KDE that it isn't your primary desktop environment?

  David REVOY

@Sudhir Khanger : Hi Sudhir, this page is outdated. On last 6 years, I used *everything* ; I even don't use GNOME anymore now ; I have too much tweak to do on the top of it to make it productive to my taste. Same for KDE. But in general ; yes, I find GNOME more appealing ( with the right theme ) than KDE design. Even the 3.4 of two years ago compare to the next release of Plasma 5 ; but I also admit Plasma 5 is better looking than kde4 ; Nowadays I'm using or a customised Cinnamon or XFCE ; ( Mint 17.1 Cinnamon ) you can see it on my last videos.

Avatar Gravatar

  Moritz Molch

People who are using a recent Ubuntu or a derivative might want to take a look at my article
"Comfortably use Krita source builds on Ubuntu 14.04+". I have a script including a menu entry and file associations and a package that pulls in all the build-dependencies in my PPA.

The article can be found at: http://moritzmolch.com/1766

Kind regards

Avatar Gravatar

  Tiffany

In addition to Moritz's guide above, if anyone's having trouble with the cmake step, here's one solution. It fixed the problems I had starting with QT_QT_INCLUDE_DIR is NOTFOUND.

https://forum.kde.org/viewtopic.php?f=288&t=125678

Avatar Gravatar

  fernando

what do you think about video editors in linux? Are they complete?

  David REVOY

@fernando : Hey Fernando ; I made two DVDs and maintain my humble youtube video with Kdenlive since last 5 years. I had a Sony Vegas license before I moved to Linux. Don't expect the same level of performance or features; but if you look to enter a title, do simple transition and cut, then the tool can do the work. It probably needs more interest and investment from the CG world interested in video editing.

Avatar Gravatar

  Hera

Hi David thank you for this awesome guide. I used it several months ago to install Krita on my Ubuntu Trusty (14.04) box and it works like a charm! Now I would like to take advantage of the git clone operation and install the whole calligra suit. Any ideas? There are several flags you pass to the cmake instruction.. How would this change? Anyways, great artworks you have here. Keep it up. Cheers..

  David REVOY

@Hera : Thank you Hera ! If you want to build everything , I think the right flag is -DPRODUCTSET=ALL according to the official doc ; https://community.kde.org/Calligra/Buil … d_Calligra ; good luck ! ( Note: I'm still on Mint 17.1 = 14.04 too )

Write a comment

Notice : URL allowed ( auto-clickable ). Pictures URL too ( gif,jpg,png auto-displayed )

What is the second letter of the word dzpxov?