Building & Compiling [Solved]

Preferably you want a build directory which should be automatically created by build scripts, but since this is a cloned repo to which you I assume have no write permissions (from upstream owner) you can just build inside it.
And then if you need to undo just delete it and clone again.

If you plan to make changes to code it would be better to create a fork if it's supported on their git site, or otherwise push to your private repo somewhere and create a build branch, then you can switch from clean source tree branch to build branch without affecting original code.
No, I have no plans to make any changes to the code.

Thanks for the confirmation on building inside the build directory.
I'll continue on in a little while.
I've got a few things that need tending to:-
 


Running the dependency fetch script for Krita went well.

Code:
#    ext_freetype - master (0e8a962eaf6f3c8eab1788f46dcffffea9c9ffa8)
##    ext_fontconfig - master (0e8a962eaf6f3c8eab1788f46dcffffea9c9ffa8)
##    ext_fftw3 - master (0e8a962eaf6f3c8eab1788f46dcffffea9c9ffa8)
##    ext_extra_cmake_modules - master (0e8a962eaf6f3c8eab1788f46dcffffea9c9ffa8)
##    ext_expat - master (0e8a962eaf6f3c8eab1788f46dcffffea9c9ffa8)
##    ext_exiv2 - master (0e8a962eaf6f3c8eab1788f46dcffffea9c9ffa8)
##    ext_eigen3 - master (0e8a962eaf6f3c8eab1788f46dcffffea9c9ffa8)
##    ext_brotli - master (0e8a962eaf6f3c8eab1788f46dcffffea9c9ffa8)
##    ext_boost - master (6c3afca3db45fda65042d825032897a579009e75)
##
##
## Building with the following environment variables:
##    ASAN_OPTIONS=detect_leaks=0:new_delete_type_mismatch=0:detect_odr_violation=0:stack-use-after-scope=0:alloc_dealloc_mismatch=0
##    CLUTTER_BACKEND=x11,*
##    CLUTTER_IM_MODULE=ibus
##    CMAKE_PREFIX_PATH=/home/c/krita-auto-1/persistent/deps/_install:/usr/:/usr/local/

Took about 10 minutes.
Pulling from the sysadmin c1-images/krita-appimage-builder took a while.
Removing intermediate containers took another 5-7 minutes.

Code:
Step 26/27 : RUN rm ${USRHOME}/appimage-workspace/deps/usr/.foo ${USRHOME}/.foo
 ---> Running in ac573d9dcfa7
Removing intermediate container ac573d9dcfa7
 ---> 42b37d4f288e
Step 27/27 : CMD tail -f /dev/null
 ---> Running in 7c4cfd47abe9
Removing intermediate container 7c4cfd47abe9
 ---> 75f5907d536d
Successfully built 75f5907d536d
Successfully tagged krita-auto-1:latest

YAY! Now I have to run the container--
 
Cleaning up the dependencies.

Code:
debian-box:~/krita-auto-1$ ./bin/run_container
Auto-select image name: krita-auto-1
Auto-select container name: krita-auto-1
### Creating a pulseaudio socket...
21
### Forwarding XAUTH cookie...
[sudo] password for alex:
4ed6ed479cfc693bcfbc53f82abd30041c41cf991f40a7f6ebc5a4881a58d78e
a@debian-box:~/krita-auto-1$ rm -rf ./persistent/deps/_install

I'll enter the container and build Krita tomorrow.
 
First time seeing CMake errors-

Code:
a@debian-box:~/krita-auto-1$ ./bin/enter
[sudo] password for alex:
### Creating a pulseaudio socket...
21
### Forwarding XAUTH cookie...
krita-auto-1
appimage@debian-box:/home/appimage/appimage-workspace/krita-build>
appimage@debian-box:/home/appimage/appimage-workspace/krita-build>~/bin/run_cmake.sh ~/persistent/krita
CMake Warning:
  Ignoring extra path from command line:

   "/home/appimage//persistent/krita"


CMake Error: The source directory "/home/appimage/persistent/krita" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
appimage@debian-box:/home/appimage/appimage-workspace/krita-build>make -j8 install

Not sure where to look for the CMakeLists.txt.
Having said that, I'll have to look around in the krita directories that I do have. Also use a search engine to find out what went wrong. I think, this is a build error not a compile error.

Maybe the build directory is specified as the src?
@CaffeineAddict : Could it be that this is happening because I need to specify the actual src directory where I unpacked Krita?

Trying to learn from my mistakes-:)
 
Last edited:
CMake Warning: Ignoring extra path from command line: "/home/appimage//persistent/krita"
The answer is in the output, the path "/home/appimage//persistent/krita" suggests a part of it is missing, it should read like:
"/home/appimage/MISSING_DIRECTORY/persistent/krita" but "MISSING_DIRECTORY" was not put into that place.

A portion of the directory is missing and the likely reason it is missing is because some variable was not initialized that was put in that place.
Therefore you need to go to that directory /home/appimage/ with your file explorer and see which directory contains persistent/kita sub directory which in turn should contain the missing CMakeLists.txt
It's also possible that persistent/krita is in same directory, therefore the error is surplus / in which case it should be removed and CMakeLists.txt should be in persistent/krita

Once you figure that out you can open ~/bin/run_cmake.sh with some text editor and investigate which variable was supposed to initialize the missing directory and then figure out why it didn't.

If you can't figure out you can manually add the missing path in the run_cmake.sh however this is not good solution because that variable is likely also used elsewhere which could result in new errors.

run_cmake.sh must not produce the warning that some path was ignored because of //
 
Last edited:
Looking for /home/appimage/ doesn't exist.
Code:
@debian-box:~/krita-auto-1/persistent$ cd /home/appimage/
bash: cd: /home/appimage/: No such file or directory

Found the persistent directory-
Code:
debian-box:~/krita-auto-1/persistent$ ls
deps  downloads  krita  qtcreator-package.tar.gz

I'd rather not add the missing path as you mentioned that it's not a good practice as the variable can/could be used elsewhere.

Could I just create the CMakeLists.txt with vim and place it in a sub- directory under /krita-auto-1?
OR> Use the directory I already created : "srckrita", a few days ago and place the CMakeList.txt file there?

I can see how building and compiling takes experience, practice and understanding.
Learning from mistakes is a good thing, however; until I actually get it I really won't 'get it' if you know what I mean.
 
Looking for /home/appimage/ doesn't exist.
How is that possible, in your previous post #45 you was in that context during build:
appimage@debian-box:/home/appimage/appimage-workspace/krita-build>

Therefore this must be somewhere in docker container that was created ex. not a real path.

Could I just create the CMakeLists.txt with vim and place it in a sub- directory under /krita-auto-1?
I can't tell sorry, it's what-if scenario which I can only guess.

I can see how building and compiling takes experience, practice and understanding.
Learning from mistakes is a good thing, however; until I actually get it I really won't 'get it' if you know what I mean.
Yes it is hard, especially when you stuck, I think you should start with some simpler package to learn.
And I also think you should start by learning basics of build systems prior to using them at such big scale already done and messed up, these are CMake and GNU build etc.

Every tool you happen to use like docker, CMake, GNU build etc. has large documentation which needs to be studied and learning these is the easiest for a developer because they do it from ground up for their code, a package maintainer will have harder time because of other people's massive work already in place which usually contains mistakes which you need to find out and fix.

Having some programming background can help a lot because every kind of programming involves building as well.

Advice No. 1 I can give you for source code is to clone from a tag instead of master branch, tagged source tree is known to already been built by someone so it should work out of the box.
If you build from non tagged clone you better be ready.
 
How is that possible, in your previous post #45 you was in that context during build:


Therefore this must be somewhere in docker container that was created ex. not a real path.


I can't tell sorry, it's what-if scenario which I can only guess.


Yes it is hard, especially when you stuck, I think you should start with some simpler package to learn.
And I also think you should start by learning basics of build systems prior to using them at such big scale already done and messed up, these are CMake and GNU build etc.

Every tool you happen to use like docker, CMake, GNU build etc. has large documentation which needs to be studied and learning these is the easiest for a developer because they do it from ground up for their code, a package maintainer will have harder time because of other people's massive work already in place which usually contains mistakes which you need to find out and fix.

Having some programming background can help a lot because every kind of programming involves building as well.

Advice No. 1 I can give you for source code is to clone from a tag instead of master branch, tagged source tree is known to already been built by someone so it should work out of the box.
If you build from non tagged clone you better be ready.
Agreed.
A simpler package to learn and build. Krita has a lot of things, it looks like that I'm not well versed in yet thus making this build hard for me to understand.

Therefore this must be somewhere in docker container that was created ex. not a real path.
I think your right on that.

A few days ago I downloaded and compiled latex2html it went fine-
Code:
bash-5.1$ make
/usr/bin/perl ./config/build.pl -x  latex2html
build.pl (Revision 1.6)
Building "latex2html" from "latex2html.pin"
touch latex2html
/usr/bin/perl ./config/build.pl -x  texexpand
build.pl (Revision 1.6)
Building "texexpand" from "texexpand.pin"
touch texexpand
/usr/bin/perl ./config/build.pl -x  pstoimg
build.pl (Revision 1.6)
Building "pstoimg" from "pstoimg.pin"
touch pstoimg
/usr/bin/perl ./config/build.pl  l2hconf.pm
build.pl (Revision 1.6)
Building "l2hconf.pm" from "l2hconf.pin"
touch l2hconf.pm

mktexlsr: Updating /usr/share/texmf-config/ls-R...
mktexlsr: Updating /usr/share/texmf-dist/ls-R...
mktexlsr: Updating /usr/share/texmf-local/ls-R...
mktexlsr: Updating /usr/share/texmf-var/ls-R...
mktexlsr: Done.
Done. Have a lot of fun with LaTeX2HTML!

I'll dedicate the next 2 weeks focusing/learning the basic's of CMake and GNU builds and the documentation.

Would installing CMake help me?
 
For now, brother until I know more of how things work I'm pushing Krita to the back burner.

The GNU Make Manual looks like a good place to start:

Other places I'm looking to learn:

Looks like build instructions with GNU, tools and a education here at the very least.

What do you think?
Suggestions are welcome.
 
Would installing CMake help me?
Ofc. because studying CMake involves either writing some CMakeLists or otherwise study already written ones.
Without CMake you can't test and you can't build to practice.

I suggest you to pick some code editor that you'll use for your work, not because to write code but because code editors provide syntax highlighting which will make reading CMake files a lot more pleasant and easier when you have colored text.

I personally use VSCode with CMake extension, here is how ti looks reading a sample CMakeLists.txt file (click image to enlarge):

cmake.png



That's a big difference compared to when you read black and white text file!
syntax highlighting is your best friend to find issues, not only that but CMake extension combined with other extensions in my case will help me also spot errors and spelling typos which is useful to troubleshoot CMakeLists files or any files without even starting to build and especially to study the syntax on it's own.

The GNU Make Manual looks like a good place to start:
Yeah, a lot of Linux software uses GNU build, CMake is mostly used for cross platform software.
 
Ofc. because studying CMake involves either writing some CMakeLists or otherwise study already written ones.
Without CMake you can't test and you can't build to practice.

I suggest you to pick some code editor that you'll use for your work, not because to write code but because code editors provide syntax highlighting which will make reading CMake files a lot more pleasant and easier when you have colored text.

I personally use VSCode with CMake extension, here is how ti looks reading a sample CMakeLists.txt file (click image to enlarge):

View attachment 21738


That's a big difference compared to when you read black and white text file!
syntax highlighting is your best friend to find issues, not only that but CMake extension combined with other extensions in my case will help me also spot errors and spelling typos which is useful to troubleshoot CMakeLists files or any files without even starting to build and especially to study the syntax on it's own.


Yeah, a lot of Linux software uses GNU build, CMake is mostly used for cross platform software.

Last year I was using Code Blocks in a tutorial I found.
Hated the blinding white interface. Changed it but still not happy so I removed it-

Just downloaded the .deb for VSCode, here:

I'm definitely interested in the extensions for errors, typos and the like.

Satisfied and educated I'll mark this thread Solved, as I wouldn't be able to finished the build on Krita.

Your help has been exemplary, CaffeineAddict, thank you!

:)
 
Last year I was using Code Blocks in a tutorial I found.
Hated the blinding white interface. Changed it but still not happy so I removed it-
lol, white text editor or IDE is out of question for me too, it burns your eyes very soon.

Just downloaded the .deb for VSCode, here:
Btw. if you're using Debian or Debian based distro then here are steps to add it to your apt and sources.list:


I'm definitely interested in the extensions for errors, typos and the like.
Here is my list:

Must have extensions no matter what one does, programming, packaging or writing docs:
I have them enabled for all projects


Then extensions that you'll benefit the most from for your cause:


I don't know if there is one for GNU build, but you can search the marketplace for any additional you might need.

Satisfied and educated I'll mark this thread Solved, as I wouldn't be able to finished the build on Krita.

Your help has been exemplary, CaffeineAddict, thank you!
You're welcome mate :)
 
Visual Studio Code is installed-:)

I'll get the extensions installed after I enjoy part of the weekend break.
 

Attachments

  • VSCode.png
    VSCode.png
    149.2 KB · Views: 35
Going through the settings and making adjustments.
The videos are good!
To install bookmarks and other extensions just type in the extension and click install.

 

Attachments

  • VSCode Setup.png
    VSCode Setup.png
    259.7 KB · Views: 22
  • Extentions.png
    Extentions.png
    167.3 KB · Views: 16
  • Bookmarks.png
    Bookmarks.png
    357.6 KB · Views: 23

Members online


Top