Bug 472422 - Cannot build krita; cmake 3.25.1 insists there's no install prefix when there is
Summary: Cannot build krita; cmake 3.25.1 insists there's no install prefix when there is
Status: RESOLVED NOT A BUG
Alias: None
Product: krita
Classification: Applications
Component: * Unknown (show other bugs)
Version: git master (please specify the git hash!)
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-20 08:29 UTC by David
Modified: 2023-07-24 07:01 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
CMakeOutput.log (45.97 KB, text/x-log)
2023-07-21 00:03 UTC, David
Details
attachment-3689056-0.html (1.93 KB, text/html)
2023-07-24 00:56 UTC, David
Details
attachment-3694359-0.html (2.73 KB, text/html)
2023-07-24 02:32 UTC, David
Details
attachment-3702224-0.html (3.59 KB, text/html)
2023-07-24 05:03 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2023-07-20 08:29:03 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Grab source from krita git.
2. Follow build instructions.
3. Build fails with error message that there's no install prefix even though I provided one.

OBSERVED RESULT
Build fails.

EXPECTED RESULT
Build succeeds.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Debian Bookworm
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Dmitry Kazakov 2023-07-20 08:31:24 UTC
Hi, David!

Please provide the full build log
Comment 2 David 2023-07-21 00:03:46 UTC
Created attachment 160414 [details]
CMakeOutput.log

Here you go, using a fresh git clone.
Comment 3 Bug Janitor Service 2023-07-21 03:45:16 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 4 Dmitry Kazakov 2023-07-21 07:26:58 UTC
Erm... I meant the output of CMake actually
Comment 5 David 2023-07-21 08:58:58 UTC
OK. This is all cmake shows me in terminal:

CMake Error at data/CMakeLists.txt:34 (install):
  install FILES given no DESTINATION!

CMake Error at CMakeLists.txt:47 (ecm_add_app_icon):
  Unknown CMake command "ecm_add_app_icon".

I have tried it with three different install prefixes, and cmake insists it has been given no destination.

My Krita source is in /home/software/gits/krita, not the "kritadev" mentioned in the web page about building Krita [https://docs.krita.org/en/untranslatable_pages/building_krita.html#building-on-linux]. So I have tried giving it the full path to the install folder ("/home/software/gits/krita/install"), tried using the "$HOME/software/gits/krita/install" (modified version of what's on the building page), and tried using "../install".

Sorry, I find the instructions on the building Krita page unclear and lacking in explanation.

I've compiled other software on my system from git, all under the /home/software/gits directory, and compiling worked.

Ideas?
Comment 6 David 2023-07-21 09:04:19 UTC
OK. This is all cmake shows me in terminal:

CMake Error at data/CMakeLists.txt:34 (install):
  install FILES given no DESTINATION!

CMake Error at CMakeLists.txt:47 (ecm_add_app_icon):
  Unknown CMake command "ecm_add_app_icon".

Or is this what you want (found when running cmake-gui and clicking configure):

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error in CMakeLists.txt:
  GHS_TOOLSET_ROOT directory "/usr/ghs" does not exist.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.25)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
See also "/home/software/krita/build/CMakeFiles/CMakeOutput.log".

I have tried it with three different install prefixes, and cmake insists it has been given no destination.

My Krita source is in /home/software/gits/krita, not the "kritadev" mentioned in the web page about building Krita [https://docs.krita.org/en/untranslatable_pages/building_krita.html#building-on-linux]. So I have tried giving it the full path to the install folder ("/home/software/gits/krita/install"), tried using the "$HOME/software/gits/krita/install" (modified version of what's on the building page), and tried using "../install".

Sorry, I find the instructions on the building Krita page unclear and lacking in explanation.

I've compiled other software on my system from git, all under the /home/software/gits directory, and compiling worked.

Ideas?
Comment 7 Bug Janitor Service 2023-07-22 03:45:08 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 8 Alvin Wong 2023-07-23 08:07:19 UTC
Looks like you may be running cmake with the source path pointing to `<repo root>/krita/`. You should be using `<repo root>/` instead.
Comment 9 Halla Rempt 2023-07-23 09:22:19 UTC
That is undoubtedly the case.
Comment 10 David 2023-07-24 00:56:00 UTC
Created attachment 160487 [details]
attachment-3689056-0.html

On 7/22/23 22:07, Alvin Wong wrote:
> https://bugs.kde.org/show_bug.cgi?id=472422
>
> Alvin Wong<alvin@alvinhc.com>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |alvin@alvinhc.com
>
> --- Comment #8 from Alvin Wong<alvin@alvinhc.com>  ---
> Looks like you may be running cmake with the source path pointing to `<repo
> root>/krita/`. You should be using `<repo root>/` instead.
>
So, trying again with source listed as "/home/software/gits/krita" and 
build directory as "/home/software/gits/krita/build", now it gives me 
this error:

CMake Error at CMakeLists.txt:9 (project): GHS_TOOLSET_ROOT directory 
"/usr/ghs" does not exist.

What is that??? I can't find any trace of that in Debian Bookworm.

Thanks, Alvin.
Comment 11 David 2023-07-24 01:00:08 UTC
I reopened it since it's not resolved. I still can't compile.
Comment 12 vanyossi 2023-07-24 01:47:33 UTC
As said before by other developers, not being able to configure the build is not a bug in krita. (when that is the case we know almost immediatly as most builders and local repos break). Please do not change the bug status back yourself.

I suggest you re read the entire build process documentation page https://docs.krita.org/en/untranslatable_pages/building_krita.html and ask for assistance on https://krita-artists.org/ or krita on irc. If you have doubts on how to use cmake, checking cmake documentation and/or tutorials is also of help.
Comment 13 David 2023-07-24 02:32:00 UTC
Created attachment 160489 [details]
attachment-3694359-0.html

On 7/23/23 15:47, vanyossi wrote:
> https://bugs.kde.org/show_bug.cgi?id=472422
>
> vanyossi<ghevan@gmail.com>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |ghevan@gmail.com
>           Resolution|---                         |NOT A BUG
>               Status|REOPENED                    |RESOLVED
>
> --- Comment #12 from vanyossi<ghevan@gmail.com>  ---
> As said before by other developers, not being able to configure the build is
> not a bug in krita. (when that is the case we know almost immediatly as most
> builders and local repos break). Please do not change the bug status back
> yourself.
>
> I suggest you re read the entire build process documentation page
> https://docs.krita.org/en/untranslatable_pages/building_krita.html  and ask for
> assistance onhttps://krita-artists.org/  or krita on irc. If you have doubts on
> how to use cmake, checking cmake documentation and/or tutorials is also of
> help.
>
OK. I've read through the building krita page multiple times. It doesn't 
help. It seems to just blithely assume "everything works" and provides 
little or now help when it doesn't.

I've built many other applications using cmake, and the build has never 
failed the way the Krita build fails. Perhaps it's a peculiarity of the 
Krita project.

Oh, well, I guess I'll ask on krita-artists. Thanks.
Comment 14 David 2023-07-24 05:03:21 UTC
Created attachment 160490 [details]
attachment-3702224-0.html

On 7/23/23 16:31, david wrote:
> On 7/23/23 15:47, vanyossi wrote:
>> https://bugs.kde.org/show_bug.cgi?id=472422
>>
>> vanyossi<ghevan@gmail.com>  changed:
>>
>>             What    |Removed                     |Added
>> ----------------------------------------------------------------------------
>>                   CC|                            |ghevan@gmail.com
>>           Resolution|---                         |NOT A BUG
>>               Status|REOPENED                    |RESOLVED
>>
>> --- Comment #12 from vanyossi<ghevan@gmail.com>  ---
>> As said before by other developers, not being able to configure the build is
>> not a bug in krita. (when that is the case we know almost immediatly as most
>> builders and local repos break). Please do not change the bug status back
>> yourself.
>>
>> I suggest you re read the entire build process documentation page
>> https://docs.krita.org/en/untranslatable_pages/building_krita.html  and ask for
>> assistance onhttps://krita-artists.org/  or krita on irc. If you have doubts on
>> how to use cmake, checking cmake documentation and/or tutorials is also of
>> help.
>>
> OK. I've read through the building krita page multiple times. It 
> doesn't help. It seems to just blithely assume "everything works" and 
> provides little or no help when it doesn't.
>
> I've built many other applications using cmake, and the build has 
> never failed the way the Krita build fails. Perhaps it's a peculiarity 
> of the Krita project.
>
> Oh, well, I guess I'll ask on krita-artists. Thanks.
>
Final update. I asked on krita-artists.org. A responder said he thought 
it was connected with the Green Hills MULTI Generator. I don't have that 
on Debian Bookworm, so I guess that's some 3rd party tool you're using? 
Based on their website, it seems to be a commercial product of some sort.

Oh, well.  Guess I'll just stick with the version in Debian Bookworm.
Comment 15 Halla Rempt 2023-07-24 07:01:25 UTC
"Green Hills MULTI Generator."

No, that's nonsense. Krita doesn't use that.