Skip to content

gnat: enable aarch64-darwin build - #385189

Closed
axman6 wants to merge 1 commit into
NixOS:masterfrom
axman6:gnat-aarch64-darwin-385174
Closed

axman6 wants to merge 1 commit into
NixOS:masterfrom
axman6:gnat-aarch64-darwin-385174

Conversation

@axman6

@axman6 axman6 commented Feb 26, 2025 •

Copy link
Copy Markdown
Contributor

Things done

Resolves #385174

The upstream GNAT-FSF-builds provides pre-built binaries for aarch64-darwin. This PR adds gnat-bootstrap13 and gnat-bootstrap14 using these prebuilt packages for aarch64-darwin and uses gnat-bootstrap13 to build gnat13 and gnat14.

TODO:

  • hashes for x86-64-linux
  • Figure out the why there are missing symbols on aarch64-darwin build
$ nix log /nix/store/kif93dlgf3in47bn51l9c6cfrlrlhqni-gnat-14-20241116.drv
...
     ld: warning: object file (/nix/store/hmzvc39ni2v0s3frgspqwfvrv8npx3n4-gnat-bootstrap-13.2.0-2/lib/gcc/aarch64-apple-darwin23.2.0/13.2.0/adalib/libgnat.a(raise-gcc.o)) was built for newer macOS version (14.0) than being linked (11.3)
# Ignore errors to work around finalization issues in older compilers
cd ada/gen_il; ./gen_il-main
dyld[15710]: missing symbol called

raised PROGRAM_ERROR : unhandled signal
make[3]: [../../gcc-14-20241116/gcc/ada/Make-generated.in:23: ada/stamp-gen_il] Error 1 (ignored)
/private/tmp/nix-build-gnat-14-20241116.drv-1/gcc-14-20241116/gcc/../move-if-change ada/gen_il/seinfo_tables.ads ada/seinfo_tables.ads
mv: cannot stat 'ada/gen_il/seinfo_tables.ads': No such file or directory
make[3]: *** [../../gcc-14-20241116/gcc/ada/Make-generated.in:24: ada/stamp-gen_il] Error 1
make[3]: *** Waiting for unfinished jobs....
rm gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod
make[3]: Leaving directory '/private/tmp/nix-build-gnat-14-20241116.drv-1/build/gcc'
make[2]: *** [Makefile:5091: all-stage2-gcc] Error 2
make[2]: Leaving directory '/private/tmp/nix-build-gnat-14-20241116.drv-1/build'
make[1]: *** [Makefile:23885: stage2-bubble] Error 2
make[1]: Leaving directory '/private/tmp/nix-build-gnat-14-20241116.drv-1/build'
make: *** [Makefile:24081: bootstrap] Error 2
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux (currently failing)
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg Bot added the 6.topic: darwin Running or building packages on Darwin label Feb 26, 2025
@wegank wegank mentioned this pull request Feb 26, 2025
3 tasks done
@wegank
wegank force-pushed the gnat-aarch64-darwin-385174 branch 3 times, most recently from 6d553be to afd80c0 Compare February 27, 2025 08:35
@github-actions github-actions Bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. and removed 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. labels Feb 27, 2025
@axman6

axman6 commented Feb 27, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the clean up @wegank, definitely cleaner than what I had, I just didn’t want to change things too much for things that were working, but apparently they weren’t working anyway.

@wegank
wegank force-pushed the gnat-aarch64-darwin-385174 branch from afd80c0 to 7a23923 Compare March 28, 2025 16:05
@wegank

wegank commented Mar 28, 2025

Copy link
Copy Markdown
Member

Possibly related: iains/gcc-13-branch#20

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 2, 2025
@wegank
wegank force-pushed the gnat-aarch64-darwin-385174 branch from 7a23923 to 2a8bd63 Compare April 4, 2025 20:12
@ofborg ofborg Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 4, 2025
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 26, 2025
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 2, 2025
@sempiternal-aurora

Copy link
Copy Markdown
Contributor

Superseded by #522847

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package request: gnat (for aarch64-darwin)

3 participants