Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Statically Compiled Binaries for (aarch64|arm64) Linux #883

Open
Azathothas opened this issue Feb 20, 2024 · 1 comment
Open

Provide Statically Compiled Binaries for (aarch64|arm64) Linux #883

Azathothas opened this issue Feb 20, 2024 · 1 comment
Labels
new feature New feature or request

Comments

@Azathothas
Copy link

Hi, the current releases for arm64 Linux is based on gnu and not musl.
As a result, the binary is dynamically linked:

$ https://github.com/denisidoro/navi/releases/download/v2.23.0/navi-v2.23.0-aarch64-unknown-linux-gnu.tar.gz
$ file navi && ldd navi
navi: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=9cc810551f8c0912e85d081356dec8294532539e, with debug_info, not stripped
        linux-vdso.so.1 (0x0000ffffa28a7000)
        libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffffa2550000)
        libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffffa2530000)
        libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffffa2510000)
        libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffa2360000)
        /lib/ld-linux-aarch64.so.1 (0x0000ffffa286e000)

$ du -sh navi && ldd navi
8.2M    navi

Adding target: aarch64-unknown-linux-musl in https://github.com/denisidoro/navi/blob/master/.github/workflows/cd.yml should work.

However, you can release an even more optimized & smaller binary, based on : https://github.com/Azathothas/Toolpacks/blob/main/.github/scripts/aarch64_Linux/bins/navi.sh

$ file "./target/$RUST_TARGET/release/navi"
./target/aarch64-unknown-linux-musl/release/navi: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped

$ du -sh "./target/$RUST_TARGET/release/navi"
2.4M    ./target/aarch64-unknown-linux-musl/release/navi
@Azathothas Azathothas added the new feature New feature or request label Feb 20, 2024
Copy link

welcome bot commented Feb 20, 2024

Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant