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

pkgsStatic build fail: [genericBuild: command not found] #61486

Closed
clojurians-org opened this issue May 14, 2019 · 2 comments
Closed

pkgsStatic build fail: [genericBuild: command not found] #61486

clojurians-org opened this issue May 14, 2019 · 2 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: haskell

Comments

@clojurians-org
Copy link

i build a simple project to genrate static build result. but it fail finally.
i attach the related default.nix fater error log.

[larluo@nixos-larluo:~/my-work/haskell-example/minio-migration]$ nix-build -v
evaluating file '/nix/store/1abiamlr7gi8fsn779s5hasaha6zbbqw-nixpkgs-19.09pre178281.76fad451105/nixpkgs/pkgs/build-support/remove-references-to/default.nix'
building '/nix/store/6anma9b7ijv71frhkq5v90dfyhfwbw2s-gnum4-1.4.18.drv'...
building '/nix/store/c06qzwyjdpi8msmh54rrs0f1ydphhh2n-perl-5.28.2.drv'...
/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh: line 2: genericBuild: command not found
/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh: line 2: genericBuild: command not found
builder for '/nix/store/6anma9b7ijv71frhkq5v90dfyhfwbw2s-gnum4-1.4.18.drv' failed with exit code 127
builder for '/nix/store/c06qzwyjdpi8msmh54rrs0f1ydphhh2n-perl-5.28.2.drv' failed with exit code 127
cannot build derivation '/nix/store/5g4zvi1zd39s6xs7ks5qhc2mq13xwbmx-autoconf-2.69.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/zxznhjhfgzqmgr497r2fda9vir957h8x-autoconf-2.69.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/zdf0bx503cvsyx7k1kk38ncq78brpiy9-automake-1.15.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/j9p1647irvgm9bxdijmjxgxvx7sn00r0-automake-1.16.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/sjhbfwbzxyqymsq5ph7znqkw6qr2lsiy-bison-3.3.2.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/4ncxx9qimla70jkmbzhbyi8cba3vdvvv-coreutils-8.31.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/50d3sjh4wlpsrg6jffl2jbs7q9crpipg-gcc-7.4.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/pbylqqrmsf942xy3074issaas7lb85ml-gnugrep-3.3.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/qzkplmilabs8x8n6lhiym8dwi25mdqsb-gnused-4.7.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/g3yfxyzlhpkbbcs3c3kav3df0hid6m8c-libtool-2.4.6.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/d03mzzhx1i4i17yaj7l41853nijgrqa5-linux-headers-4.19.16.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/07y0kw0af981bic78fm7wfgj1zkl4bv5-texinfo-6.5.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ij4l8c0g7i27kmz1h6ww81643j5nrj4h-bash-4.4-p23.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/kblymdwjqsx2v1jvbxafi03hm58i8rl0-cabal2nix-2.14.2.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/65vy2bkn9qsdqdmkzwimfy8y6ld96lfm-stdenv-linux.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/pbkx5j0dq23ib0hwxij1sjrkszycn961-cabal2nix-minio-migration.drv': 1 dependencies couldn't be built
error: build of '/nix/store/pbkx5j0dq23ib0hwxij1sjrkszycn961-cabal2nix-minio-migration.drv' failed
# { pkgs ? (import (builtins.fetchTarball {url="https://github.com/NixOS/nixpkgs/archive/88ae8f7d.tar.gz";}) {}).pkgsMusl} :
{ pkgs ? (import <nixpkgs> {}).pkgsMusl } :

with pkgs;
let
  haskellPackages = pkgs.haskellPackages.override {
    overrides = self: super: with pkgs.haskell.lib; {
    } ;
  } ;
  pkg = haskellPackages.developPackage {
    root = ./.;

    modifier = drv: haskell.lib.overrideCabal drv (attrs: {
      buildTools = (attrs.buildTools or []) ++ [haskellPackages.cabal-install] ;

      isLibrary = false;
      isExecutable = true;
      enableSharedExecutables = false;
      enableSharedLibraries = false;

      executableSystemDepends = [ pkgsStatic.gmp6 pkgsStatic.zlib ] ;
      configureFlags = [
          "--ghc-option=-optl=-static"
          "--ghc-option=-optl=-pthread"
          "--disable-executable-stripping"
      ];

    }) ;
  } ;
  buildInputs = [ ] ;
in pkg.overrideAttrs(attrs: {
  buildInputs = attrs.buildInputs ++ buildInputs ;
})
@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@cdepillabout
Copy link
Member

As of #162374, which is included in #160733, it is now possible to compile many haskell packages statically:

$ nix-build -E 'with import ./. {}; pkgsStatic.haskellPackages.print-console-colors'
$ file ./result/bin/print-console-colors 
./result/bin/print-console-colors: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: haskell
Projects
None yet
Development

No branches or pull requests

3 participants