jiayihu / fedra-thesis

Next-generation system for Computing Continuum via WebAssembly (WASM)
7 stars 2 forks source link

Krustlet not running on Alpine Linux #29

Closed jiayihu closed 3 years ago

jiayihu commented 3 years ago

Krustlet worked fine on Rasp with Ubuntu Server but doesn't run on Alpine. The issue seems to be caused by the required linker /lib/ld-linux-aarch64.so.1 which is not available on Alpine, which uses musl libc instead of the full GNU libc.

Trying to install the compat libs from Alpine registry doesn't seem to work.

https://github.com/rust-lang/rust/issues/46651

jiayihu commented 3 years ago

As workaround, I'm trying to compile krustlet-wasi with aarch64-unknown-linux-gnu target but with static linking so that it does not need the linker.

https://doc.rust-lang.org/reference/linkage.html#static-and-dynamic-c-runtimes

jiayihu commented 3 years ago

I was able to build with aarch64-unknown-linux-musl target after applying the libc patch for wasmtime https://github.com/bytecodealliance/wasmtime/issues/2133 Now I need to figure out how to compile using openssl instead of rust-tls which doesn't support IP SAN.

cross used for cross-compiling krustlet has removed built-in support for openssl https://github.com/rust-embedded/cross/issues/229

jiayihu commented 3 years ago

I built a custom image based on cross image for aarch64-unknown-linux-musl and with openssl pre-installed. Now krustlet it's working again

jiayihu commented 3 years ago

Opened issue https://github.com/deislabs/krustlet/issues/466 in krustlet for future tracking