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

Release statically linked binaries, not dynamically linked ones #815

Closed
smelc opened this issue Jul 3, 2024 · 4 comments · Fixed by #819
Closed

Release statically linked binaries, not dynamically linked ones #815

smelc opened this issue Jul 3, 2024 · 4 comments · Fixed by #819
Assignees

Comments

@smelc
Copy link
Contributor

smelc commented Jul 3, 2024

Right now, we're distributing dynamically linked executables. For example if you download the Linux binary from the 9.0.0 release, file shows that the binary is dynamically linked:

01:50:56 HOME/Downloads/cardano-cli-9.0.0.0-x86_64-linux → file ./cardano-cli-x86_64-linux 
./cardano-cli-x86_64-linux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/ld-linux-x86-64.so.2, for GNU/Linux 3.10.0, not stripped
@smelc smelc self-assigned this Jul 3, 2024
@smelc
Copy link
Contributor Author

smelc commented Jul 3, 2024

As a workaround, as explained by @amesgen here on Slack, a static executable can be obtained from the cardano-node repo like this:

nix build github:IntersectMBO/cardano-node/8.12.2#hydraJobs.x86_64-linux.musl.cardano-cli

@smelc smelc changed the title Release statically linked binaries, not dynamically linked Release statically linked binaries, not dynamically linked ones Jul 3, 2024
@SynthLuvr
Copy link

Yes, the current release doesn't work:

➜ ./cardano-cli-x86_64-linux
zsh: no such file or directory: ./cardano-cli-x86_64-linux
➜ ldd cardano-cli-x86_64-linux
        linux-vdso.so.1 (0x00007ffd58347000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7350224000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7350208000)
        libsodium.so.23 => /lib/x86_64-linux-gnu/libsodium.so.23 (0x00007f73501b0000)
        libblst.so => not found
        libsecp256k1.so.2 => not found
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f73501a9000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f734ff7d000)
        libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f734fefb000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f734fcd2000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f734fccb000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f734fcc6000)
        libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007f734fcb9000)
        libnuma.so.1 => /lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f734fcac000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f734fc8c000)
        /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f7350312000)

@smelc
Copy link
Contributor Author

smelc commented Jul 15, 2024

@SynthLuvr> fix is on its way: #819

@smelc
Copy link
Contributor Author

smelc commented Jul 16, 2024

Fixed by #819

@smelc smelc closed this as completed Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants