Skip to content

Build failure: pkgsCross.aarch64-darwin.stdenv #273442

@t0rr3sp3dr0

Description

@t0rr3sp3dr0

Steps To Reproduce

Steps to reproduce the behavior:

  1. build pkgsCross.aarch64-darwin.stdenv

Build log

user@macos-sonoma ~ % nix-build '<nixpkgs>' -A pkgsCross.aarch64-darwin.stdenv -I nixpkgs=channel:nixpkgs-unstable --show-trace
error:
       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'stdenv-darwin'
         whose name attribute is located at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/default.nix:93:14

       … while evaluating attribute 'defaultNativeBuildInputs' of derivation 'stdenv-darwin'

         at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/default.nix:126:14:

          125|
          126|       inherit initialPath shell
             |              ^
          127|         defaultNativeBuildInputs defaultBuildInputs;

       … while evaluating derivation 'aarch64-apple-darwin-clang-wrapper-16.0.6'
         whose name attribute is located at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/make-derivation.nix:348:7

       … while evaluating attribute 'depsTargetTargetPropagated' of derivation 'aarch64-apple-darwin-clang-wrapper-16.0.6'

         at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/make-derivation.nix:403:7:

          402|       propagatedBuildInputs       = elemAt (elemAt propagatedDependencies 1) 1;
          403|       depsTargetTargetPropagated  = elemAt (elemAt propagatedDependencies 2) 0;
             |       ^
          404|

       … while evaluating derivation 'libcxx-aarch64-apple-darwin-16.0.6'
         whose name attribute is located at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/make-derivation.nix:348:7

       … while evaluating attribute 'stdenv' of derivation 'libcxx-aarch64-apple-darwin-16.0.6'

         at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/make-derivation.nix:377:14:

          376|       args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
          377|       inherit stdenv;
             |              ^
          378|

       … while evaluating derivation 'stdenv-darwin'
         whose name attribute is located at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/default.nix:93:14

       … while evaluating attribute 'defaultNativeBuildInputs' of derivation 'stdenv-darwin'

         at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/default.nix:126:14:

          125|
          126|       inherit initialPath shell
             |              ^
          127|         defaultNativeBuildInputs defaultBuildInputs;

       … while evaluating derivation 'aarch64-apple-darwin-clang-wrapper-16.0.6'
         whose name attribute is located at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/make-derivation.nix:348:7

       … while evaluating attribute 'depsTargetTargetPropagated' of derivation 'aarch64-apple-darwin-clang-wrapper-16.0.6'

         at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/make-derivation.nix:403:7:

          402|       propagatedBuildInputs       = elemAt (elemAt propagatedDependencies 1) 1;
          403|       depsTargetTargetPropagated  = elemAt (elemAt propagatedDependencies 2) 0;
             |       ^
          404|

       … while evaluating derivation 'compiler-rt-libc-aarch64-apple-darwin-16.0.6'
         whose name attribute is located at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/make-derivation.nix:348:7

       … while evaluating attribute 'stdenv' of derivation 'compiler-rt-libc-aarch64-apple-darwin-16.0.6'

         at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/make-derivation.nix:377:14:

          376|       args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
          377|       inherit stdenv;
             |              ^
          378|

       … while evaluating derivation 'stdenv-darwin'
         whose name attribute is located at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/default.nix:93:14

       … while evaluating attribute 'defaultNativeBuildInputs' of derivation 'stdenv-darwin'

         at /nix/store/js53b3xz6z97jv87knhw1mdgdc4p845z-source/pkgs/stdenv/generic/default.nix:126:14:

          125|
          126|       inherit initialPath shell
             |              ^
          127|         defaultNativeBuildInputs defaultBuildInputs;

       error: infinite recursion encountered

Additional context

I've tried building aarch64-darwin bash on x86_64-darwin with nix-build '<nixpkgs>' -A pkgsCross.aarch64-darwin.stdenv -I nixpkgs=channel:${CHANNEL} and found the following:

  • The build works as expected when CHANNEL=nixpkgs-22.11-darwin.
  • It builds from source when CHANNEL=nixpkgs-23.05-darwin.
  • Fails with "infinite recursion encountered" when CHANNEL=nixpkgs-23.11-darwin or CHANNEL=nixpkgs-unstable.

This breaks everything cross-building from x86_64-darwin to aarch64-darwin.

Notify maintainers

@Artturin
@Ericson2314
@RaitoBezarius
@alyssais
@amjoseph-nixpkgs
@dtzWill
@lovek323
@primeos
@reckenrode
@rrbutani
@sternenseemann
@szlend
@toonn
@trofi
@vcunat

Metadata

user@macos-sonoma ~ % nix-shell -p nix-info --run 'nix-info -m'
 - system: `"x86_64-darwin"`
 - host os: `Darwin 23.1.0, macOS 10.16`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.19.2`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failureA package fails to build6.topic: cross-compilationBuilding packages on a different platform than they will be used on6.topic: darwinRunning or building packages on Darwin6.topic: llvm/clangIssues related to llvmPackages, clangStdenv and related
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions