Skip to content

pkgs.gcc16: fails to build on aarch64-apple-darwin #537828

Closed

Description

@FabioFracassi

Nixpkgs version

  • Unstable (26.11)

Describe the bug

trying to use pckg.gcc16 fails. There is no binary package so nix tries to build form source. That fails with the error message *** Configuration aarch64-apple-darwin not supported.

The problem is probably using vanilla gcc sources, which does not have support for darwin.
https://github.com/iains/gcc-darwin-arm64 is providing support (the v16 branch is what homebrew and conda use for their gcc packages).

Steps to reproduce

nix-shell -p gcc16

Expected behaviour

nix-shell -p gcc16

[nix-shell:~/dev/nix]$ which gcc
/nix/store/<some-id>-gcc-wrapper-16.1.0/bin/gcc

Screenshots

No response

Relevant log output

checking if mkdir takes one argument... no
checking for fputc_unlocked... no
*** Configuration aarch64-apple-darwin not supported
make[2]: *** [Makefile:4815: configure-stage1-gcc] Error 1
make[2]: *** Waiting for unfinished jobs....
no
checking for fputs_unlocked... no
checking for fread_unlocked... no
checking for fwrite_unlocked... no
checking for getchar_unlocked... yes
checking for getc_unlocked... yes
checking for putchar_unlocked... yes
checking for putc_unlocked... yes
checking for setlocale... yes
checking whether abort is declared... yes
checking whether asprintf is declared... yes
checking whether basename is declared... no
checking whether errno is declared... no
checking whether getopt is declared... yes
checking whether vasprintf is declared... yes
checking whether clearerr_unlocked is declared... yes
checking whether feof_unlocked is declared... yes
checking whether ferror_unlocked is declared... yes
checking whether fflush_unlocked is declared... no
checking whether fgetc_unlocked is declared... no
checking whether fgets_unlocked is declared... no
checking whether fileno_unlocked is declared... yes
checking whether fprintf_unlocked is declared... no
checking whether fputc_unlocked is declared... no
checking whether fputs_unlocked is declared... no
checking whether fread_unlocked is declared... no
checking whether fwrite_unlocked is declared... no
checking whether getchar_unlocked is declared... yes
checking whether getc_unlocked is declared... yes
checking whether putchar_unlocked is declared... yes
checking whether putc_unlocked is declared... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for ANSI C header files... (cached) yes
checking for nl_langinfo and CODESET... yes
checking whether NLS is requested... yes
checking for msgfmt... /nix/store/rdrrlaq086albbwbm0j41nisw5qq82r7-gettext-1.0/bin/msgfmt
checking for gmsgfmt... /nix/store/rdrrlaq086albbwbm0j41nisw5qq82r7-gettext-1.0/bin/msgfmt
checking for xgettext... /nix/store/rdrrlaq086albbwbm0j41nisw5qq82r7-gettext-1.0/bin/xgettext
checking for msgmerge... /nix/store/rdrrlaq086albbwbm0j41nisw5qq82r7-gettext-1.0/bin/msgmerge
checking for ld used by GCC... ld
checking if the linker (ld) is GNU ld... no
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... yes
checking for CFLocaleCopyPreferredLanguages... yes
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking whether NLS is requested... yes
checking for catalogs to be installed...  be ca da de el eo es fi fr id ja ka nl pt_BR ro ru sr sv tr uk vi zh_CN zh_TW be ca da de el eo es fi fr id ja ka nl pt_BR ro ru sr sv tr uk vi zh_CN zh_TW
checking for uchar... 
checking size of ino_t... 8
checking size of dev_t... 4
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking whether iconv is compatible with its POSIX signature... yes
checking for CET support... no
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depdir commands
mkdir -p -- .deps
config.status: executing default-1 commands
make[2]: Leaving directory '/nix/var/nix/builds/nix-94895-3823640468/build'
make[1]: *** [Makefile:23971: stage1-bubble] Error 2
make[1]: Leaving directory '/nix/var/nix/builds/nix-94895-3823640468/build'
make: *** [Makefile:24276: bootstrap] Error 2
error: Cannot build '/nix/store/w81cx1knwrc30ihkq60fmwhb4k7zdp5b-gcc-16.1.0.drv'.
       Reason: builder failed with exit code 2.
       Output paths:
         /nix/store/29x2f8kjy0sjkaw62r8w0q8maynlmmn9-gcc-16.1.0-lib
         /nix/store/4mbzb7brp6q647ps240w2189j0clrfvl-gcc-16.1.0
         /nix/store/83dc1gpjwb5gh80kc6zyb48xvb5wd87q-gcc-16.1.0-info
         /nix/store/jn7hw26id2l9p3rvl3dnjzr1x8djzbwd-gcc-16.1.0-man
       Last 25 log lines:
       > checking for CFLocaleCopyPreferredLanguages... yes
       > checking for GNU gettext in libc... yes
       > checking whether to use NLS... yes
       > checking where the gettext function comes from... libc
       > checking whether NLS is requested... yes
       > checking for catalogs to be installed...  be ca da de el eo es fi fr id ja ka nl pt_BR ro ru sr sv tr uk vi zh_CN zh_TW be ca da de el eo es fi fr id ja ka nl pt_BR ro ru sr sv tr uk vi zh_CN zh_TW
       > checking for uchar...
       > checking size of ino_t... 8
       > checking size of dev_t... 4
       > checking for iconv... yes
       > checking for working iconv... yes
       > checking how to link with libiconv... -liconv
       > checking whether iconv is compatible with its POSIX signature... yes
       > checking for CET support... no
       > configure: updating cache ./config.cache
       > configure: creating ./config.status
       > config.status: creating Makefile
       > config.status: creating config.h
       > config.status: executing depdir commands
       > mkdir -p -- .deps
       > config.status: executing default-1 commands
       > make[2]: Leaving directory '/nix/var/nix/builds/nix-94895-3823640468/build'
       > make[1]: *** [Makefile:23971: stage1-bubble] Error 2
       > make[1]: Leaving directory '/nix/var/nix/builds/nix-94895-3823640468/build'
       > make: *** [Makefile:24276: bootstrap] Error 2
       For full logs, run:
         nix log /nix/store/w81cx1knwrc30ihkq60fmwhb4k7zdp5b-gcc-16.1.0.drv
