← Back to issue list

patchelf is missing from snapcraft Depends:

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1742707
Type
issue
State
closed
Author
~flexiondotorg
Labels
—
Created
Updated
Closed

Current evaluation

Reported missing patchelf apt dependency since snapcraft 2.38. Fixed by PR #1888 (commit 7c947f5ec, "elf: make patchelf a dependency"), released in snapcraft 2.40; issue closed by sergiusens.

Resolution: closed resolved

Reason: Upstream PR snapcore/snapcraft#1864 added patchelf to debian/control Depends but was closed unmerged; the change landed instead via PR #1888 (commit 7c947f5ec), which made patchelf a packaging dependency. Maintainer sergiusens closed the bug on 2018-04-24 noting "This was release in 2.40".

Evaluated by: mr-cal-bot

No scores available.

Issue body

Since snapcraft 2.38 patchelf is required. Installing snapcraft via apt does not also install patchelf. ## Expected behaviour `apt install snapcraft` should also install `patchelf`. ## Actual behaviour `apt install snapcraft` does not install `patchelf`. ## Steps to reproduce the behaviour Standup a clean 16.04 VM or container, and run the following: sudo apt-add-repository ppa:snappy-dev/snapcraft-daily sudo apt update sudo apt install snapcraft Trying a build a snap with snapcraft and the following traceback is generated: Traceback (most recent call last): File "/usr/bin/snapcraft", line 9, in <module> load_entry_point('snapcraft===2.38-201801031632-af6551a-ubuntu16.04.1', 'console_scripts', 'snapcraft')() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2229, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2235, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python3/dist-packages/snapcraft/cli/__main__.py", line 19, in <module> run(prog_name='snapcraft') File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1037, in invoke return Command.invoke(self, ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/__init__.py", line 124, in run ctx.forward(lifecyclecli.commands['snap']) File "/usr/lib/python3/dist-packages/click/core.py", line 552, in forward return self.invoke(cmd, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/lifecycle.py", line 139, in snap project_options, directory=directory, output=output) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_packer.py", line 45, in snap execute('prime', project_options) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 79, in execute _Executor(config, project_options).run(step, part_names) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 184, in run self._run_step(step, part, part_names) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 221, in _run_step getattr(part, step)() File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/__init__.py", line 564, in prime elf_patcher.patch(elf_file=elf_file) File "/usr/lib/python3/dist-packages/snapcraft/internal/elf.py", line 208, in patch self._patch_rpath(elf_file) File "/usr/lib/python3/dist-packages/snapcraft/internal/elf.py", line 224, in _patch_rpath elf_file_path=elf_file.path) File "/usr/lib/python3/dist-packages/snapcraft/internal/elf.py", line 143, in wrapper return f(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/internal/elf.py", line 230, in _run_patchelf [elf_file_path]) File "/usr/lib/python3.5/subprocess.py", line 576, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.5/subprocess.py", line 557, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'patchelf' ## Ubuntu version Ubuntu 16.04.3.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Reported missing patchelf apt dependency since snapcraft 2.38. Fixed by PR #1888 (commit 7c947f5ec, "elf: make patchelf a dependency"), released in snapcraft 2.40; issue closed by sergiusens.
stealth/space-bunny-alpha — closed resolved Fixed in Snapcraft 2.40 by merged PR #1888 (commit 7c947f5ec), which delivered Patchelf through supported packaging paths after PR #1864 was rejected.
stealth/space-bunny-alpha — closed resolved Fixed the missing Patchelf executable by including it in Snapcraft's Debian and snap dependency flow in merged PR #1888 (commit 7c947f5ec).
stealth/space-bunny-alpha — closed resolved Patchelf packaging was fixed by merged PR #1888 (7c947f5ec), which added it to Snapcraft’s Debian and snap delivery dependencies.
stealth/space-bunny-alpha — closed resolved Fixed by PR #1888, commit 7c947f5ec: Snapcraft’s supported packaging paths now provide Patchelf, avoiding the missing-binary error during builds.
qwen/qwen3.6-35b-a3b — — Closed. Package dependencies were updated to include patchelf, resolving the missing binary error during snap builds.
qwen/qwen3.6-35b-a3b — — Closed. The missing patchelf dependency was addressed by updating the snapcraft apt package dependencies.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#1888 (confidence 92%)

    Commit 7c947f5ec "elf: make patchelf a dependency" added Patchelf to snapcraft's deb/snap delivery mechanisms, replacing #1864.

  • Related To: snapcore/snapcraft#1864 (confidence 88%)

    Upstream PR submitted by the issue author for the same debian/control patchelf dependency.

  • Superseded By: snapcore/snapcraft#1888 (confidence 85%)

    Reporter's PR #1864 (debian/control Depends) was closed unmerged as superseded by the packaging changes in #1888.

Related issues

Issue Project State Summary Similarity
#1864 debian/control: Add patchelf to Depends: snapcraft closed Closed unmerged; the apt dependency change was superseded by #1888 (commit 7c947f5ec), which added Patchelf to Snapcraft's deb and snap delivery mechanisms.
83%
#1669 patchelf with ld-linux from the future snapcraft closed Resolved by commit bdaf0b7f1, which added Snapcraft handling for PatchELF and ELF files when the built glibc/linker does not match the base.
76%
#1888 elf: make patchelf a dependency snapcraft merged Merged PR #1888 via commit 7c947f5ec, moving Patchelf out of project_loader build tools and into the deb and snap delivery mechanisms.
76%
#1873 elf: cleaner patchelf experience snapcraft merged Merged as df6992224: Snapcraft now prefers system Patchelf outside snaps and copies target files to avoid hard-link patching conflicts.
75%
#3841 elf: add elf file patcher snapcraft merged Merged PR #3841 in commit e03a971b3, adding a patchelf-based ELF file patcher ported from Snapcraft 6.x for CRAFT-1191.
74%
#2528 packaging: use our patchelf branch snapcraft merged Merged (commit bd26cafd6, squashed merge of #2528): snapcraft.yaml now points patchelf sources at Snapcore's own patchelf branch with the failing s390x test disabled, unblocking s390x package builds; later reverted by #2531.
73%
#3277 pluginhandler: support using patchelf on strict snaps snapcraft merged Merged PR #3277 as fd8e95c3d, adding per-part enable-patchelf support to patch ELF rpaths and interpreters in strictly confined snaps.
72%
#3589 snap: correct patch apply for patchelf snapcraft merged Merged PR #3589 fixed PatchELF patch application in the snap build via commit d9484faf9 (merge a636d26b5).
72%