appimage-builder icon indicating copy to clipboard operation
appimage-builder copied to clipboard

Segmentation fault for AppImages bundling glibc 2.39 (caused by lief < 0.16)

Open git-developer opened this issue 1 year ago • 1 comments

Some AppImages based on Debian Trixie and Ubuntu Noble cause a segmentation fault. Both distros use glibc 2.39. When building an AppImage for Trixie, one of the following messages is shown (build log):

Can't find string offset for section name '.note.cafe1a7e'
Dynamic tag: 0x70000000 is not supported for the current architecture

This message arises from LIEF, a library used to patch binary files. Debugging uncovered that the messages occur when libc.so.6 is patched. Apparently, libc contains something that LIEF is not able to handle. In 07/2024, https://github.com/lief-project/LIEF/pull/1081 was merged, adding support new dynamic tags for x86_64. When LIEF is updated to a version containing these changes (currently available: pre-release 0.16.0.dev0), the messages are gone and no segfault occurs.

Workaround for latest Docker image (1.1.0) (example): Before running appimage-builder, update LIEF, install packaging-legacy and patch package.py

Cause:

  1. Latest LIEF (0.16.0.dev0) requires an update of setuptools (>= 71)
  2. Latest setuptools requires an update of packaging (>= 24)
  3. Latest packaging requires that versions conform to PEP 440 (see https://github.com/pypa/setuptools/issues/3772)
  4. AppImageBuilder 1.1.0 uses packaging.version to compare versions of debian packages (e.g. 1.21.1ubuntu2.3).

Originally reported downstream in https://github.com/C0rn3j/sc-controller/pull/32.

Please consider releasing an updated Docker image containing a current version of LIEF.

git-developer avatar Oct 02 '24 05:10 git-developer

Likely to be fixed by #368 as I also bumped LIEF

dsseng avatar Mar 01 '25 21:03 dsseng