-
Notifications
You must be signed in to change notification settings - Fork 390
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
archiver in freebsd images appears to be broken #1100
Comments
It works if we use
Cross.toml [target.x86_64-unknown-freebsd]
dockerfile = "./Dockerfile.x86_64-unknown-freebsd" And then for Dockerfile.x86_64-unknown-freebsd: FROM ghcr.io/cross-rs/x86_64-unknown-freebsd:0.2.4
ENV AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd12-ar |
or just [target.x86_64-unknown-freebsd.env]
passthrough = ["AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd12-ar"] |
Aha, curious. This seems like it is potentially an issue and this is a very recent change too (rust-lang/cc-rs#735). But otherwise yeah setting the environment variable does work. |
As observed in cross-rs/cross#1100, in some situations `*-gcc-ar` might actually be just broken. I believe this is most likely just a plain bug in gcc (failing to consider `--disable-lto` configuration option somewhere in their build setup,) but for the time being `*-ar` tends to avoid this problem altogether. Code added in rust-lang#736 appears to be preferring `*-gcc-ar`, but no strong rationale is given to prefer one over the other. `*-gcc-ar` being outright broken sometimes seems like a rationale strong enough to continue preferring binutils’ `ar`.
As observed in cross-rs/cross#1100, in some situations `*-gcc-ar` might actually be just broken. I believe this is most likely just a plain bug in gcc (failing to consider `--disable-lto` configuration option somewhere in their build setup,) but for the time being `*-ar` tends to avoid this problem altogether. Code added in #736 appears to be preferring `*-gcc-ar`, but no strong rationale is given to prefer one over the other. `*-gcc-ar` being outright broken sometimes seems like a rationale strong enough to continue preferring binutils’ `ar`.
This is also broken for solaris. It might be a good idea to provide |
Checklist
Describe your issue
The toolchain used in the freebsd images appears to be broken. I managed to reduce the test case basically down to just:
This in practice causes crates such as
cc
fail to package the built objects into an.a
in crates’ build.rs scripts.What target(s) are you cross-compiling for?
i686-unknown-freebsd, 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 0.2.4
Example
No response
Additional information / notes
The closest relevant thing I can find on the internet is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81326. Curiously we are already building the toolchain with
--disable-lto
flag, so it might be a bug in gcc itself?The text was updated successfully, but these errors were encountered: