-
Notifications
You must be signed in to change notification settings - Fork 824
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
Cannot compile with target x86_64-unknown-linux-musl
#1173
Comments
Thanks for reporting this! It looks like some of these issues have been fixed on Wasmer master already and I've made a PR to libc to add the rest! |
Nice response. And thanks. |
1180: Fix compilation for target `x86_64-unknown-linux-musl`. r=losfair a=losfair Fixes compilation failure when built for `x86_64-unknown-linux-musl`. - Allows disabling the `wabt` feature to avoid depending on a C++ compiler. - Disables XMM register dump on fault as a workaround for missing musl libc types (rust-lang/libc#1646). Fixes #1178 and #1173 . Co-authored-by: losfair <[email protected]>
This should be fixed now in Feel free to comment here @ethanfrey if the bug persists |
Thanks @syrusakbary and @MarkMcCaskey Super fast turnaround time |
@losfair shipped the an intermediary change which should work in most situations (mentioned in the PR comments). We'll update it to be fully correct once the libc PR lands! |
I've been in frontend land for our blockchain, and just got back into rust land, including binding with go. And tried out static builds of dlls. It looks much better than last time, but I still got two errors.
These seem to be [[package]]
name = "libc"
version = "0.2.62"
source = "registry+https://github.com/rust-lang/crates.io-index" This is the same compiler environment (and musl instalation) as above. Running in Ubuntu 18.04 with rust 1.40 stable, 1.42 nightly
I will update them and try again |
I updated code and tried again:
[[package]]
name = "libc"
version = "0.2.67"
source = "registry+https://github.com/rust-lang/crates.io-index" And it does compile (no more rust errors!). 🎉 |
Describe the bug
I am embedding wasmer in a go application and want to make a proper static binary. I also had issues with the
cdylib
I compiled under recent Ubuntu not working on old versions of linux (like CentOS7, which uses glibc 2.12 I believe).So, after installing the toolchains, I ended up with something like:
RUSTFLAGS="-C target-feature=-crt-static" rustup run nightly cargo build --release --target x86_64-unknown-linux-musl
This managed to compile and link most of the deps, but it dies on
wasmer-runtime-core
This is build on Ubuntu 18.04 with a recent rust nightly (12-26-2019) and wasmer 0.12.
I ran the following beforehand:
Steps to reproduce
Expected behavior
I thought this would compile.
Actual behavior
Additional context
The text was updated successfully, but these errors were encountered: