This repository was archived by the owner on Aug 13, 2026. It is now read-only.
fix: set portable interpreter path for Linux release binaries - #21
Open
MoshiBin wants to merge 1 commit into
Open
fix: set portable interpreter path for Linux release binaries#21MoshiBin wants to merge 1 commit into
MoshiBin wants to merge 1 commit into
Conversation
MoshiBinforce-pushed
the
fix/portable-interpreter-path
branch
from
May 19, 2026 17:02
281ef66 to
d28e5dbCompareRelease binaries built with Nix have hardcoded Nix store paths for the dynamic linker, causing them to fail on non-Nix Linux systems with "No such file or directory" error. This fix adds patchelf to the Nix build process for cross-compilation packages (x86_64-linux and aarch64-linux) to set the interpreter path to standard system locations during the installPhase: - /lib64/ld-linux-x86-64.so.2 for x86_64 - /lib/ld-linux-aarch64.so.1 for aarch64 This approach is cleaner than adding patchelf as a CI dependency since patchelf is already available in nixpkgs and the fix is applied at build time rather than as a post-processing step. Fixestobi#15 Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
MoshiBin
marked this pull request as draft
May 19, 2026 17:03
MoshiBinforce-pushed
the
fix/portable-interpreter-path
branch
from
May 19, 2026 17:03
d28e5db to
de061ddCompareMoshiBin
marked this pull request as ready for review
May 19, 2026 17:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change uses
patchelfto set the interpreter asld-linux-x86-64.so.2(orld-linux-aarch64.so.1on aarch64) instead of the default, which references Nix and isn't available on other distros.See #15 for reference. The built
tryfrom the releases page shows:Which causes this error when running:
This change adds patchelf as a step after building to explicitly point at the actual paths for ld-linux.
Honestly, I'm not familiar enough with Nix at this point to know if this is the best way of doing it. I used an agent to help me implement this.
I'm leaning towards #17 as a better fix for this behavior, as I feel this is more of a temp workaround.