-
Notifications
You must be signed in to change notification settings - Fork 484
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
Regression for MacOS using cmake with c++11 (unknown target aarch64-apple-darwin11) #1276
Comments
I think this is a This is redundant nowadays, where:
And wrong because the |
Greetings. I was just writing to ask if there are any updates on this issue? I - and some others I know of - are having this same issue as @drewkett raised. I have experimented with both Silicon and Intel-based systems with the same result. Ours is related to
Cmake from cargo.lock:
|
Filed rust-lang/cmake-rs#235. |
The workaround introduced in #39 is no longer necessary since `cc-rs` handles C++ requirements internally, and is in fact detrimental since `cc-rs` has required the target to be a `rustc` target triple since rust-lang/cc-rs#1225 / rust-lang/cc-rs#1252. Additionally, deprecate `uses_cxx11` which was introduced in the same PR. Fixes rust-lang/cc-rs#1276. I didn't update the dependency to anything specific, just a version that I know has the fix.
With version 1.1.32, it now is not possible to build a project on MacOS using the cmake crate enabling c++11. I'm not sure whether to make this issue here or in cmake-rs but i'll make it here because its specifically a release of cc that broke it.
See this example
Cargo.toml
build.rs
"src"
is irrelevant here.This fails to build with
Looking at cmake code, it appends 11 as the target for C++11. My understanding is that
darwin11
here is the MacOS clang way of specifying the minimum target MacOS version. In thecmake
crate, theTARGET
env var is set with thataarch64-apple-darwin11
which then causescc
to fail when trying to parse the target to a target triple.After having typed this out, I'm guessing i can in all likelihood just stop setting
uses_cxx11
fromcmake
because any toolchains i'd be compiling with likely have C++11 available. I also wonder if insteadcmake
could use a different mechanism to ensure a minimum toolchain version, but I don't know enough about how that works to have an immediate answer there. However, I'll leave this ticket here to call out the issue (and in case others run into the same thing).The text was updated successfully, but these errors were encountered: