LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2021, 09:34 AM   #1
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 569

Rep: Reputation: 84
Compile Krita


Allo all,
I am trying to compile Krita.

I followed the instructions at
https://docs.krita.org/en/untranslat...ing_krita.html

I ran
cmake ../krita \
-DCMAKE_INSTALL_PREFIX=$HOME/kritadev/install \
-DCMAKE_BUILD_TYPE=Debug \
-DKRITA_DEVS=ON

and I get
Code:
-- Found KF5Config: /usr/lib/x86_64-linux-gnu/cmake/KF5Config/KF5ConfigConfig.cmake (found version "5.74.0") 
-- Could NOT find KF5WidgetsAddons (missing: KF5WidgetsAddons_DIR)
-- Could NOT find KF5WidgetsAddons: found neither KF5WidgetsAddonsConfig.cmake nor kf5widgetsaddons-config.cmake 
-- Could NOT find KF5Completion (missing: KF5Completion_DIR)
-- Could NOT find KF5Completion: found neither KF5CompletionConfig.cmake nor kf5completion-config.cmake 
-- Found KF5CoreAddons: /usr/lib/x86_64-linux-gnu/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.74.0")
What is that?
 
Old 05-15-2021, 10:43 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,929

Rep: Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817
If you ar running any version of *Buntu (or Manjaro, or Fedora, or Debian, or ...) then Krita i in oneof your repositories and you should not be compiling it from source. Why can you not using your package manager? What version//release of what distribution are you running?
 
Old 05-15-2021, 11:01 AM   #3
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,706

Rep: Reputation: Disabled
Have you installed all the build dependencies listed there? Like libkf5widgetsaddons-dev and libkf5completion-dev?

Even if you're building from source, it's much easier to rebuild from your distro sources than build from scratch. You do know about apt-get source and apt-get build-dep, don't you?

Last edited by shruggy; 05-15-2021 at 11:04 AM.
 
Old 05-15-2021, 06:36 PM   #4
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 569

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by wpeckham View Post
If you are running any version of *Buntu (or Manjaro, or Fedora, or Debian, or ...) then Krita is in one of your repositories and you should not be compiling it from source. Why can you not using your package manager? What version//release of what distribution are you running?
I am running Kubuntu 20.10. Yes, Krita is in Discover.
But the goal here is to see how to compile Krita and to modify something in Krita and to figure out where to place the executable.
 
Old 05-16-2021, 05:25 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Compile Krita

Getting all ~69 build dependencies installed :
Code:
sudo apt-get build-dep krita
"build-dep list" https://packages.ubuntu.com/source/groovy/krita
→ → Other Packages Related to krita


-

Last edited by knudfl; 05-16-2021 at 02:13 PM.
 
2 members found this post helpful.
Old 05-16-2021, 10:51 AM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,929

Rep: Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817Reputation: 2817
Quote:
Originally Posted by vmelkon View Post
I am running Kubuntu 20.10. Yes, Krita is in Discover.
But the goal here is to see how to compile Krita and to modify something in Krita and to figure out where to place the executable.
In general, the build process install has install locations specified. You can change them, and if you code enough to modify the package you should already know hoe to find and change the install base.

Best of luck, I think with the install of the prerequisites for the build you are on the right track.
 
Old 06-09-2021, 11:51 PM   #7
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 569

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by knudfl View Post
Getting all ~69 build dependencies installed :
Code:
sudo apt-get build-dep krita
"build-dep list" https://packages.ubuntu.com/source/groovy/krita
→ → Other Packages Related to krita


-
It says
jake@john-desktop90:~$ sudo apt-get build-dep krita
[sudo] password for jake:
Reading package lists... Done
E: Unable to find a source package for krita
 
Old 06-10-2021, 12:49 AM   #8
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,706

Rep: Reputation: Disabled
Do you have deb-src lines enabled in your /etc/apt/sources.list?
 
2 members found this post helpful.
Old 06-10-2021, 07:22 PM   #9
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 569

Original Poster
Rep: Reputation: 84
Now I get

Code:
-- Krita version: 5.0.0-prealpha
-- Branding selected: Next
-- Python system site-packages directory: /usr/lib/python3/dist-packages
Installing in /home/jake/kritadev/install. Run /home/jake/kritadev/build/prefix.sh to set the environment for krita.
-- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) 
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindPNG.cmake:146 (find_package_handle_standard_args)
  CMakeLists.txt:620 (find_package)
but I already ran
sudo apt install zlib1g-dev
sudo apt install libpng-dev
 
Old 06-11-2021, 12:49 AM   #10
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,706

Rep: Reputation: Disabled
Well, the problem is only with finding ZLib. CMake fails to find libpng because of the first error. From /usr/share/cmake-3.16/Modules.FindPNG.cmake:
Quote:
The following variables may also be set, for backwards compatibility:

``PNG_LIBRARY``
where to find the PNG library.
``PNG_INCLUDE_DIR``
where to find the PNG headers (same as PNG_INCLUDE_DIRS)

Since PNG depends on the ZLib compression library, none of the above
will be defined unless ZLib can be found.
I guess CMakeLists.txt of Krita changed recently, and now breaks builds with CMake 3.16.

Last edited by shruggy; 06-11-2021 at 02:25 AM.
 
1 members found this post helpful.
Old 06-11-2021, 04:56 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Required deb-src lines in /etc/apt/sources.list lines are ....
Code:
deb-src http://archive.ubuntu.com/ubuntu/ groovy main universe

deb-src http://archive.ubuntu.com/ubuntu/ groovy-updates main universe
... Then there shouldn't be any missing 'build prerequisites' :
Code:
sudo apt update
sudo apt build-dep krita

cd krita/ && mkdir build && cd build/
cmake ..
.. and the cmake configuration is perfect, no errors : Ubuntu 20.04 .
EDIT : Ubuntu 20.04
$ make
[100%] Linking CXX executable krita
[100%] Built target krita

EDIT 1:
Krita 5.0.0-prealpha https://github.com/KDE/krita configures OK with cmake in Ubuntu 20.10 :
--Build files have been written to ~/tmp/krita/build

EDIT 2:
$ sudo apt install libmypaint-dev (One of the optional build packages for 5.0.0).
Your cmake options : $ cmake -DCMAKE_BUILD_TYPE=Debug -DKRITA_DEVS=ON ../
Also OK. --Build files have been written to ~/tmp/krita/build

-

Last edited by knudfl; 06-11-2021 at 10:05 AM.
 
1 members found this post helpful.
Old 06-11-2021, 01:37 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Compiling with "BUILD_TYPE=Debug" will require 9-10 GB build space, and take some hours to do.

Krita 5.0.0-prealpha, Ubuntu 20.10 :
Code:
$ make
[100%] Linking CXX executable krita
[100%] Built target krita
 
1 members found this post helpful.
Old 06-11-2021, 06:49 PM   #13
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 569

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by knudfl View Post
Compiling with "BUILD_TYPE=Debug" will require 9-10 GB build space, and take some hours to do.

Krita 5.0.0-prealpha, Ubuntu 20.10 :
Code:
$ make
[100%] Linking CXX executable krita
[100%] Built target krita
Holy smokes!
My krtia folder that I downloaded has 11,250 fiels and 810 folders and it is 932 MB. People typed that much code?
 
Old 06-11-2021, 07:00 PM   #14
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 569

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by knudfl View Post
Required deb-src lines in /etc/apt/sources.list lines are ....
Code:
deb-src http://archive.ubuntu.com/ubuntu/ groovy main universe

deb-src http://archive.ubuntu.com/ubuntu/ groovy-updates main universe
... Then there shouldn't be any missing 'build prerequisites' :
Code:
sudo apt update
sudo apt build-dep krita

cd krita/ && mkdir build && cd build/
cmake ..
.. and the cmake configuration is perfect, no errors : Ubuntu 20.04 .
EDIT : Ubuntu 20.04
$ make
[100%] Linking CXX executable krita
[100%] Built target krita

EDIT 1:
Krita 5.0.0-prealpha https://github.com/KDE/krita configures OK with cmake in Ubuntu 20.10 :
--Build files have been written to ~/tmp/krita/build

EDIT 2:
$ sudo apt install libmypaint-dev (One of the optional build packages for 5.0.0).
Your cmake options : $ cmake -DCMAKE_BUILD_TYPE=Debug -DKRITA_DEVS=ON ../
Also OK. --Build files have been written to ~/tmp/krita/build

-
But are those lines
deb-src http://archive.ubuntu.com/ubuntu/ groovy main universe
deb-src http://archive.ubuntu.com/ubuntu/ groovy-updates main universe

suppose to exist in that sources.list file or do I have to type them in?
I don't have those lines. Mine looks like

Code:
# deb cdrom:[Kubuntu 20.10 _Groovy Gorilla_ - Release amd64 (20201022)]/ groovy main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ca.archive.ubuntu.com/ubuntu/ groovy main restricted
deb-src http://ca.archive.ubuntu.com/ubuntu/ groovy multiverse restricted universe main

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ca.archive.ubuntu.com/ubuntu/ groovy-updates main restricted
deb-src http://ca.archive.ubuntu.com/ubuntu/ groovy-updates multiverse restricted universe main

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ca.archive.ubuntu.com/ubuntu/ groovy universe
# deb-src http://ca.archive.ubuntu.com/ubuntu/ groovy universe
deb http://ca.archive.ubuntu.com/ubuntu/ groovy-updates universe
# deb-src http://ca.archive.ubuntu.com/ubuntu/ groovy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ca.archive.ubuntu.com/ubuntu/ groovy multiverse
# deb-src http://ca.archive.ubuntu.com/ubuntu/ groovy multiverse
deb http://ca.archive.ubuntu.com/ubuntu/ groovy-updates multiverse
# deb-src http://ca.archive.ubuntu.com/ubuntu/ groovy-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ca.archive.ubuntu.com/ubuntu/ groovy-backports main restricted universe multiverse
deb-src http://ca.archive.ubuntu.com/ubuntu/ groovy-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu groovy partner
# deb-src http://archive.canonical.com/ubuntu groovy partner

deb http://security.ubuntu.com/ubuntu groovy-security main restricted
deb-src http://security.ubuntu.com/ubuntu groovy-security multiverse restricted universe main
deb http://security.ubuntu.com/ubuntu groovy-security universe
# deb-src http://security.ubuntu.com/ubuntu groovy-security universe
deb http://security.ubuntu.com/ubuntu groovy-security multiverse
# deb-src http://security.ubuntu.com/ubuntu groovy-security multiverse

So I added these lines at the bottom
#I added these for krita
deb-src http://archive.ubuntu.com/ubuntu groovy main universe
deb-src http://archive.ubuntu.com/ubuntu groovy-updates main universe

and ran
sudo apt-get build-dep krita
and I guess it did nothing and it says
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 
Old 06-12-2021, 03:33 AM   #15
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,706

Rep: Reputation: Disabled
Quote:
Originally Posted by vmelkon View Post
But are those lines
deb-src http://archive.ubuntu.com/ubuntu/ groovy main universe
deb-src http://archive.ubuntu.com/ubuntu/ groovy-updates main universe

suppose to exist in that sources.list file or do I have to type them in?
These are equivalent as they include both main and universe components:
Code:
deb-src http://ca.archive.ubuntu.com/ubuntu/ groovy multiverse restricted universe main
[...]
deb-src http://ca.archive.ubuntu.com/ubuntu/ groovy-updates multiverse restricted universe main
 
  


Reply

Tags
krita


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Krita Devs Work on SVG Support, Python Scripting, and Text Tools for Krita 3.2 LXer Syndicated Linux News 0 12-23-2016 05:07 AM
LXer: Digital Painting with Krita 2.9 provides the missing Krita documentation LXer Syndicated Linux News 0 01-22-2016 05:41 AM
LXer: Krita Animation Edition Gets a Second Beta Release, Still Not Based on Krita 3.0 - Video LXer Syndicated Linux News 0 12-13-2015 12:44 AM
LXer: Krita Port to KDE Frameworks 5 and Qt 5 Almost Done, Krita 3.0 Coming Later This Year LXer Syndicated Linux News 0 09-26-2015 10:23 PM
LXer: Krita Team Seeking Sponsorship to Take Krita to Next Level LXer Syndicated Linux News 0 12-02-2009 10:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration