Skip to content

arpack fails to build with exit code 2 #89215

@idontgetoutmuch

Description

@idontgetoutmuch

Describe the bug
builder for '/nix/store/wa7ws1zxydsm19x1hlv09fj42rdv0k53-arpack-3.7.0.drv' failed with exit code 2

0% tests passed, 8 tests failed out of 8

Total Test time (real) =   0.14 sec

The following tests FAILED:
          1 - dnsimp_tst (Child aborted)
          2 - bug_1315_single_tst (Child aborted)
          3 - bug_1315_double_tst (Child aborted)
          4 - bug_1323_tst (Child aborted)
          5 - bug_58_double_tst (Child aborted)
          6 - bug_79_double_complex_tst (Child aborted)
          7 - bug_142_tst (Child aborted)
          8 - bug_142_gen_tst (Child aborted)
Errors while running CTest
make: *** [Makefile:115: test] Error 8
checking size of double_t... 8
builder for '/nix/store/wa7ws1zxydsm19x1hlv09fj42rdv0k53-arpack-3.7.0.drv' failed with exit code 2
cannot build derivation '/nix/store/0mi7axsqjai5gmwr17hbs6pi9crn6n1f-julia-env.drv': 1 dependencies couldn't be built

To Reproduce
default.nix

{pkgs, stdenv, openmpi, ...}:

with pkgs;
let
  julia = julia_13;
  d = version: "v${lib.concatStringsSep "." (lib.take 2 (lib.splitString "." version))}";
  extraLibs = [
    # ImageMagick.jl ==========================
    imagemagickBig
    # HDF5.jl =================================
    hdf5
    # Sundials.jl =============================
    sundials
    # MPI.jl =============================
    openmpi
    # Cairo.jl ================================
    cairo gettext pango.out glib.out
    # Gtk.jl ==================================
    gtk3 gdk_pixbuf
    # GZip.jl required by DataFrames.jl =======
    gzip zlib
    # GR.jl which runs without Xrender & Xext =
    # but cannot save files ===================
    xorg.libXt xorg.libX11 xorg.libXrender xorg.libXext glfw freetype
    # Arpack.jl ===============================
    arpack gfortran.cc
    (pkgs.runCommand "openblas64_" {} ''
      mkdir -p "$out"/lib/
      ln -s ${openblasCompat}/lib/libopenblas.so "$out"/lib/libopenblas64_.so.0
    '')
  ];
in
stdenv.mkDerivation rec {
  name = "julia-env";
  version = julia.version;
  nativeBuildInputs = [ makeWrapper cacert git pkgconfig which ];
  buildInputs = [
    julia
  ] ++ extraLibs;
  phases = [ "installPhase" ];
  installPhase = ''
    export LD_LIBRARY_PATH=${lib.makeLibraryPath extraLibs}
    export JULIA_MPI_BINARY="system"
    export JULIA_MPI_LIBRARY=${openmpi}/lib
    makeWrapper ${julia}/bin/julia $out/bin/julia \
        --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" \
        --prefix JULIA_MPI_BINARY : "$JULIA_MPI_BINARY" \
        --prefix JULIA_MPI_LIBRARY : "$JULIA_MPI_LIBRARY" \
        --set JULIA_PKGDIR $JULIA_PKGDIR
  '';
}

shell.nix

{ nixpkgs ? import <nixpkgs> {
    overlays = [ ]; } } :

nixpkgs.mkShell {
  buildInputs = [ (nixpkgs.callPackage ./default.nix {
    pkgs = nixpkgs;
  }) ];
}
nix-shell -I nixpkgs=~/nixpkgs
bash-3.2$ git rev-parse HEAD
87908c374347c2761d672bcb5f9c5258a1b48f4c

Expected behavior

The derivation to build an executable called julia

Additional context
It fails with julia_11 also but

nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.03.tar.gz

succeeds with julia_11 but

bash-3.2$ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.03.tar.gz
error: undefined variable 'julia_13' at /Users/dom/JuliaExperiments/default.nix:5:11

so 1.3 seems to be a recent addition even though julia is on 1.4 and about to move to 1.5.

Notify maintainers
@matthewbauer

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

- system: `0`
 - host os: `Darwin 17.7.0, macOS 10.13.6`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.5`
 - channels(root): `"nixpkgs-20.09pre227522.d4226e3a4b5"`
 - channels(dom): `"nixpkgs-20.09pre227522.d4226e3a4b5"`

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions