-
Notifications
You must be signed in to change notification settings - Fork 572
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
GCC 4.8.5 for musl: tweak patch to match upstream #3969
GCC 4.8.5 for musl: tweak patch to match upstream #3969
Conversation
More details about the error I got:
|
https://github.com/JuliaPackaging/BinaryBuilderBase.jl/blob/c213d27e79009bf6e2b242965484808604e07902/src/BuildToolchains.jl#L200 was changed recently in JuliaPackaging/BinaryBuilderBase.jl#181, but I think I used meson since then (and this is generated regardless of whether meson is used or not), so I'm not sure what's going on here, maybe an unexpected code path |
Since I keep getting that error when trying to build it locally, I'll now try and see what happens if I try to build it on yggdrasil... |
We don't build anything under |
Damn. OK, so I how can I do this then? I was hoping that Yggdrasil is able to build it, then I'd download the resulting artifact as usual, and use that to check if the issue is resolved. |
No, we build all the compiler shards locally and deploy them directly to releases in this repository. This process is completely disjointed from the rest of what we do here. |
OK. But I just can't get it to build. How to proceed? Damn. |
Try to understand what's wrong with the Meson toolchain file 🙂 As I said above, it has been changed very recently, it isn't impossible there was an error in an untested code path. |
Yeah I think the line you pointed out, cmake_toolchain_file = '$(envs[is_host ? "CMAKE_HOST_TOOLCHAIN" : "CMAKE_TARGET_TOOLCHAIN"])' is problematic because it assumes But I have no idea what the "correct" fix is... some options:
|
For now I removed the line setting |
Problem with the toolchain files should have been fixed by JuliaPackaging/BinaryBuilderBase.jl#185, which is now in |
OK, now it works, and the patch seems to have the desired effect:
How to proceed from here? |
That's awesome, thanks! We need to do the same also for GCC 5, can you check the patch applies cleanly also there? For GCC 5 the patch is a symlink to the GCC 4 one, so you don't have to edit anything if that applies cleanly.
If this works, we can merge it and we can build and publish it, I'd just wait some time in case other needs arise, these are pretty large artifacts, I prefer not to build them too often or needlessly. |
Actually, having thought about this some more (and knowing that clang may also need this in various combinations), perhaps we should use a completely different approach, and just patch |
Uhm, that'd probably work, even though I'm not sure Side note, regarding the need to rebuild GCC for other stuff, I just discovered we're missing this symlink in the compiler shards for all Musl platforms: Yggdrasil/0_RootFS/gcc_common.jl Lines 701 to 702 in beb4ee8
|
The reason I suggested Actually, the result would still not match 100% what the compiler does; to get that, one would have to use
Do you recall any details as to what kind of bad surprises those were?
But the build system would not see this flag, it would not be in the CPPFLAGS after all.
|
The patch for using old GCC on musl defined INCLUDE_DEFAULTS_MUSL_LOCAL but never used it in the definition of INCLUDE_DEFAULTS. Comparing the patch with what is in mainline GCC these days suggest this patch. For reference, see: <https://github.com/gcc-mirror/gcc/blob/master/gcc/config/linux.h#L190>
4e8d441
to
c1d4022
Compare
I confirmed that GCC 5.2.0 also builds fine, and also has the desired behavior. To wit:
|
Awesome, thanks! The idea of fixing this in
No, sorry. It was outside of BinaryBuilder, something completely unrelated. But I remember the compiler was picking up wrong headers because of |
The patch for using old GCC on musl defined INCLUDE_DEFAULTS_MUSL_LOCAL but never used it in the definition of INCLUDE_DEFAULTS. Comparing the patch with what is in mainline GCC these days suggest this patch. For reference, see: <https://github.com/gcc-mirror/gcc/blob/9eec77c0df9e5c67454a2e8f83246104458ba4f0/gcc/config/linux.h#L190>
The patch for using old GCC on musl defined INCLUDE_DEFAULTS_MUSL_LOCAL but
never used it in the definition of INCLUDE_DEFAULTS. Comparing the patch with
what is in mainline GCC these days suggest this patch. For reference, see:
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/linux.h#L190
This is a first step towards addressing (parts of) issue #3949. Alas, since I only modify a .patch, nothing will actually be built -- which is good, as I am not sure how the correct way is to proceed with updating the RootFS / compiler shard. And in fact before doing that, it should be tested whether the patch even works as intended. So, baby steps:
julia --color=yes --proj=../../.ci build_tarballs.jl --verbose --debug=end x86_64-linux-musl
but I gotERROR: LoadError: KeyError: key "CMAKE_TARGET_TOOLCHAIN" not found
0_RootFS/GCCBootstrap@4/build_tarballs.jl
in this PR to force a rebuild?