Compile Krita from source code on Linux for cats

Published on

Update: If you plan to follow this guide; you might consider to follow instead the updated building instruction on the official documentation. It's now maintained by the Krita team directly. The illustrations of this article were ported to this place. The article receives now a better maintainance while keeping the same 'keep it simple' philosophy. I'll keep the article under as it is for search engines and also to keep the souvenir of one of my best and most useful guide I ever published, imo.

link: Build instruction on Krita official documentation

Intro :


  • [2019-03-28] The guide was ported to Krita official documentation here, thanks to Wolthera.
  • [2017-09-09] Remove specific obsolete notes
  • [2017-08-20] Krita 4.x, and specific notes for Linux Mint 18.2 / Ubuntu 16.04
  • [2016-04-24] moving from calligra repository, Krita 3.0, adding library for plasma/Qt 5.0
  • [2015-05-07] Refactoring for using the 2.9 branch while Krita split Calligra
  • [2013-11-18] First publishing, during Krita 2.7 development

I wrote this guide after maintaining during a full-year a set of scripts to help user to compile and install Krita. This project was named Compilscripts. I decided to discontinue it because the script was always breaking. But this script was useful for many artist who wanted to beta-test Krita. So I had to find a solution and I thought the best approach was "the Arch-way": not providing any automatic tool, but a badass and dead-easy documentation to make artist independent in the full 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.
I also decided to illustrate the article with funny pictures (all licensed under CC-By). I hope those pictures will also 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.

But why for cats ?
Because it's well known on the Internet : you can't go wrong with cats. =^.^=
Let starts!

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>/krita/src for the source code.
  • /home/<your-user-name>/krita/build where Krita will be built
  • /home/<your-user-name>/krita/inst where Krita will be installed

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

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

mkdir -p ~/krita/src ~/krita/build ~/krita/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 ~/krita

Install git from your distribution package-manager ( eg. for Ubuntu; sudo apt install git )
Then ask git to download the source files in your src folder, pasting this line code in the Terminal , on the ~/krita directory :

git clone src

So we enter the Krita source folder, then check if everything is updated :

cd src  
git pull 

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 needs a large amount of very fresh libraries and you'll need a GNU/Linux distribution with fresh packages for that ; CentOS, Debian Stable, Linux Mint, Elementary or Ubuntu L.T.S are often too outdated to build Krita...

Not so long ago, the community around Krita had a place to share installation instruction for dependencies (the KDE Community Wiki) : , but it was cleared recently....

Now and according to the dev you need "to read and understand the cmake output instead". That sounds complex at first, but it is not: it's just very long to do. You first need to run cmake. It exits with a warning asking for eg. "PACKAGE5". You note the name. Then you use your package manager to install anything related to PACKAGE5 because of course the name will differ (packagers love to get their own name for things). So, you'll try: lib_pck5, packg5, five_libs-package, libP5.0.0.04 until the cmake doesn't complain anymore. If you accidentally destroy your O.S. because of the trial and error process of installing random libraries that collide with larger dependencies: just reinstall your full OS later with your precious list of package name that finally worked. (sorry, I don't have other simplier and faster solution to propose nowadays.)


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 as mentioned previously. That's why it's important to read if all is ok. Also, we will inform cmake our directories structure :

cd ~/krita/build 


After reading the configure output, if all sounds ok , then it's time to build your own Krita.
Still on the folder /krita/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  


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/krita/inst:$KDEDIRS  
export PATH=$HOME/krita/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 ).

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" .


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 ~/krita/src/  
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 ~/krita/build  
make install -j8  

If you update daily, you might like to automatise those command by making your own minimal bash script.


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 ~/krita/src  
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: cca5819b19e0da3434192c5b352285b987a48796 ). You can scroll git log , copy the ID number then quit ( letter Q on keyboard ). Then time-travel your source directory :

git checkout cca5819b19e0da3434192c5b352285b987a48796 

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


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 Krita development wiki 'Build instructions'. - The /krita/3rdparty/ file
- Krita Git activities and history
- List of the last updated Krita bugs
- Form to enter a Krita bug
- 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.

Translations available :
- Español, by Gerson Alvarado : Lewatoto's blog
- Polish, by Adam Druzd : Adam's blog


link 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.

link 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.

link 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...

link Rabah  

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

link yy  

salut David

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

link 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.

link americo gobbo  

Great Job!

link 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 ;)

link 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”

link Eike Hein  

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

link David Revoy Author,

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 :)

link 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.

link Michael Tuttle  

I want to animate this!

link 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.

link 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".

link 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

link 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!

link 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

link David Revoy Author,

@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 :)

link David Revoy Author,

@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 !

link 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.

link Marcos Nakamine  

Very nice. You are the best.

link David Revoy Author,

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

link 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: ; the bug report is . It currently looks like this will get into Krita 2.8.

link David Revoy Author,

@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 :

link 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.

link David Revoy Author,

@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 :

link Gabri  

My cat has something wrong... :)
I tried many times (and with different args in the configuration process (cmake), reading the docs, 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/] 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 ;)


link David Revoy Author,

@Gabri : Note this morning the source code was broken and couldn't compile. That's why you can read here :
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 .

link 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 :)

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)

link David Gowers  

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

link 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.

link Mery Alison Thompson  

I need another cat!

link David Revoy Author,

@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 ( ) 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

link Boudewijn Rempt  

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

link julasanakrupan  

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 ???

link David Revoy Author,

@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 )

link Björn Sonnenschein  

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

link frfrfrfr  

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/] 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?

link 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` 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?

link David Revoy Author,

@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 : ( 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 !

link 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

link Boudewijn Rempt  

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

link David Revoy Author,

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

link 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.

link David Revoy Author,

@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 ...

link 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.

link David Revoy Author,

@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.

link 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:
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

link David Revoy Author,

@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 ( ) ; if the problem continue, report on IRC channel ( #krita on freenode ). Good luck !

link 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:


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

link 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:

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
$ 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

link Boudewijn Rempt  

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

link 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!

link Frank  

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

link Ben  


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?


link David Revoy Author,

@Ben : Hi Ben, I don't have any experience building Kritasketch or Kritagemini. In the official wiki ;"> ; 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.

link 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 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


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

link David Revoy Author,

@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 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.

link 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 :-)

link David Revoy Author,

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

link ~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 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.

link David Revoy Author,

@~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

link ~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.

link David Revoy Author,

@~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.

link 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).

link 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

link 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


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

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

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

# Build
cd ${BUILD}
make -j`nproc`

# Install
sudo make install

link David Revoy Author,

@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 !

link poppy-cat  

these instructions are perfect for us cats, thanks

link morgan  

Is there going to be a Plasma5.x version ?

link David Revoy Author,

@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 :

link 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?

link David Revoy Author,

@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.

link 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:

Kind regards

link 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.

link fernando  

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

link David Revoy Author,

@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.

link 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..

link David Revoy Author,

@Hera : Thank you Hera ! If you want to build everything , I think the right flag is -DPRODUCTSET=ALL according to the official doc ; ; good luck ! ( Note: I'm still on Mint 17.1 = 14.04 too )

link Ben Greenway  

Love the cat artwork that really helps convey the message. Is there a tutorial for creating this type of artwork in Krita? I've been through some of your other tutorials but not seen this. Would be great to better understand how to do this type of artwork. Love it. Many thanks for sharing once again.

link David Revoy Author,

@Ben Greenway :thank you Ben ! I didn't made tutorial about this style of artwork because it is really basic. You just need two tools and two layers :
1. Keep a white background layer, and create an empty layer on the top.
2. Draw on the top layer with a dark saturated color ( a dark orange or a dark red ), don't do guidelines ( or really minimalistic ones ) , draw directly to let the drawing look spontaneaous and unperfect.
3. When drawing is done, take another filing brush and shade under with a single brighter color.
done :=)

link Andrey  

You don't really need to call cmake second time when you update source code of krita after building it.

link David Revoy Author,

@Andrey : True, but sometime dependencies changes (eg. recently with jpg library ) so I thought it was safer to advice this practise.

link Kino  

This is great! I just followed everything step by step on ElementaryOS and everything worked fine. Thank you!

link David Revoy Author,

@Kino : Thank you for the feedback on Elementary OS !

link barz  

I have installed succesfully on Linux Mint 17.2 :D, thanks for this tutorial. Now . . . I want to help a friend, but he is using Windows 7, Does the libraries change for DLL system? To help him compile

link David Revoy Author,

@barz : Hey Barz, thank you. I'm using Mint 17.2 here also :) For Windows, I have no idea. Join the IRC channel #krita on freenode to talk with the developers, they might have written somewhere a documentation about it.

link Pistos  

On Gentoo, in addition to the above instructions, I also had to export this additional variable before I the `krita` executable would run:

export LD_LIBRARY_PATH=$HOME/kde4/inst/lib64

Without this, I was getting this error:

> krita: error while loading shared libraries: cannot open shared object file: No such file or directory

link Malcolm  

Nice tutorial, especially with the pictures.

I'm stuck on the part where I need to compile the vc library though (I'm using Fedora). I was following the instructions in Vasco Baque's comment, but the link seems to have moved and using the new link the page redirects me to, when I type "git chekout 0.7" it says "Not a git repository." Not sure where to go from here.

(Also is kdegraphics-okular a package, or is it supposed to be the two separate packages kdegraphics and okular?)

link David Revoy Author,

@Malcolm : Ha, I see ; Vasco Baque forgot a step ; after cloning the git repository ( git clone ....withURLhere.... ) , you need to enter the directory created by this command with 'cd'. The easiest is certainly the script proposed by NETHead @ sunday 12 april 2015 à 14:18 here ; a little bash script ( just copy/paste his script on a text-editor, save this as ; give it the right to execute ( chmod +x ) and then launch it on a terminal ./ . But doing all the steps will allow you to get more comfort. Good luck!

link 4of92000  

You know, this is actually a decent guide to Linux compiling in general. Favorited it because it'll probably save me a ton of headache in the future.


link Ragnar  

A couple of tips.

If installing in path on Ubuntu (e.g. to /usr/local/bin), you can use check 'sudo checkinstall' instead of 'sudo make install'. The difference is that checkinstall makes a .deb package and installs it, which makes it much easier to uninstall it later. I don't know if there is a similar tool for rpm based distros. See

Secondly, you can use 'make -j $(nproc)' which automatically uses all your cores.

link dyp  

hello we thank you at cause two guys used your tutorial which is beautiful and easy to use. the beauty-usefull first tutorial ever (

link David Revoy Author,

@dyp :Hey, thanks for the feedback ! (et un gros merci pour les compliments sur le tuto dans ce sujet de forum, je suis content qu'il aide!)

link Taposy Rabeya  

Great written and Cute art work. Love so much.

link Md Sumon  

I remember that, this tutorials is more important for professional artist .

link Watauinewa  

Errata (2016.04.26 14:41:37):



cd ~/krita/build


link David Revoy Author,

@Watauinewa : A big big thanks!
I think my WYSIWYG editor try to merge lines of code together, I'll try to sort this. Thanks!

link Boudewijn Rempt  

Some notes:

* Krita and Calligra should no longer conflict anymore.
* We've got some sort of build instructions here:, but the most extensive instructions are in the krita/3rdparty/ file.
* The KDEDIRS variable is obsolete, there's XDG_DATA_DIRS, but we've tried to make Krita run in place without any environment variable set.

link David Revoy Author,

@Boudewijn Rempt : Thank you for all this useful additional informations and links Boud ; I'll update the article immediately!

link jasa desain rumah  

hi david
sebuah karya seni yang indah, terima kasih

link Anderson Prado (AndeOn)  

Hello David,

First let me say: great job!

Here the translation to portuguese:

link Freeman Zhang  

This tutorial is awesome! It explains the basic idea of software building and install in *nix world and quite vivid!

link lewatoto  

thanks for your work, i've updated the spanish translation.

link treegb  

I found a hyper link of your website might be wrong :
In your "about me" page (
The hyper link to Pepper&Carrot
should be
(it's http, not https).

link David Revoy Author,

oh, good catch!
Thank you, it's really hard to hunt for broken link with so many article and two websites running since years!

link AlePando  

Gracias por el excelente tutorial, solo tuve que buscar algunas librerías en los paquetes de Linux/Debian y se instalo sin dificultades.

Ahora a dibujar y dibujar, que es la única manera de "soltar la mano" y adquirir destreza.

Un abrazo

link David duleroy  

Merci David pour ton article et ton investissement partagé!
J'ai essayé d'installer Krita 3.0 sous peppermint et mon kernel et celui d'ubuntu 14.04 et je me retrouve avec l'impossiblité d'aller plus loin, les ressources liées à plasma 5 et kio ne sont plus maintenues par KDE, toutes les librairies commençant par libkf5... sont donc hors de portée. Est-ce que tu saurais si je n'ai aucun risque à les installer sur mon systéme manuellement par debian ?( par exemple) Ou si mon noyau risque d'y passer, j'ai déjà eu de gros probléme en essayant de compiler des librairies python de la sorte, incompatible avec mon systéme .
Comme je suis sous 32bits, je ne peux pas non plus utiliser les appimages qui ont été créées sous 64bits... Donc si quelqu'un a une solution. Merci.
Si cela permet d'éviter à quelqu'un de perdre du temps à essayer de compiler, sachez donc qu'il y a souci sous 14.04 pour Krita 3.0, c'est bien de le signaler....
Merci David. ;)

link David Revoy Author,

Effectivement. 14.04 est trop 'vieux' pour compiler Krita 3.0. Pas d'issue.C'est pour cela que j'ai été forcé de quittter LinuxMint ( basé sur 14.04 ) et d'adopter Ubuntu 16.04 encore en beta en avril en installant Cinnamon manuellement ( d'où mon guide ). Là, Krita pour 3.1 continue d'évoluer, et 16.04 commence à déjà être trop ancien ( il faut compiler Qt 5.6.1 et VC 1.2 pour le faire tourner à présent ... ). Cette situation sous GNU/Linux pour les beta-tester est désolante. Du coup, il y a de moins en moins de testeurs, des OS de plus en plus obsolètes, des thèmes cassé par GTK et Qt/KDE en constante revolution/regression ; et c'est l'utilisateur final qui est de plus en plus considérer comme beta-testeur. Triste, j'en ai gros sur la patate. :/ Là, je teste Fedora 23 ; un peu plus à jour et Antergos/Arch... Mais ces systèmes sont bien moins tranquille, prévisible que des 'buntu LTS.

Pour l'idée d'importer des deb de Debian ; la compatibilité des paquets Debian et Ubuntu est assez aléatoire; voir très risqué pour des librairies système, et facile pour des petites applications de surface.
Bon courage!

link David duleroy  

J'essaierais de voir si il y a moyen de compiler dans un chroot de pbuilder pour que mon systéme reste safe, ce qui serait bien c'est qu'ils développent des appimage en i386 (32bits). Tu pourrais passer le message aux développeurs peut-être, je ne comprends pas pourquoi ils créent des .exe en 32bits et 64bits et pas d'appimages pour linux dans les deux formats. un parti-pris?

Les limites de linux sont celles de la nature humaine... On ne peux pas y échapper à moins d'être un ange.
@ plus.

link David Revoy Author,

Pas de partie pris ; la raison est simple : les *.exe en 32bit et 64bit sont construite par deux contributeurs qui investissent du temps sous Windows.
Sous Linux ; pas de contributeur similaire ; donc pour packager l'appimage c'est le dev principal qui propose ça au lieu de faire des fonctionalité et des bug-fix. Le tout pour compenser le design des distro GNU/Linux et de leur système de distribution de paquets.
L'équipe va d'ailleurs de plus en plus arrêter de faire des paquets très prochainement et ce concentrer sur le code ( eg. le PPA qui demande beaucoup d'entretien va disparaître ). Tout ceci arrive grâce a de nouvelles contributions externes et des nouvelles technologies similaire à appimage. Sous Linux; un contributeur pour Snap et un autre pour Flatpack sont apparu. J'éspère que cela facilitera la vie des utilisateurs GNU/Linux! :)

link David duleroy  

Ok, c'est noté!
Merci pour l'explication.

link Yann  

Bonjour, merci de ce pas à pas qui m'a permis pour la première fois d'arriver à compiler quelque chose de complexe sur ma Debian.

J'ai juste utilisé libgsl-dev au lieu de libgsl0-dev car l'usage de ce dernier paquet cassait mon installation d'Inkscape sous Sid. L'usage de libgsl-dev fonctionne très bien.

link Bruno  

Hello David!

How can I remove the splash screen of krita 3 on windows?


link David Revoy Author,

Hey :) Go into Settings > Configure Krita ; first item ( General ) and 4th tab 'Misc' ; 'Hide splash screen on startup' option is here.

link David Revoy Author,

Ha oui, ça doit pas être evident sous Debian, d'autant que la version actuelle de git~master nécessite une version récente de VC et de Qt.

link Bruno  

Pretty thank you ;)

link Andrew Savonichev  

It seems there is no gettext-kde package in Ubuntu 16.04 repositories.
Nevertheless, I was able to compile and run latest Krita without it.

link mateosss  

How can I make this to open my .kra files on ubuntu just by clicking them? Amazing tutorial by the way.

link mateosss  

I found it (for ubuntu 16.04):
open the file /usr/share/applications/krita.desktop and paste this (change YOURUSER to your username):

[Desktop Entry]
Categories=GTK;Utility;Text-Editor;" > /usr/share/applications/krita.desktop;

Then open /usr/share/applications/defaults.list and add this line:


link David Revoy Author,

Hey Thanks!
Maybe the filemanager of Ubuntu ( a fork of Nautilus ) have a right-click on *.kra files and then 'Open with' -> 'Other Application' ?
If you have this, you can point it to the binary of Krita built in the inst folder.

link mateosss  

The first file, you have to create it not just open it, and then paste this text not the above:

[Desktop Entry]

link mateosss  

It has the "open with another application" option, but just let you search online for one, not manually add one.

link David Revoy Author,

Oh, I get it. Thanks for letting the code of the *.desktop files.
Times right now are a bit difficult with building Krita, a lot of new technology around (vc, qt, etc...) ;-)
I'm using the 3.0 from Arch package right now. I'm waiting 'master' branch to be a bit more stable to use it.

link Laurent Jospin  

Since yesterday krita master needs at least Qt 5.6 (ubuntu 16.04 has 5.5). The trick is as follow:

Add one of this ppa for Xenial:
[updated 06/2017]

It contain a package for Qt 5.7 that will be installed in /opt (so wont erase your system qt installation).
You can install all of qt by installing qt-latest.

Then you need to remove the CMakeCache.txt from your build directory, and also do a make clean to be sure.

You can re-run cmake, but you need to add -DCMAKE_PREFIX_PATH=/opt/qt57 to your argument list. It will tell cmake to search first there when it tries to locate for headers, libraries or executable. So when it will locate Qt, it will pick version 5.7.

Then make krita as usual.

This is what worked for me !

link David Revoy Author,

Hey Laurent, thank you for the report for Ubuntu user.
This PPA looks good to update, and this way to link with the prefix is cool !
Here I moved (exiled) temporary to Manjaro XFCE, so here I have problems with a too 'new' Qt 5.7 ( focus problems with mouse wheel, etc..)
In waiting for Qt to be patched/fixed, I'm using the appimage of Krita ( it contains a patched Qt by Krita team).

link Laurent Jospin  

Ha, I'm happy to see that the mouse wheel problems don't come from what I added in code ^^ (but apparently it's also present in the qt in the ppa).

I use appimage for production, but I need to build krita from sources to help with the development.

link David Revoy Author,

Really cool! That's what I want to re-do as well on my setup :-)
:thumb up: !

link Yehochanan  

It seems that gettext-kde was deleted from xenial (ubuntu 16.04) repositories. Would I be able to use the .deb from the previous release or would this cause dependency issues?

link David Revoy Author,

Hey, I moved to Manjaro/Arch 3 or 4 month ago , so sorry for the outdated 16.04 install line with dependencies. I built yesterday from scratch and all dependencies I needed were :

sudo pacman -S base-devel kio kitemmodels gsl libraw opencolorio exiv2 openexr fftw curl boost-libs hicolor-icon-theme extra-cmake-modules kdoctools python boost eigen vc poppler-qt5 poppler-qt5

So, no gettext ( or gettext was merged with another lib, or Krita don't use it anymore, maybe it was one for the Calligra past ) . Try to skip the install of gettext, and configure. If the system is not complaining ; it will mean it's not a dependency anymore. In this case, I'll remove it from the list ( let me know ). Good luck!

link Peter  

I would suggest to replace make with ninja. It's faster and automatically sets the number of jobs.

link Jean-René  

I just compiled Krita 3.0.1 on Ubuntu 16.04 and I can confirm that gettext-kde is no longer required. It compiled just fine without it.

link Jean-René  

Thanks for the tip. I did try upgrading QT in hope that it would resolve a double menu bar problem that I have with Unity global menu ( Compiling Krita 3.0.1 with the latest QT libraries resolved it but gave me an app the same as the app image (e.g. No global menu and the menus in the app). Would you (or David) happen to know how to get only the global menus?

The previous version of Krita that could be installed from Ubuntu (2.9.7 I believe) used to have the menus integrated into the global menu.

link Laurent Jospin  

Sorry, I don't know :S

link orko  


In the update section you accidentally merged the cmake and make -j8 lines into a one-liner.

link David Revoy Author,

Hey, thank you.
Yes, it's something that happen often ; my WYSIWYG editor on article tends to mess code :/
I'll try to fix it

link Nyksund  

I did it! My first attempts were not so successful, but your guide was very helpful!

One thing that I got stuck into while trying to cmake was that the most current source (Jan 2016) asks for Qt 5.6.0, which doesn't come bundled to any dependencies listed above and/or Ubuntu 16.04.

Here's how I got around it:

1- Installed Qt 5.6.0 (free download at ; when installing, select "Qt 5.6 > Desktop gcc" only, otherwise you'll download a lot of unnecessary libs)
2- Add the path for your newly installed Qt 5.6.0 libs on your cmake command line with -DCMAKE_PREFIX_PATH=/home/user/Qt/5.6/gcc_64/lib/cmake (path might be slightly different depending on your OS and Qt installation)

From this point on everything went smoothly and is now running :) Merci beaucoup!

link angelina william  

very nice and Informative, preparing for linux Certification, looking for some linux tutorial,found <a href="" rel="nofollow" rel="_blank" title=""></a> best institute, can anyone suggest me some books and videos.

link Broken link  

>>"( all are released under CC-By )" in the very beginning
"cc-by" link appears to be broken (leads straight to 404)
Though link to the license in the bottom of the page is correct.

link David Revoy Author,

Thank you !

link Edgar Ej  

If I had installed Krita from Ubuntu's repository, can I skip the whole tutorial and go straight to following the steps on how to update?

link David Revoy Author,

Hi Edgar,
No, it's not possible. Ubuntu repository package deliver packaged/build version. This type of file don't have source to rebuild/update.
It's a bit -for a metaphor- as if the Ubuntu's repository delivers a mp3 but you want the music score and the studio to record a new version of the music.

What I propose you is:
1. Remove the actual version of Krita using your software installer ( important!)
2. Install Krita via the Lime PPA: ( in a terminal, Ctrl+Shift+V to paste , line after line )
sudo add-apt-repository ppa:kritalime/ppa
sudo apt-get update
sudo apt-get install krita

Good luck!

link Laurent Jospin  

Apparently the newest Qt 5.8 (the opt package in ubuntu) solve the issue, so compiling on ubuntu gives you again global menu...

link Edgar Ej  

I actually think I'm going to try and compile Krita. If that fails, then there's always that ppa. I've been looking everywhere for that ppa btw...

link Edgar Ej  

Thanks for the tutorial btw...

link Edgar Ej  

Okay, new question:
I read on a different page that creating a .deb package via sudo checkinstall is better. So after make -jX, should the next command be sudo checkinstall/sudo checkinstall -j9?

link David Revoy Author,

Running checkinstall will transform the content of your 'inst' folder into a package, then you'll need to install this package with dpkg/apt/aptitude. ( I don't know the flag for multithread, I don't think checkinstall needs it ).

Here I would recommend to keep the 'build' 'inst' 'src' structure, and keep the built Krita on 'inst' . It's less effort than packaging it yourself , then resintall the package.

The recommendation you read about checkinstall works for many small programs: it's better to create small package and install them via package manager , than throwing directly all the binary into the system ( eg. in /usr/bin ) . But in this build guide, I recommend to install Krita in a 'inst' folder, and then build a bridge to make this folder able to be run by your system. This way it's even more safe ; as you can remove/update the 'inst' folder without touching to your system stability.

link Edgar Ej  

Copy that chief, will follow your instructions.

link Farid  

Thank you very much. This tutorial was greatly helpful.

I think the package "gettext-kde" does not exist in Ubuntu 16.04 anymore. Anyway, I could build Krita without this package.

link Suchiz  

Hi David, sorry to bother you. I want to add an option to the multibrush but I cant build Krita. After installing all the required package, I still have this:

-- Using CMake version: 3.5.1
-- Krita version: 4.0.0-pre-alpha
-- Release build: TRUE
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.2", minimum required is "3.0")
-- Found PythonInterp: /usr/bin/python3 (found version "3.5.2")
-- Python system site-packages directory: /usr/lib/python3/dist-packages
-- The Python files will be installed to /home/suchiz/krita/inst/lib/python3.5/site-packages. Make sure to add them to the Python search path (e.g. by setting PYTHONPATH)
Old KConfig (< 5.24.0) found.
CMake Error at CMakeLists.txt:240 (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/suchiz/krita/src/CMakeFiles/CMakeOutput.log"

Im on Ubuntu 16.04, have you got any idea ?

Thanks you !

link Jean-René  

Check Laurent Jospin's comment on 7 september 2016. You need QT5.6 and it explains how to install it.

link Glen  

When installing on Kubuntu 16.04, I encountered the following error:

No CMAKE_CXX_COMPILER could be found.

I took the following action, which solved the problem:

sudo apt-get install build-essential

link Mathias Poujol-Rost  

Nice and funny post, cheers! :)

link jasa gambar rumah  

awesome illustration, hope I can try it one day

link vidhyanshu jain  

Hey, I have been trying to build Krita, I am new to Cmake And I still have trouble building.
I have successfully followed the tutorial up until the Cmake command.
But when I do the ` make -j9 ` command nothing happens. Also my `~/krita/inst` folder is completely empty.

link Chris  

I've been meaning to one day do a compiler series and I feel like it needs to have this kind of art in it now! This is really very cool.

Post a reply

The comments on this article are archived and unfortunately not yet connected to a dedicated post on Mastodon. Feel free to continue the discussion on the social media of your choice. Link to this post:

You can also quote my account so I'll get a notification.
(eg. on my Mastodon profile.)