0ad-matters / 0ad-appimage

@0ad appimage
MIT License
26 stars 0 forks source link

rpath does not get set on some libraries #2

Closed andy5995 closed 1 year ago

andy5995 commented 1 year ago

When running the appimage and cd'ing to where it's mounted under '/tmp', the output of ldd pyrogenesis | grep "=> /tmp" should look something like this:

    libroken.so.18 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libroken.so.18 (0x00007f0a5d20b000)
    liblz4.so.1 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/liblz4.so.1 (0x00007f0a5cf64000)
    libgcrypt.so.20 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libgcrypt.so.20 (0x00007f0a5ce44000)
    libnsl.so.1 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libnsl.so.1 (0x00007f0a5ce25000)
    libFLAC.so.8 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libFLAC.so.8 (0x00007f0a5cde3000)
    libvorbisenc.so.2 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libvorbisenc.so.2 (0x00007f0a5cd37000)
    libwind.so.0 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libwind.so.0 (0x00007f0a5cd0c000)
    libheimbase.so.1 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libheimbase.so.1 (0x00007f0a5ccf9000)
    libhx509.so.5 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libhx509.so.5 (0x00007f0a5cca6000)
    libsqlite3.so.0 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libsqlite3.so.0 (0x00007f0a5cb7a000)
    libcrypt.so.1 => /tmp/.mount_0ad-0.uT758i/usr/bin/./../lib/libcrypt.so.1 (0x00007f0a5cb3c000)

But there's a problem:

$ ldd pyrogenesis | grep "=> /usr"
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007efeda939000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0x00007efeda7f6000)
    libz.so.1 => /usr/lib/libz.so.1 (0x00007efedb20d000)
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007efeda6ad000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007efeda300000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007efeda218000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007efeda1f8000)
    libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007efeda1f3000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007efeda00a000)
    /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007efedcb69000)
    libasound.so.2 => /usr/lib/libasound.so.2 (0x00007efed9f1b000)
    libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007efed7f16000)
    libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007efed7e18000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007efed7ded000)
    librt.so.1 => /usr/lib/librt.so.1 (0x00007efed7dd6000)
    libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007efed7cda000)
    libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007efed7723000)
    libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007efed72fb000)
    libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007efed7a19000)
    libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007efed710f000)
    libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007efed6fd4000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0x00007efed7a10000)
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007efed6fcc000)
    libffi.so.8 => /usr/lib/libffi.so.8 (0x00007efed6e4d000)
    libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007efed69fb000)
    libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007efed658d000)

And those libraries aren't getting copied into the lib dir.

andy5995 commented 1 year ago

Logs attached logs_13.zip

@theAssassin

andy5995 commented 1 year ago

Some info I got about it from TheAssassin

https://github.com/AppImage/pkg2appimage/blob/master/excludelist

I'll leave this ticket open for now. Anyone having a problem running the image, please leave a comment.

andy5995 commented 1 year ago

Note to self: checkrt plugin https://github.com/darealshinji/AppImageKit-checkrt

probonopd commented 1 year ago

From the AppImage documentation:

The author of an AppImage needs to decide for which target systems (Linux distributions) they want to offer the AppImage. Then, the author needs to bundle any dependencies that cannot reasonably be assumed to come with every target system (Linux distributions) in its default installation in a recent enough version.

To be able to run on any Linux distribution, an AppImage should bundle all the resources it needs at runtime that cannot be reasonably expected to be “there” in the default installation of all still-supported target systems (Linux distributions).

You can make AppImages that bundle every dependency, down to and including glibc. The advantage would be that such AppImages will run on most Linux distributions, both older and newer than the one you made the AppImage on. But some people would consider this as "bloated".

TheAssassin commented 1 year ago

Also, software using GL will most likely not work that way.

andy5995 commented 1 year ago

Thanks for the extra info. So far no problems have been reported.

Also, on this repo I'm now running the build inside an Ubuntu 18.04 docker container (since GitHub is in the process of deprecating 18.04). I'll most likely keep building in the 18.04 container until after Ubuntu ends support.

andy5995 commented 1 year ago

So far no problems have been reported.

Today, one problem reported ;) https://github.com/0ad-matters/0ad-appimage/issues/4

andy5995 commented 1 year ago

This generally appears to be a non-issue. When I attempted to run pyrogenesis extracted from an appimage in a clean docker Debian:bullseye container, the only libs needed were 'libasound2', 'libfreetype6', 'libx11-6'.