-
Notifications
You must be signed in to change notification settings - Fork 16
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
Failing cross compilation aarch64-unknown-linux-musl #142
Comments
can you also try --features build_cc as well so we can see if there are other errors than -mcx16 |
Build with
Compiliation failed because of
|
Thanks, I've seen the majority of warnings go away using clang, g++ tends to be a little aggressive, you can change by or musl equivalent |
Ok thanks. Let me build a docker image and try again. |
BTW, it seems that snmalloc doesn't work well on MUSL: #102 . Let me try to make a docker image with a clang wrapper of MUSL. |
yeah but your original error and architecture were a little different so I was getting curious to why there was a different error lol |
Well, after searching on Google, there is no existed well maintained project that help to build a MUSL toolchain with clang. I would give up right here, since even if I have succeeded make it built, it won't work well with MUSL. |
I wouldn't close yet, I know upstream was thinking on trying to implement a workaround for the previous musl issue so they may want to know someone is still interested |
Yeah. It is possible to write a work around to the issue mentioned. It isn't on my path at the moment, but I would be happy to review, and help someone if they want to take on #102. |
The if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
target_compile_options(snmalloc_lib INTERFACE -mcx16)
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "amd64")
target_compile_options(snmalloc_lib INTERFACE -mcx16)
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
target_compile_options(snmalloc_lib INTERFACE -mcx16)
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
target_compile_options(snmalloc_lib INTERFACE -mcx16)
# XXX elseif ARM?
endif() This code should support cross compiling. Perhaps, this is a Rust CMake issue? Though, our CI does not check the cross compiling case. The warning:
Looks like the |
OK I was able to build with clang available so Ill attach the dockerfile to help anyone interested, --- stderr error occurred: Command "clang++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=aarch64-unknown-linux-musl" "-I" "snmalloc/src" "-Wall" "-Wextra" "-o" "/snmalloc-rs/target/aarch64-unknown-linux-musl/debug/build/snmalloc-sys-83e4008035e1f873/out/snmalloc/src/override/rust.o" "-c" "snmalloc/src/override/rust.cc" with args "clang++" did not execute successfully (status code exit code: 1). |
I built it with
cross
.The text was updated successfully, but these errors were encountered: