-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
zig stuck at llvm emit object on riscv64-linux sifive_u74 #18872
Comments
Are you also setting With |
I have a few PR's merged, the RISC-V glibc, CPU model, and the other one. I don't set the target when I run on the VisionFive2 but I do when zig-bootstrap or cross compiling. |
By the mention of the glibc PR I'm guessing that you're linking libc? |
No, I'm not linking libc. I just have the patch. |
Then I'm not sure how you're getting to |
It's not with the builder, it's with building a
|
I've found the problem:
This is where LLVM gets stuck. Backtrace:
|
I was able to reproduce it. |
That's great, I thought I was going crazy yesterday when Zig was just constantly getting stuck. There's been times where zig-bootstrap work with baseline but there's times where it doesn't work. Should an issue be opened on LLVM's side reporting this bug? |
Yes but it'd be good to investigate a bit first. You happen to have a debug build of LLVM handy? I'll start the build otherwise. |
I don't have one right now but I can get one built in like 20 minutes. |
I'll let you have the honors. And you might also benefit from having a debug build in the future seeing as you'll probably continue tinkering with riscv. |
Yeah, it's already 14% done (Apple M1 Pro go brrr). Having this debug build will definitely be useful. |
I'm having some issues with building Zig with a debug build of LLVM 17 on my M1 Pro system (the fastest system I got). I'll try it one more time and if that doesn't work, I'll try my desktop which should have enough RAM but if neither of those work I might need you (@Vexu) to try it. |
I got a backtrace finally. |
Potentially fixed by llvm/llvm-project@b06e736? Should re-evaluate this with LLVM 19. |
Zig Version
0.12.0-dev.2058+04ac028a2
Steps to Reproduce and Observed Behavior
Run
zig build -Dcpu=sifive_u74
in this repo on a Sifive U74 system such as a VisionFive 2. This can also occur with zig-bootstrap (even if updated to use zig master).After waiting 3 hours or longer, nothing happens during the
LLVM Emit Object
stage for building the zig executable itself. On the other hand, the build runnable builds in 6 minutes on the VisionFive 2 so this likely isn't just a LLVM is entirely broken.Expected Behavior
Zig should finish.
The text was updated successfully, but these errors were encountered: