← Back to issue list

nodejs snap installed through stage-snaps is not usable in the final image

View original Github issue

Metadata

Project
rockcraft
Number
#307
Type
issue
State
open
Author
nrobinaubertin
Labels
Created
Updated
Closed

Current evaluation

Node.js snap staged via stage-snaps is unusable in the final rock image because the dynamic linker path /snap/core20/current/lib64/ld-linux-x86-64.so.2 is missing; reporter works around it by copying /lib64/ld-linux-x86-64.so.2. Unlabeled, no maintainer response, last activity 381 days ago.

Suggested action: needs triage

Reason: The issue has no labels, no assignee, and zero comments, so it has never been assessed by a maintainer. It is a genuine, well-reproduced bug (node --version fails until the core20 dynamic linker is manually copied into the image), not a support question, so it should be triaged rather than closed. Related work is uncertain: commit 05489c80 (fix(lifecycle): remove usrmerge-breaking symlinks, #498) touches symlink handling in the same area but there is no evidence it specifically fixes this stage-snaps linker case.

Impact: 50 Quick Win: 17.5 Staleness: 75 Complexity: 65 Confidence: 55 Support Request: 10

Issue body

### Bug Description nodejs snap installed through stage-snaps is not usable in the final image without additional steps. For now, I need to use the following command to fix it inside the container: ``` mkdir -p /snap/core20/current/lib64/ && cp /lib64/ld-linux-x86-64.so.2 ``` ### To Reproduce ``` rockcraft pack --verbose rockfile="$(find . -name "*.rock" -printf "%f")" image_name="$(echo "$rockfile" | cut -d'_' -f1)" version="$(echo "$rockfile" | cut -d'_' -f2)" /snap/rockcraft/current/bin/skopeo --insecure-policy copy "oci-archive:$rockfile" "docker-daemon:$image_name:$version" ``` Using `docker run -it --rm --entrypoint bash localhost:32000/test:1.0` to shell-in the container allows me to try out `node --version` that fails. ### Environment uname -a ``` Linux t14 5.19.0-40-generic #41~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 31 16:00:14 UTC 2 x86_64 x86_64 x86_64 GNU/Linux ``` snap info rockcraft | tail ``` snap-id: 3mPIBn6L9IYLyBAZsaqjlnMk7huEtqlv tracking: latest/edge refresh-date: today at 11:43 EDT channels: latest/stable: – latest/candidate: – latest/beta: – latest/edge: 0+git.2148b5b 2023-06-27 (893) 86MB classic installed: 0+git.2148b5b (893) 86MB classic ``` ### rockcraft.yaml ```shell name: test summary: test description: test base: ubuntu:20.04 license: Apache-2.0 version: "1.0" platforms: amd64: parts: snap-test: plugin: nil stage-snaps: - node/18/stable ``` ### Relevant log output tty from inside the container: ```shell root@d25c34e99a0c:/# which node /usr/bin/node root@d25c34e99a0c:/# node --version bash: /usr/bin/node: No such file or directory root@d25c34e99a0c:/# ldd /usr/bin/node linux-vdso.so.1 (0x00007ffe0039e000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbf771a5000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbf76fc3000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbf76e74000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbf76e59000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbf76e36000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbf76c44000) /snap/core20/current/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007fbf7d098000) root@d25c34e99a0c:/# mkdir -p /snap/core20/current/lib64/ && cp /lib64/ld-linux-x86-64.so.2 /snap/core20/current/lib64/ld-linux-x86-64.so.2 root@d25c34e99a0c:/# node --version v18.16.1 ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 50
Quick Win: 17.5
Staleness: 75
Complexity: 65
Confidence: 55
Support Request: 10
needs triage Node.js snap staged via stage-snaps is unusable in the final rock image because the dynamic linker path /snap/core20/current/lib64/ld-linux-x86-64.so.2 is missing; reporter works around it by copying /lib64/ld-linux-x86-64.so.2. Unlabeled, no maintainer response, last activity 381 days ago.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 60
Confidence: 85
Support Request: 10
needs triage Node.js snap staged via stage-snaps fails to run in final Rockcraft image due to missing dynamic linker path. Untriaged, no maintainer response, open for over 3 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 55
Confidence: 80
Support Request: 15
needs triage Untriaged bug report regarding Node.js snap binaries failing to run in Rockcraft container images due to missing dynamic linker paths. Requires maintainer assessment.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 60
Confidence: 85
Support Request: 10
needs triage Node.js snap staged via stage-snaps fails to run in final container image due to missing dynamic linker path. Unlabelled, no maintainer response, open for ~3 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 80
Support Request: 15
close stale Packaging Node.js via Rockcraft stage-snaps produces a broken container image missing the dynamic linker. Open for over a year with no activity or comments, awaiting triage and resolution.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/rockcraft#498 (confidence 40%)

    Commit 05489c80 'fix(lifecycle): remove usrmerge-breaking symlinks (#498)' addresses symlink handling in the lifecycle, the same class of problem (broken/missing paths in the final image), but no evidence it specifically resolves the stage-snaps dynamic-linker case.

Related issues

No related issues found above the similarity threshold.