Repository navigation
cc-wrapper, gcc, gnat, gnat-bootstrap: fix GCC 13 and GNAT 13/14/15 builds on darwin - #522847
Conversation
38f7c23 to
a53de2a
Compare
Review dismissed automatically
a53de2a to
26dc433
Compare
26dc433 to
ae74f90
Compare
sempiternal-aurora
left a comment
There was a problem hiding this comment.
Thank you so much for this, this does seem to fix the local build, and should fix the hydra build as it no longer requires the xcode cli tools installed. Just a few questions I had regarding the implementation. Sadly, I can't seem to run a nixpkgs-review session. Gonna have a further look at this tonight to see if there's something I'm missing.
56257df to
abdd2a0
Compare
|
Hey, would you be able to rebase onto staging? Just means that #523510 will be in the tree and thus builds will be fixed on staging. |
abdd2a0 to
ad7c8b0
Compare
Hi, the cleanup is complete and the branch has been rebased onto staging as requested. The updated commit also addresses the GCC 13 build issues on Darwin. I’ve successfully built it on aarch64-darwin, and I expect it will also resolve the issue on x86_64-darwin. I’ve added logic to exclude gettext from nativeBuildInputs when building GCC/GNAT 13 to avoid header conflicts on Darwin. Let me know if this causes any issues on linux. At the moment, the GNAT 13 darwin build is failing at stage2, and I’m not yet sure whether I’ll be able to resolve it. GNAT 14/15 should continue to build as expected across all platforms based on the fixes in the previous commit, but to be extra certain I will rebuild GNAT/GCC 14/15 on aarch64-darwin and aarch64-linux. That will take some time, and I’ll update once it’s complete. I’ve split the changes into two commits to keep them more manageable, let me know if you’d prefer them squashed. |
GCC 13/14/15 and GNAT 14/15 have been successfully built on both aarch64-darwin and aarch64-linux. |
I have done some testing on 481208b with both native GNAT/GCC and cross GCC builds on aarch64-darwin and aarch64-linux. Everything looks good, and we should be ready to merge. |
sempiternal-aurora
left a comment
There was a problem hiding this comment.
Amazing work, I'm happy with it all now. Now we just wait for a committer.
|
@reckenrode I'm quite happy with this, if you're happy do you reckon we can merge this? |
| gnat-bootstrap13 = wrapCCWith { | ||
| cc = callPackage ../development/compilers/gnat-bootstrap { majorVersion = "13"; }; | ||
| isAlireGNAT = true; | ||
| }; | ||
|
|
||
| gnat-bootstrap14 = wrapCCWith { | ||
| cc = callPackage ../development/compilers/gnat-bootstrap { majorVersion = "14"; }; | ||
| isAlireGNAT = true; | ||
| }; |
There was a problem hiding this comment.
I love dropping the dropping of bintoolsDualAs here. It should make updating cctools easier (since Apple dropped gas from the version after what we have in Nixpkgs).
I left one question and a comment. Otherwise, looks good. |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin staging-26.05
git worktree add -d .worktree/backport-522847-to-staging-26.05 origin/staging-26.05
cd .worktree/backport-522847-to-staging-26.05
git switch --create backport-522847-to-staging-26.05
git cherry-pick -x 481208bdff2dc2f61d4f4fde51e6bd2a939f7d68 |
|
@zinzilulo would you like to make a backport, or would you like me too? Just so we can get these changes in the new 26.05 release. |
Hi, I’ve already created the backport branch, but I’m not very familiar with the backport process yet. I don’t have write access to the repository, so I’m unable to push the branch upstream. It would be great if you could help with the final steps to get the changes into the 26.05 staging branch. If still possible, I’d also like these changes to be backported to 25.11. |
Sure thing! Creating a backport is just another pull request. You branch off from the |
Hi, that’s very helpful. I’ve now created the backport PRs: #525192 and #525200. Thanks everyone for the input and assistance! |
|
And thank you for your first contribution! It's honestly an amazing piece of work, and it's been lovely to help you get it all merged! Also helped me a lot, saves me having to go and fix all this myself. |
|
@zinzilulo If you have free time, would you be able to help me with something? I'm trying to get This error came from me patching out the Do you have any thoughts, do you think this might be related to the requirement that we build gnat with |
Hi, I was looking into this earlier, unfortunely I don’t currently have the time to debug it properly. But here is my speculation:
This suggests the issue is in There’s also a patch (nixpkgs-gnat.xml) that looks a bit fragile to me: <variable name="gnat_unwrapped">
<external>readlink -n ${PATH}/../nix-support/gprconfig-gnat-unwrapped</external>
</variable>If that path resolution is off, it could break compiler discovery and lead to this kind of failure, which could be a contributing issue. The linker warnings are generally harmless (to my experience). It could be due to the usage of a newer SDK, but doesn’t seem to be the offending factor. I think this is less likely a regression from this PR. I’m happy to help dig deeper later if needed, but this probably belongs to #521558. |
Ah, thank you so much! This really helps me. I should be able to use this to see if it fixes things. I have ideas about how I can fix it. Thank you so much! |
Enables GNAT 14 and 15 to build on aarch64-darwin (tested on master cc53fdd).
Resolves: #385174 #385189.
Notes
__FLT_EVAL_METHOD__issues in Ada builds, and fixing this via patches introduces additional header compatibility issuesThings done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.