spin icon indicating copy to clipboard operation
spin copied to clipboard

ARM Linux release builds

Open lann opened this issue 2 years ago • 7 comments

We are disabling builds that are failing due to cross-compiling openssl for ARM:

https://github.com/fermyon/spin/runs/5759249651

I think we can fix that by merging #247 and using --features=vendored-openssl for cross-compiled builds only. In order for this to work I think we need to remove --all-features from various places as well.

lann avatar Mar 30 '22 19:03 lann

@vdice

lann avatar Mar 30 '22 19:03 lann

@lann is there an ETA for when you will be starting re-producing Arm builds? Not putting pressure, just curious. Thanks.

mreferre avatar Apr 08 '22 16:04 mreferre

I spent a little time looking into this today, but even with the above openssl vendoring and using cross I hit some pretty nasty-looking bugs cross-compiling wasmtime-fiber. I would be interested to hear if anyone is able to get this working by compiling on a native (or emulated) ARM box.

lann avatar Apr 08 '22 20:04 lann

Is there an update on this? I see Spin ships for linux/amd64, windows/amd64, mac/amd64, mac/arm. Looks like linux/arm is the only miss (with the big trend towards more arm in the cloud it looks like a good opportunity for Spin).

mreferre avatar Oct 04 '22 08:10 mreferre

No update yet. Currently the release builds are really more geared toward development environments where ARM Linux is less common. That said, this is mostly blocked on finding a good way to actually perform the cross-arch builds in Github Actions. For some reason cross-compiling for aarch64-apple-darwin "just works" where aarch64-unknown-linux-gnu doesn't.

lann avatar Oct 04 '22 13:10 lann

$ cargo build --release --target aarch64-unknown-linux-gnu --features openssl/vendored
[...many copies of line below...]
/usr/bin/ld: <PATH>/spin/target/aarch64-unknown-linux-gnu/release/deps/spin-50cb93f1b1f7d4bc.spin.d8cbf558-cgu.0.rcgu.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: <PATH>/spin/target/aarch64-unknown-linux-gnu/release/deps/spin-50cb93f1b1f7d4bc.spin.d8cbf558-cgu.0.rcgu.o: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status

lann avatar Oct 04 '22 13:10 lann

Thanks @lann. Out of curiosity I was trying to compile Spin on a Graviton instance but I ended up in a rat-hole where one of the requirements (i.e. bindle) is not available on Linux/Arm either and trying to compile bindle gave me a problem etc. etc.

mreferre avatar Oct 05 '22 07:10 mreferre