Date: 01 Jan, 2022
Posted by: admin
In: linux, open source & software
To make a pie, first invent the universe. To install digikam, well probably best to give in and go with a pre-compiled binary; but failing that then this might help (and if you want Jasper for other reasons).
Not sure if this is actual WordArt but it being the “logo” for a image processing toolkit seems ironic!
I had an idea about creating a digikam package for Kubuntu, as they only do flatpack, appimage, and snap now. I started my linux days with Slackware, so I thought this would be easy. But, I am conscious it’s been a long time since I was ./configure; make; make install-ing with the best of them …
During install I came across problems as the digikam bootstrap.linux script (which appears to run cmake, which maybe in turn runs make??) was throwing a bunch of errors (due to many unmet dependencies).
The INSTALL doc in the project root directory says this (note second point):
1) Select an empty directory to use for building the software.
Let $BUILD_DIR denote this directory.
2) Generate the makefiles used for building the software. To do this,
invoke the command:
cmake -H$SOURCE_DIR -B$BUILD_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR $OPTIONS
where $OPTIONS corresponds to zero or more -D options as described below
under the heading "Cmake Options".
3) Build the code using the make utility. To do this, invoke the command:
cmake --build $BUILD_DIR
4) Run the test suite to ensure that the software seems to be working
correctly. To do this, invoke the commands:
cd $BUILD_DIR
ctest --output-on-failure
5) Install the software. To do this, invoke the command:
cmake --build $BUILD_DIR --target install
Invoking the command under 2) requires choices to be made for the directories to use.
This could be made more clear by providing an example, say, so I made an issue on their github.
I found under Kubuntu, using BASH, that BUILD_DIR="~/Downloads/jasper/buildlocal/"
for some reason didn’t work with cmake. As you can see, I’m not experienced with cmake so I don’t know why.
The following is what I did to install under my /home/username/Downloads
directory:
git clone https://github.com/jasper-software/jasper.git # for jasper for digikam
cd jasper/
mkdir buildlocal
cmake -H"/home/username/Downloads/jasper"
\ -B"/home/username/Downloads/jasper/buildlocal"
\ -DCMAKE_INSTALL_PREFIX="/usr/local"
\ -DALLOW_IN_SOURCE_BUILD=TRUE
cmake --build /home/username/Downloads/jasper/buildlocal
cd buildlocal; ctest --output-on-failure
cd ..
sudo cmake --build '/home/username/Downloads/jasper/buildlocal' --target install
This gave output like:
[sudo] password for username:
[ 85%] Built target libjasper
[ 88%] Built target jasper
[ 92%] Built target imgcmp
[ 95%] Built target multithread
[ 98%] Built target imginfo
[100%] Built target doc
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/lib/pkgconfig/jasper.pc
-- Up-to-date: /usr/local/share/doc/JasPer/README
-- Up-to-date: /usr/local/lib/libjasper.so.7.0.0
-- Up-to-date: /usr/local/lib/libjasper.so.7
-- Up-to-date: /usr/local/lib/libjasper.so
-- Up-to-date: /usr/local/include/jasper/jas_cm.h
[...]
-- Up-to-date: /usr/local/bin/jasper
-- Up-to-date: /usr/local/bin/imginfo
-- Up-to-date: /usr/local/bin/imgcmp
-- Up-to-date: /usr/local/bin/multithread
-- Up-to-date: /usr/local/share/man/man1/jasper.1
-- Up-to-date: /usr/local/share/man/man1/imginfo.1
-- Up-to-date: /usr/local/share/man/man1/imgcmp.1
-- Up-to-date: /usr/local/share/doc/JasPer/html
[...]
I tried to use checkinstall as I wanted to make a .deb package but I couldn’t get it to work as cmake required to be run using sudo:
checkinstall -D "cmake --build '/home/username/Downloads/jasper/buildlocal' --target install" # this failed, as did running it with sudo
I’ve asked a question on the Unix StackOverflow about using checkinstall to cmake.
Then once installed I did
jasper --help # confirmed the install
Now to try and get digikam to build!
Apologies that this post looks like a pile of carp. Will have to modify my CSS and do some other web work in the new year.
Hope it’s a good one for you!
Be the first to comment
Comment Form