← Back to issue list

elf: warn if primed files will not work with the base's linker

View original Github issue

Metadata

Project
snapcraft
Number
#1843
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1843 (commit 42023dfaa) added ELF parsing of primed files in snapcraft/internal/elf.py, warning when a file's required glibc version is incompatible with the base's linker. Closes issue #1667.

Resolution: closed resolved

Reason: The PR was merged into master as commit 42023dfaa ('elf: warn if primed files will not work with the base's linker (#1843)'), adding ElfFile.is_linker_compatible() plus unit tests, and closing issue #1667 as planned. Follow-up work bdaf0b7f1 extended this to patch/handle ELF files on glibc mismatch.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Parse all the primed files and make sure it will work with the version of the linker provided by the supporting base. Closes: #1667 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1843 (commit 42023dfaa) added ELF parsing of primed files in snapcraft/internal/elf.py, warning when a file's required glibc version is incompatible with the base's linker. Closes issue #1667.
stealth/space-bunny-alpha — closed resolved PR #1843 (commit 42023dfaa, then bdaf0b7f1) merged: Snapcraft parses primed ELF files and warns when their required glibc exceeds the base's linker, closing issue #1667.
stealth/space-bunny-alpha — closed resolved Merged PR #1843 added ELF compatibility checks for primed files and warnings when their glibc requirements exceed the supporting base's linker, resolving #1667.
qwen/qwen3.6-35b-a3b — — Merged implementation adding a warning when primed ELF files are incompatible with the base's linker. Closes #1667, approved by reviewer, passes CI, and implements glibc version checks.
qwen3.6-35b-a3b-mtp-q6 — — Merged validation logic that warns when primed ELF files are incompatible with the base linker version. Closes #1667. Code adjusted per reviewer feedback on glibc caching.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: snapcraft#1667 (confidence 97%)

    Issue #1667 ('Walk the prime directory for elf files and flag the glibc required version') was closed by this PR.

  • Related To: snapcraft#bdaf0b7f1 (confidence 65%)

    Later commit 'pluginhandler: patch and handle elf files on glibc mismatch' building on this compatibility check.

  • Related To: snapcraft#50726643a (confidence 60%)

    Preceding commit (PR #1823) searching DT_NEEDED in prime and base, establishing the prime-walking infrastructure.

Related issues

Issue Project State Summary Similarity
#1667 Walk the prime directory for elf files and flag the glibc required version snapcraft closed Implemented as PR #1843 (commit 42023dfaa), which added ELF parsing of primed files and warns when the required glibc version is incompatible with the base's linker. Later refined by #2241 and #3839.
78%
#2830 elf: properly handle corrupted ELF files snapcraft merged Merged #2830 as commit 727ffbdb0, making Snapcraft warn and continue when corrupted ELF files are encountered during priming.
78%
#1838098 snapcraft prime fails if it finds an invalid ELF file snapcraft (launchpad) closed Snapcraft now skips invalid ELF files during priming; PR #2663 was merged in commit 89490853e.
75%
#2663 elf: handle invalid elf files snapcraft merged PR #2663 merged as commit 89490853e: snapcraft/elf/elf_utils.py now catches elftools ELFError (and CorruptedElfFile) during dependency scanning and silently skips invalid ELF files, with a regression test for LP #1838098.
72%