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 GHCJS 8.4/8.2 in sandboxed builds #41411

Merged
merged 1 commit into from Jun 3, 2018

Conversation

ElvishJerricco
Copy link
Contributor

Motivation for this change

cabal previously tried to contact hackage.haskell.org, which it definitely does not need to do. Instead we create a nearly empty .cabal/config file.

As a side benefit, we also get to fix cabal looking for gcc when it should be using $CC

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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

@GrahamcOfBorg build haskell.compiler.ghcjs

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: haskell.compiler.ghcjs

Partial log (click to expand)


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

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


@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: haskell.compiler.ghcjs

Partial log (click to expand)

builder for '/nix/store/bqfh84zj0bbd0kcz3ln4yvfrpvz66d6v-configured-ghcjs-src.drv' failed with exit code 1
cannot build derivation '/nix/store/jqdwpn6qgl4kygp80y0hlmijzr7fzvrr-haddock-library-ghcjs-1.4.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/flq9kxci9wqgphxcm2jymm60qd2dh340-template-haskell-ghcjs-2.12.0.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/b2j99ziz98cx2jpimndwrgz6nshlv70w-ghci-ghcjs-8.2.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/zwf37qwj0yi73r2l5qi6haz3rkh26zww-ghc-api-ghcjs-8.2.2.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/0cs30mkj6pz4v2bwbihnrzhc2kf48zss-ghcjs-th-0.1.0.0.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/5b4ylzsbvj0pxcxr8f872yig2w5v4109-haddock-api-ghcjs-2.18.1.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/z4xyyn39bmkfk0icsiw7jc188ws2g37m-ghcjs-8.2.0.1.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/cjhaxwx2ccqrasq3waa44plibnhp5mxy-ghcjs-8.2.0.1.drv': 2 dependencies couldn't be built
error: build of '/nix/store/cjhaxwx2ccqrasq3waa44plibnhp5mxy-ghcjs-8.2.0.1.drv' failed

@ElvishJerricco
Copy link
Contributor Author

Huh. I could have swore that cabal.config thing was going to work. Hadn't tested it because ghc842 doesn't seem to be cached. I'll go back to just having gcc in the build rather than abusing the config file until a better solution presents itself

@ElvishJerricco
Copy link
Contributor Author

There, that should fix darwin (again, untested since ghc842 is not cached)

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

@GrahamcOfBorg build haskell.compiler.ghcjs

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: haskell.compiler.ghcjs

Partial log (click to expand)

Cannot nix-instantiate `haskell.compiler.ghcjs' because:
error: while evaluating the attribute 'ghcjs82' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/pkgs/top-level/haskell-packages.nix:97:5:
while evaluating 'callPackageWith' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/customisation.nix:113:35, called from /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/pkgs/top-level/haskell-packages.nix:97:15:
while evaluating 'makeOverridable' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/customisation.nix:72:24, called from /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/lib/customisation.nix:117:8:
undefined variable 'gcc' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/pkgs/development/compilers/ghcjs-ng/default.nix:70:7

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: haskell.compiler.ghcjs

Partial log (click to expand)

Cannot nix-instantiate `haskell.compiler.ghcjs' because:
error: while evaluating the attribute 'ghcjs82' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/top-level/haskell-packages.nix:97:5:
while evaluating 'callPackageWith' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:113:35, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/top-level/haskell-packages.nix:97:15:
while evaluating 'makeOverridable' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:72:24, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:117:8:
undefined variable 'gcc' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/compilers/ghcjs-ng/default.nix:70:7

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

gcc needs to be added as an argument again...

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: haskell.compiler.ghcjs

Partial log (click to expand)

patching script interpreter paths in /nix/store/4lrssfqng071589zf43gq6ligr9mqfk3-ghcjs-8.2.0.1-data
checking for references to /build in /nix/store/4lrssfqng071589zf43gq6ligr9mqfk3-ghcjs-8.2.0.1-data...
building '/nix/store/r68rwhsyf30k0pj4256crajn1d8niw3p-ghcjs-8.2.0.1.drv'...
unpacking sources
unpacking source archive /nix/store/ryrzdq9h920v6955vzw6664cinkakwql-configured-ghcjs-src
source root is configured-ghcjs-src
building
/nix/store/b3fh3zb6jn9p6y54kzcg8ypaddghx2lg-ghcjs-8.2.0.1/bin: No such file or directory
builder for '/nix/store/r68rwhsyf30k0pj4256crajn1d8niw3p-ghcjs-8.2.0.1.drv' failed with exit code 1
error: build of '/nix/store/r68rwhsyf30k0pj4256crajn1d8niw3p-ghcjs-8.2.0.1.drv' failed

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: haskell.compiler.ghcjs

Partial log (click to expand)

Cannot nix-instantiate `haskell.compiler.ghcjs' because:
error: while evaluating the attribute 'ghcjs82' at /var/lib/gc-of-borg/nix-test-rs-17/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-17/pkgs/top-level/haskell-packages.nix:97:5:
while evaluating 'callPackageWith' at /var/lib/gc-of-borg/nix-test-rs-17/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-17/lib/customisation.nix:113:35, called from /var/lib/gc-of-borg/nix-test-rs-17/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-17/pkgs/top-level/haskell-packages.nix:97:15:
while evaluating 'makeOverridable' at /var/lib/gc-of-borg/nix-test-rs-17/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-17/lib/customisation.nix:72:24, called from /var/lib/gc-of-borg/nix-test-rs-17/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-17/lib/customisation.nix:117:8:
undefined variable 'gcc' at /var/lib/gc-of-borg/nix-test-rs-17/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-17/pkgs/development/compilers/ghcjs-ng/default.nix:70:7

@ElvishJerricco
Copy link
Contributor Author

Crap, sorry. Should work now.

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

@GrahamcOfBorg build haskell.compiler.ghcjs

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: haskell.compiler.ghcjs

Partial log (click to expand)


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

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


@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: haskell.compiler.ghcjs

Partial log (click to expand)

patching script interpreter paths in /nix/store/1pschzzx5n70dhsv8a27i1b80xq52l91-ghcjs-8.2.0.1-data
checking for references to /build in /nix/store/1pschzzx5n70dhsv8a27i1b80xq52l91-ghcjs-8.2.0.1-data...
building '/nix/store/pdjcail1rc3vcvjpghivcp206sqkhd6r-ghcjs-8.2.0.1.drv'...
unpacking sources
unpacking source archive /nix/store/xq9lhh7rgsnnaagqb8whdfswdzax96pn-configured-ghcjs-src
source root is configured-ghcjs-src
building
/nix/store/81s6y9ja92h9gx0rshnabmw4krgk03c6-ghcjs-8.2.0.1/bin: No such file or directory
builder for '/nix/store/pdjcail1rc3vcvjpghivcp206sqkhd6r-ghcjs-8.2.0.1.drv' failed with exit code 1
error: build of '/nix/store/pdjcail1rc3vcvjpghivcp206sqkhd6r-ghcjs-8.2.0.1.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: haskell.compiler.ghcjs

Partial log (click to expand)

installing
Installing library in /nix/store/jdzn6msni4mnv04m3ldivfbqw9g73qg6-ghc-api-ghcjs-8.2.2/lib/ghc-8.2.2/ghc-api-ghcjs-8.2.2
post-installation fixup
strip is /nix/store/yyak5sjv68n9vdgnkd2cb5djk1l9sqj5-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/jdzn6msni4mnv04m3ldivfbqw9g73qg6-ghc-api-ghcjs-8.2.2/lib
building of '/nix/store/amip5rqcnqq2852injic117j8w3qilbw-ghc-api-ghcjs-8.2.2.drv' timed out after 1800 seconds
cannot build derivation '/nix/store/gkq8bxrqcdxq5gnqg44g9l4q2l1w9q00-haddock-api-ghcjs-2.18.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/piym2dhnpnag1k6wzwa97gbpjmj8i7dw-ghcjs-8.2.0.1.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/3iq5cnjhsv1d83afq9daq34h0g72pv4w-ghcjs-8.2.0.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/3iq5cnjhsv1d83afq9daq34h0g72pv4w-ghcjs-8.2.0.1.drv' failed

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

I understand the timeout on darwin, but the x86_64-linux failure looks like a bug.

@ElvishJerricco
Copy link
Contributor Author

Huh. The libexec dir got changed on me. Fixed now.

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

@GrahamcOfBorg build haskell.compiler.ghcjs

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: haskell.compiler.ghcjs

Partial log (click to expand)

   ghc             -         /nix/store/6qd7z9w1hi1885almynw4088n8v0xii9-ghc-8.2.2/bin/ghc
   ghc-pkg         -         /nix/store/6qd7z9w1hi1885almynw4088n8v0xii9-ghc-8.2.2/bin/ghc-pkg
   cabal           2.2.0.0   /nix/store/vpx09z06x7v03kv0xn0h8si08655zi8s-cabal-install-2.2.0.0/bin/cabal
   node            v8.11.2   /nix/store/r5bjzib4gwnkpi4a2cr4r54imznwvxrq-nodejs-8.11.2/bin/node
   haddock-ghcjs   -         /nix/store/ln9cv6ahnxgsx9fwvmi35c6cdawk1fzk-ghcjs-8.2.0.1/bin/haddock-ghcjs
   npm             -         /nix/store/r5bjzib4gwnkpi4a2cr4r54imznwvxrq-nodejs-8.11.2/bin/npm


/build/configured-ghcjs-src/lib/boot$ writing /nix/store/ln9cv6ahnxgsx9fwvmi35c6cdawk1fzk-ghcjs-8.2.0.1/libexec/ghcjs_boot.completed
/nix/store/ln9cv6ahnxgsx9fwvmi35c6cdawk1fzk-ghcjs-8.2.0.1

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: haskell.compiler.ghcjs

Partial log (click to expand)

    |
371 | #define GET_LARGE_BITMAP(info) ((StgLargeBitmap*) (((StgWord) ((info)+1)) \
    |                                 ^
#define GET_LARGE_BITMAP(info) ((StgLargeBitmap*) (((StgWord) ((info)+1)) \
                                ^
building of '/nix/store/amip5rqcnqq2852injic117j8w3qilbw-ghc-api-ghcjs-8.2.2.drv' timed out after 1800 seconds
cannot build derivation '/nix/store/gkq8bxrqcdxq5gnqg44g9l4q2l1w9q00-haddock-api-ghcjs-2.18.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/piym2dhnpnag1k6wzwa97gbpjmj8i7dw-ghcjs-8.2.0.1.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/xnck5gmwfhd5w6cplhahnllx9ayh8xb7-ghcjs-8.2.0.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/xnck5gmwfhd5w6cplhahnllx9ayh8xb7-ghcjs-8.2.0.1.drv' failed

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

Can't do much about the timeout, so let's merge and watch it on Hydra.

@xeji xeji merged commit ea52ca6 into NixOS:master Jun 3, 2018
@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: haskell.compiler.ghcjs

Partial log (click to expand)


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

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


orivej added a commit that referenced this pull request Jun 4, 2018
* master: (26 commits)
  python.pkgs.cairocffi: update tests for Cairo 1.15.12
  python.pkgs.cairocffi: 0.8.0 -> 0.8.1
  freecell-solver: fix build
  perlPackages.CPANPLUS: restore build inputs removed in #41394
  Fix GHCJS 8.4/8.2 in sandboxed builds (#41411)
  dockerTools.pullImage: expose image* attributes (#41366)
  rust: disable tests on darwin
  python.pkgs.detox: 0.11 -> 0.12
  certbot: disable check on darwin
  freeimage: fix build with glibc 2.27
  shadowsocks-libev: supports darwin (#41421)
  pythonPackages.jira: fix build (#41419)
  SDL: propagate libiconv
  schema2ldif: Init at 1.3
  nixos/exim: Add unit restart trigger (#41418)
  Add myself as maintainer for dnsdist
  Add myself as maintainer
  synapse-bt: init at 2018-06-04 (#41402)
  skim: 0.3.2 -> 0.4.0 (#41417)
  ctags: fix source url (#41382)
  ...
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