-
Notifications
You must be signed in to change notification settings - Fork 408
Cannot compile cmake projects with cross-rs freebsd target #1291
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
Comments
can you try [target.x86_64-unknown-freebsd]
env.passthrough = ["CMAKE_TOOLCHAIN_FILE_x86_64_unknown_freebsd"] this might be related to #1270 |
This is what I get: Cross.toml entry:
Note the warning and setting Output:
|
Curious if anyone else has issues with the freebsd docker image cmake setup? It seems that many of them work just fine. I successfully tested this crate specifically for cross compilation on 13 different targets which includes arm, mips, powerpc and intel targets. This seems to be the most cross platform TLS library for rust that I could find. |
I was able to reproduce this error and narrow it down to an issue when generating code with rust-bindgen. Here is an example repo with out any dependency on cmake or mbedtls that just tries to generate bindings for When building for freebsd I get the same error and when trying to compile rust-mbedtls for freebsd. I am not sure if it is an issue with cross or bindgen. |
I just build a FreeBSD vm and compiled both my minimal example and rust-mbedtls on there no problem. So this is an issue with cross or the FreeBSD image. |
it's definitely the image then, cross doesn't do anything special except calling the container engine to mount the filesystem and then call cargo. |
Checklist
Describe your issue
I am trying to set up cross-compilers toolchains to compile against various platforms including freebsd x64. I cannot get the mbedtls 0.11.0 crate to build, which I need for a project of mine. I am on commit hash 37c681a of the
cross-rs
repo and I am using the dockerfiles in there but I've added a few packages to thecommon.sh
file which I will show below. I've reproduce this issue with both cross 0.2.4 and cross 0.2.5. I cannot get the mbedtls crate to build due to cmake errors and I have tried changing many variables that affect the sysroot but it makes no difference. Have had much greater success with musl targets than gnu targets overall but I have been able to get many gnu targets working. Anyway I am not a cmake expert so I would appreciate the help on this or a fix if it's related to this image's cmake setup. It works on many of the cross-rs images.To recreate my issue...
It's a very simple hello world project with the mbedtls crate added.
My Cargo.toml:
My Cross.toml mainly for mbedtls cmake system needs python and some packages for it (using custom built image from
cross/docker/Dockerfile.x86_64-unknown-freebsd
):My
docker/common.sh
file for adding additional packages my application needs:What target(s) are you cross-compiling for?
x86_64-unknown-freebsd
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross v0.2.5
Example
Build step:
Additional information / notes
I can build with these commands with similar Dockerfile updates (need python3, pip and those python packages as above in the image for it to work,
pre-build
does not always work).cross build --target mips-unknown-linux-gnu
cross build --target mipsel-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: