snapcraft comes with an old version of pyelftools, some builds fail due to this
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Closed without resolution. The issue stemmed from an outdated pyelftools dependency triggering a Unicode decode error during ELF parsing. No patch was applied, leaving the snap build failure unresolved.
Suggested action: —
No scores available.
Issue body
The following snapcraft.yaml:
name: vcs
version: '2.0'
summary: VCS GUI
description: |
Maritime Robotics Vehicle Control System GUI
confinement: devmode
base: core18
layout:
/usr/lib/vcs-gui/plugins:
bind: $SNAP/usr/lib/vcs-gui/plugins
parts:
desktop-qt5:
source: https://download.qt.io/archive/qt/5.13/5.13.2/single/qt-everywhere-src-5.13.2.tar.xz
plugin: dump
override-build: |
snapcraftctl build
./configure -opensource -confirm-license -debug -nomake examples -nomake tests
make
make install
override-prime: |
locale-gen "en_US.UTF-8"
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
snapcraftctl prime
build-packages:
- python
- locales
protobuf:
source: https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0/protobuf-all-3.8.0.tar.gz
plugin: autotools
cmake:
source: https://github.com/Kitware/CMake/releases/download/v3.15.0-rc1/cmake-3.15.0-rc1.tar.gz
plugin: autotools
libproj:
source: http://download.osgeo.org/proj/proj-6.0.0.tar.gz
plugin: autotools
build-packages:
- libsqlite3-dev
- sqlite3
- libgl1-mesa-dev
- libglu1-mesa-dev
gdal:
source: https://github.com/OSGeo/gdal/releases/download/v3.0.0/gdal-3.0.0.tar.gz
plugin: autotools
after: [libproj]
ecc:
source: https://confluence.ecmwf.int/download/attachments/45757960/eccodes-2.12.5-Source.tar.gz
plugin: cmake
configflags: [-DENABLE_FORTRAN=OFF]
vcs:
plugin: cmake
configflags: [-DQt5Core_DIR=/usr/local/Qt-5.13.2/lib/cmake/Qt5Core,-DQt5_DIR=/usr/local/Qt-5.13.2/lib/cmake/Qt5,-DQT_QMAKE_EXECUTABLE=/usr/local/Qt-5.13.2/bin/qmake]
source: https://github.com/fritzone/Qt-CMake-HelloWorld.git
after: [protobuf,cmake,libproj,gdal,ecc,desktop-qt5]
build-packages:
- git
- g++
- make
- libkml-dev
- libarmadillo-dev
- libgeographic-dev
- libssl-dev
- libconfig++-dev
- libxml2-dev
- libmodbus-dev
- libev-dev
- libudev-dev
- libexiv2-dev
- libv4l-dev
- doxygen
- graphviz
- libgeotiff-dev
- libgeos-dev
- libpng-dev
- libbotan-2-dev
stage-packages:
- libbotan-2-4
- libtspi1
- libkmlconvenience1
- libkmlbase1
- libkmlengine1
- libkmldom1
- libssl1.0.0
- libconfig++9v5
- libxml2
- libmodbus5
- libev4
- libaec0
- libhdf4-0-alt
- libsz2
- libexiv2-14
- libv4l-0
- libgeotiff2
- libsdl2-2.0-0
- libxcb-xinerama0
- libarmadillo8
- libarpack2
- libsuperlu5
- libgeos-3.6.2
- libgeos-c1v5
apps:
vcs:
command: bin/desktop-launch bin/vcs
adapter: full
command-chain:
- bin/desktop-launch
- bin/vcs
common-id: vcs-gui.desktop
desktop: usr/share/applications/vcs-gui.desktop
environment:
"DISABLE_WAYLAND": "0"
plugs: [x11, wayland, desktop, desktop-legacy, opengl, network, home]
generates an error:
'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: View
Traceback (most recent call last):
File "/snap/snapcraft/3440/bin/snapcraft", line 11, in <module>
load_entry_point('snapcraft==3.8', 'console_scripts', 'snapcraft')()
File "/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py", line 1114, in invoke
return Command.invoke(self, ctx)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/cli/_runner.py", line 103, in run
snap_command.invoke(ctx)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/cli/_command.py", line 87, in invoke
return super().invoke(ctx)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 261, in snap
_execute(steps.PRIME, parts=[], pack_project=True, output=output, **kwargs)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 66, in _execute
lifecycle.execute(step, project_config, parts)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 94, in execute
executor.run(step, part_names)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 148, in run
self._handle_step(part_names, part, step, current_step, cli_config)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 162, in _handle_step
getattr(self, "_run_{}".format(current_step.name))(part)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 237, in _run_prime
self._run_step(step=steps.PRIME, part=part, progress="Priming")
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 281, in _run_step
getattr(part, step.name)()
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 795, in prime
self._do_runner_step(steps.PRIME)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 242, in _do_runner_step
return getattr(self._runner, "{}".format(step.name))()
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 91, in prime
"override-prime", self._override_prime_scriptlet, self._primedir
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 137, in _run_scriptlet
scriptlet_name, function_call.strip()
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 193, in _handle_builtin_function
function(**function_args)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 807, in _do_prime
dependency_paths = self._handle_elf(snap_files)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 814, in _handle_elf
elf_files = elf.get_elf_files(self.primedir, snap_files)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/elf.py", line 576, in get_elf_files
elf_file = ElfFile(path=path)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/elf.py", line 219, in __init__
elf_data = self._extract(path)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/elf.py", line 252, in _extract
interp_section = elf.get_section_by_name(_INTERP)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/elftools/elf/elffile.py", line 94, in get_section_by_name
for i, sec in enumerate(self.iter_sections()):
File "/snap/snapcraft/3440/lib/python3.5/site-packages/elftools/elf/elffile.py", line 103, in iter_sections
yield self.get_section(i)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/elftools/elf/elffile.py", line 83, in get_section
return self._make_section(section_header)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/elftools/elf/elffile.py", line 288, in _make_section
name = self._get_section_name(section_header)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/elftools/elf/elffile.py", line 283, in _get_section_name
return self._file_stringtable_section.get_string(name_offset)
File "/snap/snapcraft/3440/lib/python3.5/site-packages/elftools/elf/sections.py", line 70, in get_string
return s.decode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
We would appreciate it if you anonymously reported this issue.
due to not using the latest version of pyelftools in the snapcraft package.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The issue stemmed from an outdated pyelftools dependency triggering a Unicode decode error during ELF parsing. No patch was applied, leaving the snap build failure unresolved. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by updating the bundled pyelftools dependency to a version that correctly handles non-ASCII ELF section names, resolving the UnicodeDecodeError during the prime step. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without comments or a documented fix. The outdated pyelftools dependency causing ELF parsing failures was likely abandoned or resolved by upstream updates. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1742707 patchelf is missing from snapcraft Depends: | snapcraft (launchpad) | closed | Closed. Package dependencies were updated to include patchelf, resolving the missing binary error during snap builds. | |
| #1838098 snapcraft prime fails if it finds an invalid ELF file | snapcraft (launchpad) | closed | Closed without a fix. Snapcraft prime crashed on invalid ELF files due to an uncaught ELFError. With zero comments and no PR, the report was abandoned or superseded by newer versions handling malformed binaries gracefully. | |
| #1628457 snapcraft fails on s390x with utf8 error | snapcraft (launchpad) | closed | Closed without a fix. The report detailed a UTF-8 encoding error in snapcraft 2.18 causing s390x builds to fail. The issue was abandoned with no code changes or resolution provided. |