Rust-GCC / gccrs

GCC Front-End for Rust
https://rust-gcc.github.io/
GNU General Public License v2.0
2.46k stars 159 forks source link

Fails to build on an M2 MBP #3264

Open theoparis opened 2 days ago

theoparis commented 2 days ago

Summary

I am trying to build gcc-rs with upstream gcc on a M2 MBP. Building gcc failed due to aarch64-apple-darwin24.1.0 being an unsupported target...

Reproducer

Build gcc-rs on a apple silicon mac with macOS.

Does the code make use of any (1.49) nightly feature ?

Godbolt link

No response

Actual behavior

The current behavior is that gcc fails to build, saying aarch64-apple-darwin24.1.0 is not a supported configuration.

Expected behavior

I expected to see a successful build.

GCC Version

e4c182ee008018259c80723780531bcec7ff168f

dkm commented 1 day ago

You get this message because... it's not supported :sweat_smile:

If you want to have native support with gccrs, you'd need to rebase onto https://github.com/iains/gcc-darwin-arm64, or simply "wait" until it lands in upstream GCC. Until then, I'm not sure we can do much on our side, sorry.

CohenArthur commented 6 hours ago

Yes, sorry about that @theoparis but this isn't specific to the Rust frontend so we're not going to fix it here. Have a look at @badumbatish's https://github.com/badumbatish/gccrs-workspace/, I think this is the repo that has building instructions for Apple M1/M2?

badumbatish commented 1 hour ago

yes! the repo mentioned by Arthur will allow you to build gccrs on your mac M2 (via virtualization of Ubuntun 22.04 ARM through docker).

I did this year's google summer of code on my Mac M2 using the repository. The guide is detailed enough that I think you'll find it pretty easy to follow :)