-
Notifications
You must be signed in to change notification settings - Fork 114
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
Fails to compile rustc 1.39 on aarch64 #208
Comments
Those |
I tried rebuilding from the latest commit and now I get the following error:
I can also post the whole logfile if you'd like. Thanks! |
This might be a bug around handling of high-aligned arguments (i.e. arguments with alignment more than one pointer). Could you check the alignment of these types (should be in the generated source just below the type definition) |
Confirmed - Didn't handle high-align types in enum and struct constructors. |
Fantastic, thanks! Do you still need me to send the generated source? |
No, I figured it out from the function names (and thinking about where it could have been omitted). |
Fix committed above, can you confirm that it worked? |
It appears to be working in that the compilation proceeds beyond that point. However I'm now running out of memory on the following:
This was with 8GB + 2GB zswap of memory available. I'm going to try adding additional swapspace and hopefully it'll work this time. Is there anything that can be done to reduce the memory requirements? |
That one is a bit harder. Manually runing mrustc without |
I upped the available memory to 14GB and it successfully built rustc and cargo. However, now I'm encountering a segfault when trying to rebuild stdlib with rustc. Guix runs this bootstrapping process in an isolated build environment so I'll need to manually step through the process so I can get a backtrace out. |
I'm using local root: 3ec8cd8 and build fails on aarch64 with macOS 12 as:
I'm using standard clang from macOS. A trivial patch: diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp
index 3bc23222..ce85585f 100644
--- a/src/trans/codegen_c.cpp
+++ b/src/trans/codegen_c.cpp
@@ -1210,7 +1210,7 @@ namespace {
{
args.push_back(c);
}
- args.push_back("-Wl,--start-group"); // Group to avoid linking ordering
+ //args.push_back("-Wl,--start-group"); // Group to avoid linking ordering
//args.push_back("-Wl,--push-state");
for(auto l_d : libraries_and_dirs)
{
@@ -1240,7 +1240,7 @@ namespace {
}
}
//args.push_back("-Wl,--pop-state");
- args.push_back("-Wl,--end-group"); // Group to avoid linking ordering
+ //args.push_back("-Wl,--end-group"); // Group to avoid linking ordering
for( const auto& a : Target_GetCurSpec().m_backend_c.m_linker_opts )
{
args.push_back( a.c_str() ); allows to move forward and have linking error on
Thus, I've tried
some logs:
|
Rustc 1.39 doesn't support macOS for AArch64. Basic support was only introduced stratung from rustc 1.47 in rust-lang/rust#74541. |
@bjorn3 but |
As far as I am aware 1.54.0 support is still work in progress. |
@bjorn3 yes, but |
1.54.0 is mostly working now, give it a try. |
@thepowersgang I just tried a7eab91 as local root and it crashed as:
with
|
@akirakyle You appear to be doing a guix build, is that working? (I might make a new issue for the macos issues) |
I received the same error when trying to run
I was not doing any special kind of build. |
@pan93412 That's 1.54, probably needs its own issue (that's just a TODO) |
@thepowersgang I've just tested 2c4f89f on aarch64 and the issue still here on 1.54.0. Shall I create a new issue for 1.54.0? |
Yes, this issue is about 1.39 only |
It appears to work for 1.54.0, which is what Guix does to successfully bootstrap rust on aarch64-linux:
If it doesn't work for you, you may want to review how it's done in Guix in the |
I thought I'd see if the rustc bootstrap chain in guix on aarch64 might work. I think mrustc built successfully but then it encountered an error trying to build rustc 1.39. The following is the end of the build log:
I tried searching this project but I couldn't get a clear idea of if this is supposed to be supported by mrustc? Thanks
The text was updated successfully, but these errors were encountered: