-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add crate feature to disable libwasmedge static linking #210
Conversation
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Can we add tests to validate static vs dynamic linking? |
I say this as I'm trying to validate this manually and no matter what I do I'm getting a dynamically linked binary.
|
It would still generate a dynamically linked binary, just not to This is similar to how the wasmtime shim doesn't link against a If you do I can still add a test for it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I don't see wasmedge.so in either case. $ cargo build --package containerd-shim-wasmedge --features "static"
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
$ ldd ./target/debug/containerd-shim-wasmedge-v1
linux-vdso.so.1 (0x00007ffd3e5d3000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faadb897000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007faadb66b000)
libseccomp.so.2 => /lib/x86_64-linux-gnu/libseccomp.so.2 (0x00007faadb64b000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007faadb5fd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faadb3d5000)
/lib64/ld-linux-x86-64.so.2 (0x00007faae325f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007faadb3b3000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007faadb2ec000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007faadb2c1000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007faadb1f2000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007faadb1d2000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007faadb1c7000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007faadb087000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007faadb061000)
$ cargo build --package containerd-shim-wasmedge --features "standalone"
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
$ ldd ./target/debug/containerd-shim-wasmedge-v1
linux-vdso.so.1 (0x00007ffdc31ef000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0db3d53000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0db3b27000)
libseccomp.so.2 => /lib/x86_64-linux-gnu/libseccomp.so.2 (0x00007f0db3b07000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f0db3ab9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0db3891000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0dbb71b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0db386f000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f0db37a8000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f0db377d000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f0db36ae000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f0db368e000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007f0db3683000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f0db3543000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f0db351d000) |
Indeed, my bad, the "static" feature is always enabled here. |
Fixes #206