error: Cannot build '/nix/store/frh10d7x12dwg4hap3qwr5dmfvzr3xpa-gcc-wrapper-16.1.0.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/8dwra4xms6gwfvfgi7fhggpihy6l7l58-gcc-wrapper-16.1.0-info
         /nix/store/gxb2lz5w9b18d213dnbfsvnv6agqjqq4-gcc-wrapper-16.1.0-man
         /nix/store/rxgqxg8yfmd2k0dv7f235pj7paasi3nz-gcc-wrapper-16.1.0
error: Build failed due to failed dependency
⏎

Additional context

No response

System metadata

this path will be fetched (1.8 KiB download, 4.3 KiB unpacked):
/nix/store/lnrlp78vbwl35rgv8gmnlkgs32vf2fgh-nix-info
copying path '/nix/store/lnrlp78vbwl35rgv8gmnlkgs32vf2fgh-nix-info' from 'https://cache.nixos.org'...

  • system: "aarch64-darwin"
  • host os: Darwin 25.5.0, macOS 26.5
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.34.6
  • nixpkgs: /nix/store/pbdsbca6a1kw809vvwc6y97bwjcxm5hh-source

Are you using nix-darwin?

No, I am not using nix-darwin.

Notify maintainers

@vcunat @Ericson2314 @balsoft @andir @leona-ya @pyrox0

Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. added
    0.kind: bug
    6.topic: darwin
    on Jul 2, 2026
  2. vcunat commented on Jul 3, 2026

    @vcunat
    Member

    On Hydra e.g. https://hydra.nixos.org/build/332946535/nixlog/1/tail

    Honestly, I personally won't be putting significant effort into fixing gcc on darwin, but perhaps others might.

  3. emilazy commented on Jul 3, 2026

    @emilazy
    Member

    #519065 fixes this.

  4. linked a pull request that will close this issuegcc: clean up Darwin patches #519065on Jul 3, 2026
  5. FabioFracassi commented on Jul 3, 2026

    @FabioFracassi
    Author

    Thank You. Is there any way to test this in a devenv?

  6. linked a pull request that will close this issuestaging-next 2026-07-15 #541843on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug6.topic: darwin

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions