-
Notifications
You must be signed in to change notification settings - Fork 60
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
Can't build sysroot #525
Comments
What is your linker? Is it |
yeah user@192 rustc_codegen_gcc % clang --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin |
From what I can see in your logs, it seems there was a |
it looks like it does. How do I run the gcc backend with this flag? -fno-leading-underscore |
Set this environment variable before building the sysroot |
I still get the same problem when running these commands to try again CG_RUSTFLAGS=-Cllvm-args=-fno-leading-underscore ./y.sh clean all
CG_RUSTFLAGS=-Cllvm-args=-fno-leading-underscore ./y.sh prepare
CG_RUSTFLAGS=-Cllvm-args=-fno-leading-underscore ./y.sh build sysroot --release I think it might just be a compatibility issue with the arm architecture. |
I just looked back at your logs and it's actually not the sysroot that you cannot build, it's rustc_codegen_gcc itself. Since I was able to build the sysroot on a Mac M1 with Asahi Linux, I believe this is related to macOS and not the hardware. I believe this is more related to macOS ABI, so perhaps you built libgccjit with the wrong ABI? |
I just copied the config.toml file as shown in the example and it downloaded that when I ran the commands. |
I think it's why it doesn't work: it's compiled for linux. You need to build gcc yourself to be able to use it. |
ok I will try out cloning gcc and follow the instructions to compile it myself. |
I got an error when following the gcc instructions to compile my own libgccjit. after following these steps but converting them into macos supported packages and instructions. $ git clone https://github.com/antoyo/gcc
$ cd gcc
$ brew install flex mpfr gmp libmpc
$ mkdir gcc-build gcc-install
$ cd gcc-build
$ ../gcc/configure \
--enable-host-shared \
--enable-languages=jit \
--enable-checking=release \
--disable-bootstrap \
--disable-multilib \
--prefix=$(pwd)/../gcc-install \ I got this error *** Configuration aarch64-apple-darwin22.6.0 not supported Update: I have found a mac os compatible gcc repo, @antoyo can you make a note in the docs that macos is incompatible for the time being. |
Yes, I will add the note that macOS is currently incompatible. Do you know how much the repo you found diverges from upstream? |
I have the git diff between the two repos and its pretty chunky. its uploaded here |
Just to make sure, did you do the diff betwee these 2 repos:
? |
no specifically your patched version.
|
Ok, my fork is 2379 commits behind compared to upstream, so that might be why there are so many changes. I was asking if you compared with https://github.com/gcc-mirror/gcc to know if it would be easy to add the changes required for macOS if I rebase my fork. |
ok here's the diff between master gcc and gcc-darwin-arm64 master-wip-apple-si |
Can't build sysroot with mac m1.
I've already tried to run
clean all
and thenprepare
again but it failed.https://pastebin.com/EVp68ZxA
The text was updated successfully, but these errors were encountered: