AppImageLauncher
AppImageLauncher copied to clipboard
Things I needed to do to get AppImageLauncher to build on Debian Bookworm
Pre-submit checks
- [X] I checked for similar issues beforehand, but could not find any, not even closed ones. I could not add my bug report to any existing issue.
- [X] I am going to take the time to to fill in all the required details. I know that the bug report will be dismissed otherwise.
Describe the bug
Hello! I am filing this as one omnibus bug rather than submitting a PR or breaking it down into individual bugs because I'm not a developer on this project and it is a large and complicated process and I think if I try to do everything "in progress" I will make mistakes and will cause more harm than good. I hope that the folks who are developers on the project will be able to put this information to good use; if not then please feel free to simply close the bug, and I'm sorry for bothering you.
I attempted to use the kinetic AppImageLauncher deb on Debian Bookworm and it failed:
appimagelauncher : Depends: libappimage0 (>= 0.1.6) but it is not installable
I decided to try building it from source by cloning it from the master branch here and following the build instructions, and I ran into a number of issues. I managed to work my way through them all and get it to build and install, so I wanted to share my work with you because I hope you will be able to use what I discovered to improve things for everyone.
I've appended below the exact script I ended up writing to get it to build. I describe each of the fixes I had to make in more detail in the following bullet points.
-
The version of libappimage that you're cloning into the source tree and building is using a URL for boost that no longer exists. I replaced it with a different URL that does exist. This may not be the right fix; the right fix might be to use a newer version of libappimage that has already been fixed to use a different URL for boost. It might also be appropriate to upgrade to a newer version of boost (which you might want to do for another reason described below) which is downloadable from a different URL. All I'm doing here is pointing out the solution, not suggesting what I think the best solution is. ;-)
-
As you can see in the script, I used
apt build-dep appimagelauncher
to get the build dependencies. I was able to do this because I installed the deb-src PPA repo. However, that didn't grab all of the necessary build-dependencies, and I had to install some separately withsudo apt install libssl-dev xxd qtdeclarative5-dev patchelf
. I suppose the files used to build the deb package need to be updated to include these additional dependencies. -
The boost library version that you're using is incompatible with current glibc because
PTHREAD_STACK_MIN
is no longer a preprocessor symbol. This is fixed in newer boost versions, so the right fix here is probably to upgrade the build to use a newer version, but I didn't want to do anything that drastic so I made it build by making the small patch shown below. -
There are dependencies missing in the main AppImageLauncher build config, so
make -j
fails. I didn't bother to fix it; I just did the final build sequentially rather than in parallel. But it would be nice to flesh these out and fix them to make it possible to build faster.
I hope this is useful!
Boost patch:
--- build/lib/AppImageUpdate/lib/libappimage/boost-EXTERNAL-prefix/src/boost-EXTERNAL/boost/thread/pthread/thread_data.hpp.orig 2023-09-02 10:25:09.052220349 -0400
+++ build/lib/AppImageUpdate/lib/libappimage/boost-EXTERNAL-prefix/src/boost-EXTERNAL/boost/thread/pthread/thread_data.hpp 2023-09-02 10:25:11.964247556 -0400
@@ -57,9 +57,6 @@
#else
std::size_t page_size = ::sysconf( _SC_PAGESIZE);
#endif
-#if PTHREAD_STACK_MIN > 0
- if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
-#endif
size = ((size+page_size-1)/page_size)*page_size;
int res = pthread_attr_setstacksize(&val_, size);
BOOST_VERIFY(!res && "pthread_attr_setstacksize failed");
Build script:
#!/bin/bash -ex
TD="/tmp/ail.$$"
REPO=https://github.com/TheAssassin/AppImageLauncher
#trap "rm -rf $TD" EXIT
mkdir $TD
cd $TD
git clone $REPO
cd AppImageLauncher
git submodule update --init --recursive
sed -i.bak -e s,https://dl.bintray.com/boostorg/release/1.69.0/source,https://newcontinuum.dl.sourceforge.net/project/boost/boost/1.69.0, lib/AppImageUpdate/lib/libappimage/cmake/dependencies.cmake
sudo apt build-dep appimagelauncher
sudo apt install libssl-dev xxd qtdeclarative5-dev patchelf
export PREFIX=/usr/local
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="$PREFIX"
if ! make -j libappimage libappimageupdate libappimageupdate-qt; then
patch -p1 < "$(dirname "$0")"/appimagelauncher-boost.patch
make -j libappimage libappimageupdate libappimageupdate-qt
fi
cmake .
# N.B. -j doesn't work here
make
sudo make install
Expected behavior
See above.
Steps to reproduce the issue
No response
Screenshots
No response
Distribution and desktop environment
x86_64 Debian Bookworm GNOME
Installed AppImageLauncher version
current master branch
List of AppImages you tried
No response
Additional context
No response
Sorry, one more thing... make install
doesn't install libappimage.