Skip to content
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 x86_64-unknown-linux-musl to CI/CD #934

Closed
Andy320 opened this issue Jan 9, 2020 · 4 comments
Closed

Add x86_64-unknown-linux-musl to CI/CD #934

Andy320 opened this issue Jan 9, 2020 · 4 comments

Comments

@Andy320
Copy link

Andy320 commented Jan 9, 2020

error is :
/root/xxx/target/x86_64-unknown-linux-musl/release/deps/libring-25b4eec2a3595d27.rlib: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status

while compiling is successful :
cargo build --release --target x86_64-unknown-linux-gnu

env:
ubuntu 18.04
llvm 9.0
gcc 9.2
musl 1.1.24

my question is :
Does ring support musl ?

thanks a lot

@briansmith
Copy link
Owner

Does ring support musl ?

It is intended to support musl but we don't test it yet. Do you have any other diagnostics?

My guess is you need to use TARGET_CC to tell the build system to use the musl-targetting C toolchain.

@Andy320
Copy link
Author

Andy320 commented Jan 11, 2020

@briansmith
Correctly. I checked my dockerfile, and it has below lines:
ENV TARGET_CC=$OUTPUT/bin/$TARGET-gcc
ENV TARGET_CXX=$OUTPUT/bin/$TARGET-g++
ENV TARGET_C_INCLUDE_PATH=$OUTPUT/$TARGET/include/

Now I changed my dockerfile, removed above lines. And the build for musl and llvm successful.

$ alias rust-musl-builder='docker run --rm -it -v "$(pwd)":/home/rust/src mycompiler:v1.0'
$ rust-musl-builder cargo build --release

Finished release [optimized] target(s) in 11m 22s

@briansmith briansmith changed the title failed when x86_64-unknown-linux-musl Add x86_64-unknown-linux-musl to CI/CD May 21, 2020
@briansmith
Copy link
Owner

I'm glad you got it working. Morphing this into "Add x86_64-unknown-linux-musl" since it seems you got it working.

@briansmith
Copy link
Owner

Closing in favor of the general issue: #713.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants