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

gettext: fix stdenv-darwin; remove Bison dependency #59553

Merged
merged 1 commit into from Apr 15, 2019

Conversation

strager
Copy link
Contributor

@strager strager commented Apr 15, 2019

Motivation for this change

Commit 1279016 broke building nixpkgs.clangStdenv (stdenv-darwin) on macOS:

nix-build -A clangStdenv .
these derivations will be built:
  /nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv
building '/nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv'...
output '/nix/store/3agkxvkbhfpimnx5imr09q4rq9pxmjda-stdenv-darwin' is not allowed to refer to the following paths:
     /nix/store/jnzhx3hni0ds1wf49z8wfnxi3qdnkk6q-gnum4-1.4.18
       /nix/store/smdncnz5pkl5q39k4ldk8bh84p2hmj19-bison-3.3.2
error: build of '/nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv' failed

Remove gettext's build dependency on Bison to avoid this error, fixing Nixpkgs on macOS. This fixes issue #59450.

To avoid rebuilding everything unnecessarily on Linux, only apply these changes to macOS and keep the Bison dependency for Linux.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Commit 1279016 broke building
nixpkgs.clangStdenv (stdenv-darwin) on macOS:

    nix-build -A clangStdenv .
    these derivations will be built:
      /nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv
    building '/nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv'...
    output '/nix/store/3agkxvkbhfpimnx5imr09q4rq9pxmjda-stdenv-darwin' is not allowed to refer to the following paths:
         /nix/store/jnzhx3hni0ds1wf49z8wfnxi3qdnkk6q-gnum4-1.4.18
           /nix/store/smdncnz5pkl5q39k4ldk8bh84p2hmj19-bison-3.3.2
    error: build of '/nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv' failed

Remove gettext's build dependency on Bison to avoid this error, fixing
Nixpkgs on macOS.

To avoid rebuilding everything unnecessarily on Linux, only apply these
changes to macOS and keep the Bison dependency for Linux.
@veprbl veprbl merged commit 6ccf220 into NixOS:master Apr 15, 2019
@veprbl
Copy link
Member

veprbl commented Apr 15, 2019

@strager Thank you!

@veprbl veprbl added the 9.needs: port to stable A PR needs a backport to the stable release. label Apr 15, 2019
veprbl pushed a commit that referenced this pull request Apr 15, 2019
Commit 1279016 broke building
nixpkgs.clangStdenv (stdenv-darwin) on macOS:

    nix-build -A clangStdenv .
    these derivations will be built:
      /nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv
    building '/nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv'...
    output '/nix/store/3agkxvkbhfpimnx5imr09q4rq9pxmjda-stdenv-darwin' is not allowed to refer to the following paths:
         /nix/store/jnzhx3hni0ds1wf49z8wfnxi3qdnkk6q-gnum4-1.4.18
           /nix/store/smdncnz5pkl5q39k4ldk8bh84p2hmj19-bison-3.3.2
    error: build of '/nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv' failed

Remove gettext's build dependency on Bison to avoid this error, fixing
Nixpkgs on macOS.

To avoid rebuilding everything unnecessarily on Linux, only apply these
changes to macOS and keep the Bison dependency for Linux.

(cherry picked from commit 6ccf220)

cc #59553 #59525
@veprbl veprbl added 8.has: port to stable A PR already has a backport to the stable release. and removed 9.needs: port to stable A PR needs a backport to the stable release. labels Apr 15, 2019
@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/virtualbox-darwin/2681/6

@strager strager deleted the gettext-59450 branch April 18, 2019 16:34
@lopsided98
Copy link
Contributor

This broke the cross build, because the optional messes with nativeBuildInputs (due to some splicing magic I don't understand) and causes the host's bison to be used. I think we need to use buildPackages.bison.

@lopsided98
Copy link
Contributor

The problem is actually that optional is used with a list argument. optional should only be used with a single item.

@lopsided98 lopsided98 mentioned this pull request Apr 23, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants