Question about Krita's build process on Windows

Greetings. Happy new year.
So, days ago, while discussing with participants to a topic, I had to read that building Krita on Windows happens with trouble in the way.

  1. Could you please explain the reason all those who have tried find the process difficult ?
  2. Do the app’s main developers build the Windows release of Krita from Linux ? from Windows ?

I never tried building Krita on windows but if I remember correctly you have to use MinGW and its tool chain. I used it to compile other stuff for work though and it was always a pain in the hindquarters especially getting all the dependencies right and ready. I had other issues too when I once had to compile a monkey patched version of PostgreSQL-Server or any other complex applications.

Well, generally, an average Windows user is less tech savvy than a average say linux user. So that already means things are more likely to be difficult. That said, the windows build is more sensitive as it only builds under certain compilers and not others, and even wrong versions of something can lead to issues. Krita does include the list of things that one should download and follow. And if you follow that guide step by step, and if you choose to use the prebuilt dependencies. Then the difficulty isn’t that much more really. Just slightly more annoying.

The only thing that can sometimes get annoying is the python plugin can sometimes fail. Or some other plugin.

But overall, it shouldn’t be a problem. Now if you plan to build the dependencies yourself, well that would probably up the bar.

1 Like

I’ve built Krita on a variety of hardware on Linux and Windows and windows was definitely more manual/error prone. When building on Linux you can run maybe like 3 commands in a terminal and you’re ready to build Krita. Also you don’t need to build the qt dependencies at all if you don’t want to.

On Windows there are many more manual steps and you need to be more careful of exactly what version of each item you install. I remember getting annoyed at how much I had to double check when trying to build it since everything had to be so precise. In fact, I think its easier to install a Linux virtual machine and install Krita on there than to install it on windows natively. But I am more comfortable with Linux so I may be biased :slightly_smiling_face: . But if you are very careful building on windows you should be ok.

The Windows build is built on a Windows server. You can view the krita builds on the kde binary factory and view that the server is windows.

Developers develop on the machines they have at home. I think most developers have Linux but some do have a Windows machine. I think Dmitry has a windows computer and possibly some others do as well.

2 Likes

I’d like to know if the official build is created from Windows or from Linux. And I’d also like to know why :

  1. Krita is faster on Linux
  2. Krita’s windows version performs faster when it’s built from source, from Windows again.

As far as I know the binaries are compiled on the systems they target i.e. the Windows version is built on windows, Linux version on a Linux etc. Cross compiling gets more comon these days but most of the time it’s easier to simply build on the target system.

And as mentioned

Might depend of compiler.
Using gcc 9 instead of gcc 8 under linux improve performance from 30%
Just by using another compiler

So can’t really tell if Krita is faster on linux than on windows, but:

  • OS (windows, linux) can have an impact
  • version of OS can have an impact
  • version of tools used to compile can have an impact

Krita is always built from source.

I think your question is more related to a comment that someone wrote that if you build krita by yourself it will be faster than if you use official binaries.

I have no idea from where this information comes from, and I’m too lazy and not enough interested by subjecf to search in forum who wrote that to ask why he/she wrote that :slight_smile:

But maybe this person is the person to ask for more information about this information

Grum999

1 Like

I can imagine that the Linux build is faster because it simply is developed on one and using it’s native libraries while the windows version libraries all are full of workarounds do the things the windows way, for example Windows has no POSIX standard and I can think of many other tiny things that together can have a noticeable impact on performance just because of this compatibility layer. The same with windows tools running on Linux.

For why the self compiled version is faster? Maybe it makes a difference how the libraries are linked but I’m really just guessing because from the top of my head I can’t think of a good reason why it should, except maybe that the compiler and the libraries are simply a better version than on the official compile machine.

It is possible that a capable programmer can still implement a few optimizations in relation to their own hardware, but that is speculation.

Michelist