-
Hey there, Thank you for lychee. $ docker run --rm -it cgr.dev/chainguard/wolfi-base:latest sh
/ # apk add lychee
fetch https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz
(1/2) Installing libgcc (13.2.0-r4)
(2/2) Installing lychee (0.14.3-r0)
OK: 39 MiB in 16 packages
/ # apk add libc-bin
(1/7) Installing localedef (2.38-r11)
(2/7) Installing ncurses-terminfo-base (6.4_p20231125-r1)
(3/7) Installing ncurses (6.4_p20231125-r1)
(4/7) Installing bash (5.2.21-r1)
(5/7) Installing posix-libc-utils (2.38-r11)
(6/7) Installing tzutils (2.38-r11)
(7/7) Installing libc-bin (2.38-r11)
OK: 44 MiB in 23 packages
/ # ldd $(command -v lychee)
linux-vdso.so.1 (0x00007ffdeb78d000)
libssl.so.3 => /usr/lib/libssl.so.3 (0x00007f6bd0fe2000)
libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007f6bd0af5000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6bd0ad1000)
libm.so.6 => /lib/libm.so.6 (0x00007f6bd09f4000)
libc.so.6 => /lib/libc.so.6 (0x00007f6bd07bd000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6bd242f000)
/ # I want to have a lychee executable that's not dynamically linked (I want to avoid To achieve the same, I read the docs and tried to use Is there a way avoid dynamically linking. I want to use it inside a multi-stage docker build. The base I'm using is My main query is how to get a statically linked lychee executable in the above case and is it possible in the current state of the project? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Interesting. At least that was the idea of the feature to be able to build it statically. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately,
source: https://community.fly.io/t/rust-server-missing-libssl-so-3-on-new-deploy/15114
I think this means that in the current state, static linking is not possible. I downloaded the latest release from github and it's not dynamically linked to libssl which is expected given we use $ ldd $(command -v ./lychee)
linux-vdso.so.1 (0x00007fffe43ef000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f1c559dc000)
librt.so.1 => /lib64/librt.so.1 (0x00007f1c573c6000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1c559d7000)
libm.so.6 => /lib64/libm.so.6 (0x00007f1c558f6000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f1c558f1000)
libc.so.6 => /lib64/libc.so.6 (0x00007f1c5570f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1c573e0000) I'll now fall back to using |
Beta Was this translation helpful? Give feedback.
-
Sorry, I don't know all the details here. Maybe @orhun has an idea? Am I missing something? |
Beta Was this translation helpful? Give feedback.
-
I'd also expect it to statically link when |
Beta Was this translation helpful? Give feedback.
Hey @kranurag7, sorry for the late reply. I appreciate the detailed build steps / logs!
I know see the issue more clearly since I started packaging
lychee
for Alpine Linux here: !61156As you can see I got the same error as your CI: