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

Fix nixUnstable cross compilation #107909

Closed
wants to merge 2 commits into from

Conversation

matthewbauer
Copy link
Member

Motivation for this change
  • Bump nixUnstable to latest
  • Fix cross compilation by disabling documentation generation.
Things done
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions

Unfortuantely, nix 2.4+ relies on running the built nix executable to
generate documentation. We can’t do that when cross-compiling, so we
need to skip that step for now. In the future, an emulator could be
used to run the built Nix binary.

Fixes NixOS#106415
@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 107909 run on x86_64-darwin 1

5 packages failed to build:
  • disnix
  • dydisnix
  • nix-update
  • nixFlakes (nixUnstable)
  • nixpkgs-review

builder for '/nix/store/9yirjf9c1hnihy53kjlr85x3igz5rhi3-nix-2.4pre20201228_abbf9df.drv' failed with exit code 2; last 10 log lines:

  • '[' /private/tmp/nix-build-nix-2.4pre20201228_abbf9df.drv-0/nix-test/user-envs/store/7yv2aa65r6riifjs17a3v33j4mwc7wmi-user-environment = /private/tmp/nix-build-nix-2.4pre20201228_abbf9df.drv-0/nix-test/user-envs/store/7yv2aa65r6riifjs17a3v33j4mwc7wmi-user-environment ']'
  • nix-env -i /private/tmp/nix-build-nix-2.4pre20201228_abbf9df.drv-0/nix-test/user-envs/store/7s318sd6cn6bxl4c9jcjzgjfmj0p4dhn-foo-1.0
    installing 'foo-1.0'
    error: --- EndOfFile --- nix-env
    unexpected EOF reading a line
    make: *** [mk/lib.mk:110: tests/user-envs.sh.test] Error 1
    make: *** Waiting for unfinished jobs....
    ran test tests/gc-runtime.sh... [PASS]
    ran test tests/lang.sh... [PASS]
    ran test tests/fixed.sh... [PASS]

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Dec 29, 2020

Result of nixpkgs-review pr 107909 run on x86_64-linux 1

1 package failed to build:
  • hydra-unstable
6 packages built:
  • disnix
  • disnixos
  • dydisnix
  • nix-update
  • nixFlakes (nixUnstable)
  • nixpkgs-review

hydra-unstable

                 from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/eval.hh:3,
                 from hydra-eval-jobs.cc:7:
/nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/value.hh:189:22: note: declared here
  189 |     inline ValueType type() const
      |                      ^~~~
hydra-eval-jobs.cc: In function 'void worker(nix::EvalState&, nix::Bindings&, nix::AutoCloseFD&, nix::AutoCloseFD&)':
hydra-eval-jobs.cc:204:37: error: invalid use of non-static member function 'nix::ValueType nix::Value::type() const'
  204 |                         if (v->type == tString)
      |                             ~~~~~~~~^~~~~~~~~~
In file included from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/nixexpr.hh:3,
                 from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/attr-set.hh:3,
                 from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/eval.hh:3,
                 from hydra-eval-jobs.cc:7:
/nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/value.hh:189:22: note: declared here
  189 |     inline ValueType type() const
      |                      ^~~~
hydra-eval-jobs.cc:227:30: error: invalid use of non-static member function 'nix::ValueType nix::Value::type() const'
  227 |             else if (v->type == tAttrs) {
      |                      ~~~~~~~~^~~~~~~~~
In file included from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/nixexpr.hh:3,
                 from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/attr-set.hh:3,
                 from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/eval.hh:3,
                 from hydra-eval-jobs.cc:7:
/nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/value.hh:189:22: note: declared here
  189 |     inline ValueType type() const
      |                      ^~~~
hydra-eval-jobs.cc:241:30: error: invalid use of non-static member function 'nix::ValueType nix::Value::type() const'
  241 |             else if (v->type == tNull)
      |                      ~~~~~~~~^~~~~~~~
In file included from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/nixexpr.hh:3,
                 from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/attr-set.hh:3,
                 from /nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/eval.hh:3,
                 from hydra-eval-jobs.cc:7:
/nix/store/w3lgsr3mnz7pnk458a08w2skraybfa94-nix-2.4pre20201228_abbf9df-dev/include/nix/value.hh:189:22: note: declared here
  189 |     inline ValueType type() const
      |                      ^~~~
make[3]: *** [Makefile:440: hydra_eval_jobs-hydra-eval-jobs.o] Error 1
make[3]: Leaving directory '/build/source/src/hydra-eval-jobs'
make[2]: *** [Makefile:360: all-recursive] Error 1
make[2]: Leaving directory '/build/source/src'
make[1]: *** [Makefile:416: all-recursive] Error 1
make[1]: Leaving directory '/build/source'
make: *** [Makefile:346: all] Error 2

matthewbauer added a commit to matthewbauer/hydra that referenced this pull request Dec 29, 2020
This updates hydra to be compatible with Nix NixOS/nix#4355.

Along with NixOS#840 needed for NixOS/nixpkgs#107909

/cc @edolstra
@matthewbauer
Copy link
Member Author

That looks x86_64-darwin issue looks like NixOS/nix#3605. I don't think it's gotten worse with this update.

Hydra will need NixOS/hydra#843 and NixOS/hydra#840 to be merged.

@SuperSandro2000
Copy link
Member

We should think about adding strictDeps = true; from #107163.

@alyssais
Copy link
Member

Documentation disable was disabled for cross in #125772, and Nix has been updated well past what this PR does by now, so I think we can close this.

@alyssais alyssais closed this Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants