← Back to issue list

core dynamic linker detection fails on ppc64el and s390x

View original Launchpad issue

Metadata

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

Current evaluation

Fixed in snapcore/snapcraft PR #1600 (commit 1016c7021, "options: fix core-dynamic-linker on ppc64el/s390x"): dropped stray leading slashes from the core-dynamic-linker paths so os.path.join works, plus added parametrized tests covering all architectures.

Resolution: closed resolved

Reason: The reporter linked snapcore/snapcraft PR #1600, which was merged as commit 1016c7021 and changed the ppc64le/s390x core-dynamic-linker values to relative paths (e.g. "lib64/ld64.so.2" in snapcraft/elf/elf_utils.py) with new unit tests in tests/unit/elf/test_elf_utils.py, so core snap detection works again on those architectures.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Michael Hudson-Doyle reported that ppc64el/artful builds on Launchpad fail because snapcraft incorrectly believes that the core snap is not installed (see e.g. https://launchpadlibrarian.net/340314110/buildlog_snap_ubuntu_artful_ppc64el_subiquity_BUILDING.txt.gz). This is because the core-dynamic-linker setting on ppc64el (and s390x) has a stray leading slash, so os.path.join('/snap/core/current', '/lib64/ld64.so.2') returns '/lib64/ld64.so.2', so snapcraft tries to resolve the dynamic linker symlink on the host system, and that may point to a file name that doesn't exist in the core snap. The correct fix is to drop the leading slashes, and to put test code in place to ensure that similar mistakes can't accidentally be made for future architectures.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed in snapcore/snapcraft PR #1600 (commit 1016c7021, "options: fix core-dynamic-linker on ppc64el/s390x"): dropped stray leading slashes from the core-dynamic-linker paths so os.path.join works, plus added parametrized tests covering all architectures.
stealth/space-bunny-alpha — closed resolved Fixed by merged snapcore/snapcraft#1600 (commit 1016c7021): removed leading slashes from ppc64el/s390x core linker paths and added regression tests.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR snapcore/snapcraft#1600 (commit 1016c7021), removing leading slashes from ppc64el/s390x linker paths and adding regression tests.
stealth/space-bunny-alpha — closed resolved Fixed ppc64el/s390x core-snap detection by removing leading slashes from dynamic-linker paths and adding regression tests in merged snapcraft PR #1600 (commit 1016c7021).
qwen/qwen3.6-35b-a3b — — Fixed by removing stray leading slashes from the core-dynamic-linker setting on ppc64el and s390x. This corrects path resolution to properly detect the core snap and adds regression tests to prevent recurrence.
qwen/qwen3.6-35b-a3b — — Resolved dynamic linker detection failure on ppc64el and s390x by removing stray leading slashes from the core-dynamic-linker path. Added regression tests to prevent future architecture-specific path resolution issues.
qwen/qwen3.6-35b-a3b — — Fixed by removing stray leading slashes from the core-dynamic-linker config for ppc64el and s390x, preventing incorrect host path resolution. Regression tests were added to prevent future architecture-specific path errors.
qwen3.6-35b-a3b-mtp-q6 — — Fixed dynamic linker detection failures on ppc64el and s390x by removing stray leading slashes from the core-dynamic-linker path. The resolution strips the slashes and adds regression tests to prevent future architecture-specific path errors.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#1600 (confidence 98%)

    Merged PR titled 'options: fix core-dynamic-linker on ppc64el/s390x', commit 1016c7021, cited directly by the issue author as the fix.

  • Related To: snapcraft#1600 (confidence 95%)

    Same PR as tracked in the snapcraft corpus; merged state confirms the Launchpad ppc64el/s390x build failures were addressed.

Related issues

Issue Project State Summary Similarity
#1600 options: fix core-dynamic-linker on ppc64el/s390x snapcraft merged Merged PR #1600 (commit 1016c7021), fixing ppc64el/s390x core-dynamic-linker paths and restoring correct core snap detection.
85%
#1170 core: fix symlink resolution in get_core_dynamic_linker snapcraft merged Merged canonical/snapcraft#1170 as commit b19e9cf68, fixing relative symlink resolution in get_core_dynamic_linker so classic snap builds work on affected architectures.
79%