Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrenchBroom AppImage built on Ubuntu 14.04 complains about missing libpng12.so.0 on Arch Linux #177

Closed
Calinou opened this issue Jun 28, 2016 · 4 comments

Comments

@Calinou
Copy link

Calinou commented Jun 28, 2016

I'm building an AppImage for TrenchBroom from a Xubuntu 14.04 64-bit virtual machine. It runs fine in the virtual machine, but on the host OS (Arch Linux 64-bit), it complains about a missing libpng12.so.0, even though it is packaged in the AppImage.

I also tried to put the libraries in usr/lib/ instead of lib/ inside of the AppDir, but in this case the AppImage segfaults on start on Arch Linux, and when run through GDB, complains about a missing libX11.so.6 library. In that case, it however ran fine in the virtual machine.

(Note: the AppImage I'm making is preliminary, it includes any library that's linked to the binary, including the libc.)

Here's the AppImage: TrenchBroom.AppImage.zip

@probonopd
Copy link
Member

probonopd commented Jun 28, 2016

lib/ inside the AppImage is ignored, so you should move all libraries that you want to include to usr/lib. Can you post the script you used for making the AppImage?

I will test your AppImage on various systems later today.

Is Xubuntu 14.04 the oldest machine your software builds on? Be aware that an AppImage can only run on distributions that are newer than or the same age as the system you used for building.

@Calinou
Copy link
Author

Calinou commented Jun 28, 2016

lib/ inside the AppImage is ignored, so you should move all libraries that you want to include to usr/lib.

I had another problem about the X11 library (which was included in the AppImage) when my libraries were in usr/lib (and I made sure they were marked as executable, by the way), see my first post.

Can you post the script you used for making the AppImage?

I didn't script it, this is hand-made, just for testing… Once I get it working, I will script it. That said, I used the command-line interface (since I ran into many issues with the AppImageAssistant GUi).

Is Xubuntu 14.04 the oldest machine your software builds on? Be aware that an AppImage can only run on distributions that are newer than or the same age as the system you used for building.

I haven't tested but I already needed a CMake PPA for it to build there (I'm aware it's just a compile-time dependency though), I don't really care about very old distros (which are usually end-of-life). Also, right now, I'm lacking storage on this PC and thus can't have a Xubuntu 12.04 VM (but once it is scripted, it should be easy to migrate).

@probonopd
Copy link
Member

probonopd commented Jun 28, 2016

APP=TrenchBroom
LOWERAPP=${APP,,}

# Get the old AppImage and extract it
mkdir -p $APP
cd $APP
wget https://github.com/probonopd/AppImageKit/files/337605/TrenchBroom.AppImage.zip
unzip TrenchBroom.AppImage.zip
sudo mount TrenchBroom.AppImage /mnt -o loop,ro
cp -r /mnt $APP.AppDir
sudo chown -R $USER $APP.AppDir
sudo umount /mnt
cd $APP.AppDir

# lib/ inside the AppImage is ignored
mv lib usr

# Source helper functions
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
. ./functions.sh
rm functions.sh

# Delete blacklisted libraries that should not go into the AppImage
delete_blacklisted

# Fix the .desktop file and get desktop integration
echo "Type=Application" >> trenchbroom.desktop
get_desktopintegration $LOWERAPP

# Check if it runs - it does (at least on Ubuntu 16.04)
./AppRun

# Go out of the AppDir
cd -

# Now repackage as an AppImage
ARCH=$(arch)
VERSION=2.0.0
generate_appimage

# Check if it still runs - it does (at least on Ubuntu 16.04)
../out/TrenchBoom-2.0.0-x86_64.AppImage

Now you should test the AppImage on each of your target systems.

@Calinou
Copy link
Author

Calinou commented Jun 28, 2016

Thanks, it works. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants