Skip to content
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

Build failure: xquartz #243101

Open
dscottboggs opened this issue Jul 12, 2023 · 4 comments
Open

Build failure: xquartz #243101

dscottboggs opened this issue Jul 12, 2023 · 4 comments
Labels
0.kind: build failure A package fails to build 6.topic: darwin Running or building packages on Darwin

Comments

@dscottboggs
Copy link
Contributor

dscottboggs commented Jul 12, 2023

Steps To Reproduce

Steps to reproduce the behavior:

  1. build pkgs.xquartz (in this case I added it to environment.systemPackages with nix-darwin, but the same thing happens with nix-shell -p xquartz)

Build log

building the system configuration...
error:
       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'darwin-system-23.11pre501807.5daaa32204e+darwin4'
         whose name attribute is located at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'activationScript' of derivation 'darwin-system-23.11pre501807.5daaa32204e+darwin4'

         at /nix/store/0g7pb0fx3hkpwzzkfliqm9b6ffcibbxi-darwin/darwin/modules/system/default.nix:95:7:

           94|
           95|       activationScript = cfg.activationScripts.script.text;
             |       ^
           96|       activationUserScript = cfg.activationScripts.userScript.text;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: Package ‘mesa-23.1.3’ in /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/development/libraries/mesa/default.nix:361 is marked as broken, refusing to evaluate.

       a) To temporarily allow broken packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_BROKEN=1

        Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
        (Flake) command, `--impure` must be passed in order to read this
        environment variable.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowBroken = true; }
       in configuration.nix to override this.

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix.

Additional context

N/A

Notify maintainers

@cstrahan

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-darwin"`
 - host os: `Darwin 21.6.0, macOS 10.16`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.15.1`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
@dscottboggs dscottboggs added the 0.kind: build failure A package fails to build label Jul 12, 2023
@tjni
Copy link
Contributor

tjni commented Jul 12, 2023

I cannot reproduce this on master on my aarch64-darwin machine. Can you run your command with --show-trace to get a longer stack trace?

@Patryk27
Copy link
Member

Patryk27 commented Jul 13, 2023

I've got failures as well, in my case on simavr (aarch64-darwin):

nix shell nixpkgs/master#simavr

... and with trace:

error:
       … while evaluating the attribute 'buildInputs' of the derivation 'simavr-1.7'

       at /nix/store/yyjyms4dzwx3jpibmzil865sqz6l70s4-source/pkgs/stdenv/generic/make-derivation.nix:303:7:

          302|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          303|       name =
             |       ^
          304|         let

       … while evaluating the attribute 'buildInputs' of the derivation 'freeglut-3.4.0'

       at /nix/store/yyjyms4dzwx3jpibmzil865sqz6l70s4-source/pkgs/stdenv/generic/make-derivation.nix:303:7:

          302|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          303|       name =
             |       ^
          304|         let

       … while evaluating the attribute 'buildCommand' of the derivation 'libGL-23.1.3'

       at /nix/store/yyjyms4dzwx3jpibmzil865sqz6l70s4-source/pkgs/stdenv/generic/make-derivation.nix:303:7:

          302|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          303|       name =
             |       ^
          304|         let

       … while evaluating the attribute 'handled'

       at /nix/store/yyjyms4dzwx3jpibmzil865sqz6l70s4-source/pkgs/stdenv/generic/check-meta.nix:447:7:

          446|       # or, alternatively, just output a warning message.
          447|       handled =
             |       ^
          448|         {

       … while evaluating the attribute 'no'

       at /nix/store/yyjyms4dzwx3jpibmzil865sqz6l70s4-source/pkgs/stdenv/generic/check-meta.nix:449:11:

          448|         {
          449|           no = handleEvalIssue { inherit meta attrs; } { inherit (validity) reason errormsg; };
             |           ^
          450|           warn = handleEvalWarning { inherit meta attrs; } { inherit (validity) reason errormsg; };

       … while evaluating call site

       at /nix/store/yyjyms4dzwx3jpibmzil865sqz6l70s4-source/pkgs/stdenv/generic/check-meta.nix:449:16:

          448|         {
          449|           no = handleEvalIssue { inherit meta attrs; } { inherit (validity) reason errormsg; };
             |                ^
          450|           warn = handleEvalWarning { inherit meta attrs; } { inherit (validity) reason errormsg; };

       … while calling 'handleEvalIssue'

       at /nix/store/yyjyms4dzwx3jpibmzil865sqz6l70s4-source/pkgs/stdenv/generic/check-meta.nix:226:38:

          225|
          226|   handleEvalIssue = { meta, attrs }: { reason , errormsg ? "" }:
             |                                      ^
          227|     let

       error: Package ‘mesa-23.1.3’ in /nix/store/yyjyms4dzwx3jpibmzil865sqz6l70s4-source/pkgs/development/libraries/mesa/default.nix:361 is marked as broken, refusing to evaluate.

       a) To temporarily allow broken packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_BROKEN=1

        Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
        (Flake) command, `--impure` must be passed in order to read this
        environment variable.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowBroken = true; }
       in configuration.nix to override this.

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix.

@tjni
Copy link
Contributor

tjni commented Jul 13, 2023

Looks like fallout related to #233265, from which I gather that mesa is broken upstream on macOS.

The simavr derivation depends on libGL as well as freeglut and libGLU, which depend on libGL (based on mesa). If we can think of a way to build it on macOS without these dependencies, we can update the derivation.

@dscottboggs
Copy link
Contributor Author

error:
       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'shell'
         whose name attribute is located at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'buildInputs' of derivation 'shell'

         at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:350:7:

          349|       depsHostHost                = lib.elemAt (lib.elemAt dependencies 1) 0;
          350|       buildInputs                 = lib.elemAt (lib.elemAt dependencies 1) 1;
             |       ^
          351|       depsTargetTarget            = lib.elemAt (lib.elemAt dependencies 2) 0;

       … while evaluating derivation 'xquartz-21.1.8'
         whose name attribute is located at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'installPhase' of derivation 'xquartz-21.1.8'

         at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/servers/x11/xquartz/default.nix:106:3:

          105|
          106|   installPhase = ''
             |   ^
          107|     cp -rT ${xorg.xinit} $out

       … while evaluating derivation 'xinit-1.4.2'
         whose name attribute is located at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'configureFlags' of derivation 'xinit-1.4.2'

         at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:361:7:

          360|       # This parameter is sometimes a string, sometimes null, and sometimes a list, yuck
          361|       configureFlags = let inherit (lib) optional elem; in
             |       ^
          362|         configureFlags

       … while evaluating derivation 'xorg-server-21.1.8'
         whose name attribute is located at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'postInstall' of derivation 'xorg-server-21.1.8'

         at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/servers/x11/xorg/overrides.nix:800:9:

          799|         '';
          800|         postInstall = ''
             |         ^
          801|           rm -fr $out/share/X11/xkb/compiled

       … while evaluating derivation 'xorg-server-21.1.8'
         whose name attribute is located at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'propagatedBuildInputs' of derivation 'xorg-server-21.1.8'

         at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:357:7:

          356|       depsHostHostPropagated      = lib.elemAt (lib.elemAt propagatedDependencies 1) 0;
          357|       propagatedBuildInputs       = lib.elemAt (lib.elemAt propagatedDependencies 1) 1;
             |       ^
          358|       depsTargetTargetPropagated  = lib.elemAt (lib.elemAt propagatedDependencies 2) 0;

       … while evaluating derivation 'libGL-23.1.3'
         whose name attribute is located at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'buildCommand' of derivation 'libGL-23.1.3'

         at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/development/libraries/mesa/stubs.nix:17:3:

           16|   # the X extensions to OpenGL.
           17|   buildCommand = if stdenv.hostPlatform.isDarwin then ''
             |   ^
           18|     mkdir -p $out/nix-support $dev

       … from call site

         at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/check-meta.nix:449:16:

          448|         {
          449|           no = handleEvalIssue { inherit meta attrs; } { inherit (validity) reason errormsg; };
             |                ^
          450|           warn = handleEvalWarning { inherit meta attrs; } { inherit (validity) reason errormsg; };

       … while calling 'handleEvalIssue'

         at /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/stdenv/generic/check-meta.nix:226:38:

          225|
          226|   handleEvalIssue = { meta, attrs }: { reason , errormsg ? "" }:
             |                                      ^
          227|     let

       error: Package ‘mesa-23.1.3’ in /nix/store/d0vrhisgss9grsvmiqs9z9mn5vv6gz1r-nixpkgs/nixpkgs/pkgs/development/libraries/mesa/default.nix:361 is marked as broken, refusing to evaluate.

       a) To temporarily allow broken packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_BROKEN=1

        Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
        (Flake) command, `--impure` must be passed in order to read this
        environment variable.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowBroken = true; }
       in configuration.nix to override this.

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix.

@katexochen katexochen added the 6.topic: darwin Running or building packages on Darwin label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

No branches or pull requests

4 participants