Partial Patchelf changes were announced for Snapcraft 8.0.3, but the core24 ELF-interpreter problem was still reported in 8.3.2; #4508 closed without a confirmed complete fix.
Resolution: closed stale
Reason: A maintainer announced the change for edge and Snapcraft 8.0.3, but the last substantive report said the problem remained in 8.3.2. The issue was subsequently closed without a closing explanation or verification that the interpreter problem was fully resolved.
Evaluated by:mr-cal-bot
No scores available.
Issue body
### Bug Description
I am using core24 as the base snap for my classic SLURM snap because core24 has the necessary packages that I need for enabling AMD GPU support in the workload scheduler: https://packages.ubuntu.com/search?keywords=librocm&searchon=names
I need to patch the binaries and shared libraries in the SLURM snap since it is classically confined, however, `build-attributes: [enable-patchelf]` is using an incorrect dynamic linker as the ELF interpreter for binaries. This is causing core dumps and segfaults if I try to execute the binaries on a host with an older libc implementation such as Ubuntu 22.04 or 20.04 LTS. The rpath is being set correctly though by the automatic patching mechanism. Also, for some reason, on core24, but not core22, the classic linter is warning me about a staged libc package. Several of SLURMs dependencies require libc6 >= 2.38, but it should be using the libc6 provided by the core24 base.
[snapcraft-20240105-110231.695714.log](https://github.com/snapcore/snapcraft/files/13845290/snapcraft-20240105-110231.695714.log)
### To Reproduce
1. _Download attached snapcraft.yaml file_
2. `snapcraft -v pack #=> ensure that you have snapcraft 8.0.1 installed`
3. `lxc launch ubuntu:22.04 snap-tester --vm`
4. `lxc file push slurm_23.11.1_amd64.snap slurm-0/root/slurm_23.11.1_amd64.snap`
5. `lxc shell snap-tester`
6. `snap install core24 --edge`
7. `snap install slurm_23.11.1_amd64.snap --dangerous --classic`
8. `snap logs slurm.munged #=> See core dump error`
9. `slurm.squeue -h #=> See core dump error`
### Environment
OS: Ubuntu 23.10 Mantic Minotaur
LXD: 5.19 rev 20600
Snap test environment: 22.04 and 20.04
### snapcraft.yaml
```shell
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details
name: slurm
version: 23.11.1
summary: "Slurm: A Highly Scalable Workload Manager"
description: |
Slurm is an open source, fault-tolerant, and highly scalable cluster management and
job scheduling system for large and small Linux clusters.
Contains Slurm services slurmctld, slurmd, slurmdbd, and slurmrestd. See `slurm-clients`
snap for Slurm CLI commands.
license: Apache-2.0
website: "https://slurm.schedmd.com"
base: core24
build-base: devel
confinement: classic
compression: lzo
apps:
slurmctld:
command: sbin/slurmctld
daemon: simple
install-mode: disable
after:
- munged
slurmd:
command: sbin/slurmd
daemon: simple
install-mode: disable
after:
- munged
slurmdbd:
command: sbin/slurmdbd
daemon: simple
install-mode: disable
after:
- munged
slurmrestd:
command: sbin/slurmrestd
daemon: simple
install-mode: disable
after:
- munged
sacct:
command: bin/sacct
sacctmgr:
command: bin/sacctmgr
salloc:
command: bin/salloc
sattach:
command: bin/sattach
sbatch:
command: bin/sbatch
sbcast:
command: bin/sbcast
scancel:
command: bin/scancel
scontrol:
command: bin/scontrol
scrontab:
command: bin/scrontab
scrun:
command: bin/scrun
sdiag:
command: bin/sdiag
sh5util:
command: bin/sh5util
sinfo:
command: bin/sinfo
sprio:
command: bin/sprio
squeue:
command: bin/squeue
sreport:
command: bin/sreport
srun:
command: bin/srun
sshare:
command: bin/sshare
sstat:
command: bin/sstat
strigger:
command: bin/strigger
sview:
command: bin/sview
munged:
command: usr/sbin/munged
daemon: simple
munge:
command: usr/bin/munge
unmunge:
command: usr/bin/unmunge
remunge:
command: usr/bin/remunge
mungekey:
command: usr/sbin/mungekey
parts:
slurm:
plugin: autotools
build-attributes:
- enable-patchelf
source: "https://download.schedmd.com/slurm/slurm-${SNAPCRAFT_PROJECT_VERSION}.tar.bz2"
source-type: tar
build-packages:
- patchelf
- libmunge-dev
- libncurses-dev
- libgtk2.0-dev
- default-libmysqlclient-dev
- libpam0g-dev
- libperl-dev
- libpam0g-dev
- liblua5.4-dev
- libhwloc-dev
- librrd-dev
- libipmimonitoring-dev
- hdf5-helpers
- libfreeipmi-dev
- libhdf5-dev
- man2html
- libcurl4-openssl-dev
- libpmix-dev
- libhttp-parser-dev
- libyaml-dev
- libjson-c-dev
- libjwt-dev
- liblz4-dev
- bash-completion
- libdbus-1-dev
- librdkafka-dev
- librocm-smi-dev
- libibmad-dev
- libibumad-dev
- libnuma-dev
- libaec-dev
stage-packages:
- munge
- libncurses6
- libgtk2.0-0
- libmysqlclient21
- libpam0g
- libperl5.36
- liblua5.4-0
- libhwloc15
- librrd8
- libipmimonitoring6
- hdf5-helpers
- libfreeipmi17
- hdf5-helpers
- man2html
- libcurl4
- libpmix2
- libhttp-parser2.9
- libyaml-0-2
- libjson-c5
- libjwt0
- liblz4-1
- bash-completion
- libdbus-1-3
- librdkafka1
- librocm-smi64-1
- libibmad5
- libibumad3
- libnuma1
- libaec0
- libsz2
- libhdf5-hl-100
- libhdf5-103-1
autotools-configure-parameters:
- --prefix=/
- --localstatedir=/var
- --runstatedir=/var/run/slurm
- --disable-developer
- --disable-debug
- --enable-slurmrestd
- --enable-multiple-slurmd
- --with-munge
- --with-libcurl
- --with-http-parser
- --with-yaml
- --with-json
- --with-jwt
- --with-hdf5=yes
- --with-rdkafka
- --with-freeipmi
- --with-ofed
```
### Relevant log output
```shell
I attached the build log to the bug description because the log is too big to be copy & pasted into the text box.
```
### Additional context
The binaries work if you manually set the ELF interpreter to the dynamic linker in core24:
```yaml
override-prime: |
craftctl default
set -eu
# enable-patchelf attempts to use libc implementation
# from stage-packages which will cause failures. This
# experiment attempts to circumvent by using the ELF
# interpreter provided by core24.
export PATH=${CRAFT_PART_BUILD}/usr/bin:$PATH
patchelf --force-rpath --set-rpath \$ORIGIN/../lib/slurm:\$ORIGIN/../lib/x86_64-linux-gnu bin/squeue
patchelf --set-interpreter /snap/core24/current/lib64/ld-linux-x86-64.so.2 bin/squeue
```
Evaluation history
Date
Model
Scores
Action
Summary
stealth/space-bunny-alpha
—
closed stale
Partial Patchelf changes were announced for Snapcraft 8.0.3, but the core24 ELF-interpreter problem was still reported in 8.3.2; #4508 closed without a confirmed complete fix.
stealth/space-bunny-alpha
—
closed stale
A fix was announced for edge and Snapcraft 8.0.3, but the core24 ELF-interpreter bug was still reported in 8.3.2. #4508 was then closed without confirmation of a complete fix.
qwen/qwen3.6-35b-a3b
—
—
A fix targeting edge and 8.0.3 was announced, but the incorrect ELF interpreter bug persists in 8.3.2. The issue was closed and effectively abandoned.
qwen/qwen3.6-35b-a3b
—
—
A fix was scheduled for edge and version 8.0.3 in January 2024, but the issue persists. A follow-up report confirms the problem remains in version 8.3.2, resulting in closure without a verified resolution.
qwen/qwen3.6-35b-a3b
—
—
Fixed and released to edge and hotfix 8.0.3. The update corrects the dynamic linker path used by enable-patchelf on core24. A later comment notes the issue may still occur in 8.3.2.
qwen3.6-35b-a3b-mtp-q6
—
—
A fix for the incorrect ELF interpreter set by enable-patchelf on core24 was released to edge and planned for hotfix 8.0.3. The issue was closed, though a later comment reports the problem persists in version 8.3.2.