GithubHelp home page GithubHelp logo

ghc-artefact-nix's People

Contributors

bgamari avatar mpickering avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ghc-artefact-nix's Issues

Semantics of nix run changed in nix 2.4+

The README says:

One simple way to use it is:

nix run -f https://github.com/mpickering/ghc-artefact-nix/archive/master.tar.gz ghcHEAD

This will enter a shell where the most up to date artefact built for the master branch is available to use.

This doesn't enter a shell anymore. Instead it calls the respective executable, so the command above will produce:

ghc: no input files
Usage: For basic information, try the `--help' option.

Whereas:

❯ nix run -f https://github.com/mpickering/ghc-artefact-nix/archive/master.tar.gz ghcHEAD -- --version
The Glorious Glasgow Haskell Compilation System, version 9.3.20220130

This is with

❯ nix --version
nix (Nix) 2.6.0pre20211217_6e6e998

but I also tried recent releases, and both 2.4 and 2.5 suffer from it. OTOH 2.3 works as currently described.

Unable to download macOS artefacts

nix run -f https://github.com/mpickering/ghc-artefact-nix/archive/master.tar.gz ghcHEAD

warning: unable to download 'https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-apple-darwin.tar.xz?job=validate-x86_64-darwin': HTTP error 404; using cached result

Fetching GHC HEAD: unable to download

Following the README, I try

~/build/haskell/ghc $ nix run -f https://github.com/mpickering/ghc-artefact-nix/archive/master.tar.gz ghcHEAD
[0.0 MiB DL]
error: unable to download 'https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-fedora27-linux.tar.xz?job=validate-x86_64-linux-fedora27': HTTP error 404
(use '--show-trace' to show detailed location information)

but it fails. Is this a bug, or a transient, expected failure? If the latter, maybe point that out in the README, including possible ways to work-around that, and get a recentish GHC.

Add GHC 9.6.1 alpha1

I've tried adding it myself to releases.nix like this:

{  ghc_9_6_1_alpha1 = fromBindist {
    url = "${downloads}/9.6.1-alpha1/ghc-9.6.0.20230111-x86_64-fedora33-linux.tar.xz";
    sha256 = "sha256-bc+2Q2oPTe7eTJoaaVkE4w67A3XKvOzUp4DxDKlPYwI=";
  };
}

But this complains about wrong GLIBC versions on NixOS 21.11:

$ nix run -f releases.nix ghc_9_6_1_alpha1 --extra-experimental-features nix-command
error: builder for '/nix/store/8fr0flad6x6949pfm0pqbafbvaq22vp7-ghc-9.6.0.20230111.drv' failed with exit code 2;
       last 10 log lines:
       > chmod 644 '/nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/lib/package.conf.d/filepath-1.4.100.0.conf'
       > '/nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/ghc-pkg' --global-package-db "/nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/lib/package.conf.d" recache
       > /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/ghc-pkg: /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libm.so.6: version `GLIBC_2.29' not found (required by /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/../lib/x86_64-linux-ghc-9.6.0.20230111/libHSbytestring-0.11.3.1-ghc9.6.0.20230111.so)
       > /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/ghc-pkg: /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libm.so.6: version `GLIBC_2.29' not found (required by /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/../lib/x86_64-linux-ghc-9.6.0.20230111/libHStemplate-haskell-2.19.0.0-ghc9.6.0.20230111.so)
       > /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/ghc-pkg: /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libc.so.6: version `GLIBC_2.28' not found (required by /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/../lib/x86_64-linux-ghc-9.6.0.20230111/libHSbase-4.18.0.0-ghc9.6.0.20230111.so)
       > /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/ghc-pkg: /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libm.so.6: version `GLIBC_2.29' not found (required by /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/../lib/x86_64-linux-ghc-9.6.0.20230111/libHSbase-4.18.0.0-ghc9.6.0.20230111.so)
       > /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/ghc-pkg: /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libm.so.6: version `GLIBC_2.29' not found (required by /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/../lib/x86_64-linux-ghc-9.6.0.20230111/libHSghc-prim-0.10.0-ghc9.6.0.20230111.so)
       > /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/ghc-pkg: /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/../lib/x86_64-linux-ghc-9.6.0.20230111/libHSrts-1.0.2-ghc9.6.0.20230111.so)
       > /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/ghc-pkg: /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libm.so.6: version `GLIBC_2.29' not found (required by /nix/store/q2f7a0kxmarxrsgr4f59w2gw8zzk3h6m-ghc-9.6.0.20230111/lib/ghc-9.6.0.20230111/bin/../lib/x86_64-linux-ghc-9.6.0.20230111/libHSrts-1.0.2-ghc9.6.0.20230111.so)
       > make: *** [Makefile:228: update_package_db] Error 1
       For full logs, run 'nix log /nix/store/8fr0flad6x6949pfm0pqbafbvaq22vp7-ghc-9.6.0.20230111.drv'.

I've also tried the deb10 and deb11 bindists, but all fail with a similar error message.

Executable linking is broken

@mpickering and I were discussing this on IRC: It seems that 633c6d7 is not sufficient to fix executable linking; there is still a dependency on libtinfo sneaking in somehow. I suspect this is via the package database.

ghc.bash is not a Mach-O file

Following the instructions in the readme to use ghc-artefact-nix bare to get ghc/master fails on x86_64-darwin with ghc.bash is not a Mach-O file:

> git clone https://github.com/mpickering/ghc-artefact-nix.git
Cloning into 'ghc-artefact-nix'...
remote: Enumerating objects: 119, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 119 (delta 13), reused 15 (delta 7), pack-reused 91
Receiving objects: 100% (119/119), 26.16 KiB | 1.74 MiB/s, done.
Resolving deltas: 100% (61/61), done.
> cd ghc-artefact-nix/
> ./ghc-head-from.sh
Fetching artefact from ghc/master
error: builder for '/nix/store/hz4rmdlaxwdbqvq7c4bb3plms461bb3j-ghc-9.5.20220716.drv' failed with exit code 1;
       last 4 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/aphdkqdml3q05adg0g671jfjsm518rhy-ghc-x86_64-darwin-validate.tar.xz?job=x86_64-darwin-validate
       > source root is ghc-9.5.20220716-x86_64-apple-darwin
       > error: install_name_tool: input file: ./ghc-9.5.20220716-x86_64-apple-darwin/completion/ghc.bash is not a Mach-O file
       For full logs, run 'nix log /nix/store/hz4rmdlaxwdbqvq7c4bb3plms461bb3j-ghc-9.5.20220716.drv'.
> nix --version
nix (Nix) 2.4
> nix log /nix/store/hz4rmdlaxwdbqvq7c4bb3plms461bb3j-ghc-9.5.20220716.drv
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/aphdkqdml3q05adg0g671jfjsm518rhy-ghc-x86_64-darwin-validate.tar.xz?job=x86_64-darwin-validate
source root is ghc-9.5.20220716-x86_64-apple-darwin
error: install_name_tool: input file: ./ghc-9.5.20220716-x86_64-apple-darwin/completion/ghc.bash is not a Mach-O file
> sw_vers
ProductName:	macOS
ProductVersion:	11.6.7
BuildVersion:	20G630

Failed to build with `nixpkgs-unstable`

I'm using the derivation from this repository in another Nix shell derivation as:

{
   pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-20.03.tar.gz) {}
,  ghcHeadOl ? import (fetchTarball https://github.com/mpickering/ghc-artefact-nix/archive/master.tar.gz) {}
,  ghc ? ghcHeadOl.ghcHEAD
}:

with pkgs;

stdenv.mkDerivation {
  name = "ghcenv";

  buildInputs = [ ghc cabal-install ghcid ];
}

If I point my <nixpkgs> to nixpkgs-unstable or change np = import <nixpkgs> {}; to np = import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz) {}; in ghc-artefact-nix/default.nix, the above Nix shell derivation fails with:

error: anonymous function at ghc-artefact-nix/artifact.nix:1:1
called without required argument 'llvm_39', 
at /nix/store/dyca73pcc7d9zmmdnrcf35ycjg1gl4x6-source/lib/customisation.nix:69:16

I've fixed it by applying this patch to ghc-artefact-nix/default.nix:

   np = import <nixpkgs> {};
-  ghc = self: ref: self.callPackage ./artifact.nix { } ref; 
+  ghc = self: ref: self.callPackage ./artifact.nix { inherit (np.llvm_39) llvm_39; } ref; 

I'm not making a pull request because this was a result of lot Googling and I don't fully understand what's going on here. It's working for me now but do you think ghc-artefact-nix/default.nix needs to be patched?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.