Describe the bug
With the steps below I get
Preprocessing test suite 'lapack-test' for lapack-0.3.1..
Building test suite 'lapack-test' for lapack-0.3.1..
[ 1 of 24] Compiling Test.Format ( test/Test/Format.hs, dist/build/lapack-test/lapack-test-tmp/Test/Format.o )
[ 2 of 24] Compiling Test.Utility ( test/Test/Utility.hs, dist/build/lapack-test/lapack-test-tmp/Test/Utility.o )
[ 3 of 24] Compiling Test.Shape ( test/Test/Shape.hs, dist/build/lapack-test/lapack-test-tmp/Test/Shape.o )
[ 4 of 24] Compiling Test.Multiply ( test/Test/Multiply.hs, dist/build/lapack-test/lapack-test-tmp/Test/Multiply.o )
[ 5 of 24] Compiling Test.Logic ( test/Test/Logic.hs, dist/build/lapack-test/lapack-test-tmp/Test/Logic.o )
[ 6 of 24] Compiling Test.Generator ( test/Test/Generator.hs, dist/build/lapack-test/lapack-test-tmp/Test/Generator.o )
[ 7 of 24] Compiling Test.Symmetric ( test/Test/Symmetric.hs, dist/build/lapack-test/lapack-test-tmp/Test/Symmetric.o )
[ 8 of 24] Compiling Test.Singular ( test/Test/Singular.hs, dist/build/lapack-test/lapack-test-tmp/Test/Singular.o )
[ 9 of 24] Compiling Test.Indexed ( test/Test/Indexed.hs, dist/build/lapack-test/lapack-test-tmp/Test/Indexed.o )
[10 of 24] Compiling Test.Permutation ( test/Test/Permutation.hs, dist/build/lapack-test/lapack-test-tmp/Test/Permutation.o )
[11 of 24] Compiling Test.Generic ( test/Test/Generic.hs, dist/build/lapack-test/lapack-test-tmp/Test/Generic.o )
[12 of 24] Compiling Test.Matrix ( test/Test/Matrix.hs, dist/build/lapack-test/lapack-test-tmp/Test/Matrix.o )
[13 of 24] Compiling Test.Example ( test/Test/Example.hs, dist/build/lapack-test/lapack-test-tmp/Test/Example.o )
[14 of 24] Compiling Test.Divide ( test/Test/Divide.hs, dist/build/lapack-test/lapack-test-tmp/Test/Divide.o )
[15 of 24] Compiling Test.Triangular ( test/Test/Triangular.hs, dist/build/lapack-test/lapack-test-tmp/Test/Triangular.o )
[16 of 24] Compiling Test.Square ( test/Test/Square.hs, dist/build/lapack-test/lapack-test-tmp/Test/Square.o )
[17 of 24] Compiling Test.Orthogonal ( test/Test/Orthogonal.hs, dist/build/lapack-test/lapack-test-tmp/Test/Orthogonal.o )
[18 of 24] Compiling Test.LowerUpper ( test/Test/LowerUpper.hs, dist/build/lapack-test/lapack-test-tmp/Test/LowerUpper.o )
[19 of 24] Compiling Test.Hermitian ( test/Test/Hermitian.hs, dist/build/lapack-test/lapack-test-tmp/Test/Hermitian.o )
[20 of 24] Compiling Test.Banded.Utility ( test/Test/Banded/Utility.hs, dist/build/lapack-test/lapack-test-tmp/Test/Banded/Utility.o )
[21 of 24] Compiling Test.BandedHermitian ( test/Test/BandedHermitian.hs, dist/build/lapack-test/lapack-test-tmp/Test/BandedHermitian.o )
[22 of 24] Compiling Test.Banded ( test/Test/Banded.hs, dist/build/lapack-test/lapack-test-tmp/Test/Banded.o )
[23 of 24] Compiling Test.Vector ( test/Test/Vector.hs, dist/build/lapack-test/lapack-test-tmp/Test/Vector.o )
[24 of 24] Compiling Main ( test/Main.hs, dist/build/lapack-test/lapack-test-tmp/Main.o )
Linking dist/build/lapack-test/lapack-test ...
Undefined symbols for architecture x86_64:
"__gfortran_st_write", referenced from:
_xerbla_ in liblapack.a(xerbla.f.o)
"__gfortran_string_len_trim", referenced from:
_xerbla_ in liblapack.a(xerbla.f.o)
"__gfortran_transfer_character_write", referenced from:
_xerbla_ in liblapack.a(xerbla.f.o)
"__gfortran_transfer_integer_write", referenced from:
_xerbla_ in liblapack.a(xerbla.f.o)
"__gfortran_st_write_done", referenced from:
_xerbla_ in liblapack.a(xerbla.f.o)
"__gfortran_stop_string", referenced from:
_xerbla_ in liblapack.a(xerbla.f.o)
"__gfortran_concat_string", referenced from:
_cgesvd_ in liblapack.a(cgesvd.f.o)
_dgesvd_ in liblapack.a(dgesvd.f.o)
_sgesvd_ in liblapack.a(sgesvd.f.o)
_zgesvd_ in liblapack.a(zgesvd.f.o)
_chseqr_ in liblapack.a(chseqr.f.o)
_ctrtri_ in liblapack.a(ctrtri.f.o)
_cunmbr_ in liblapack.a(cunmbr.f.o)
...
ld: symbol(s) not found for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
`cc' failed in phase `Linker'. (Exit code: 1)
builder for '/nix/store/x75j2l3wvmqsscfq1zyzryakmir3k7ck-lapack-0.3.1.drv' failed with exit code 1
cannot build derivation '/nix/store/8yzs26byw80jhq84hzvml2dypjnn9caj-ghc-8.6.5-with-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/8yzs26byw80jhq84hzvml2dypjnn9caj-ghc-8.6.5-with-packages.drv' failed
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect to get a shell in which I can invoke ghci and then import qualified Numeric.LAPACK.Matrix as Matrix.
Additional context
Linking dist/build/lapack-test/lapack-test ...
/nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/ld: /nix/store/8qfdbhycf15g7i9pgj994lki5ijypzdd-liblapack-3.8.0/lib/liblapack.a(xerbla.f.o): undefined reference to symbol '_gfortran_string_len_trim@@GFORTRAN_7'
/nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/ld: /nix/store/mdpm4b2w8y5ybrv4rqyg98npvkwj7wg3-gfortran-7.4.0-lib/lib/libgfortran.so.4: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)
builder for '/nix/store/f5bhv09gwwf1h5w5v9cqjlizsq0hadvz-lapack-0.3.1.drv' failed with exit code 1
cannot build derivation '/nix/store/3d31h7hhh9xvwv2pllw22bi5dapzsphk-ghc-8.6.5-with-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/3d31h7hhh9xvwv2pllw22bi5dapzsphk-ghc-8.6.5-with-packages.drv' failed
import qualified Numeric.LAPACK.Matrix as Matrix as desired.Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.
sundials@sundials:~$ nix run nixpkgs.nix-info -c nix-info -m
[1 copied, 0.0 MiB DL]
- system: `"x86_64-linux"`
- host os: `Linux 4.18.0-1024-azure, Ubuntu, 18.04.2 LTS (Bionic Beaver)`
- multi-user?: `no`
- sandbox: `yes`
- version: `nix-env (Nix) 2.2.2`
- channels(sundials): `"nixpkgs-19.09pre186574.88d9f776091"`
- nixpkgs: `/home/sundials/.nix-defexpr/channels/nixpkgs`
@idontgetoutmuch It looks like you closed this, so maybe you figured it out, but it looks like it is not correctly linking to libgfortran. I was able to fix it by making the following change to your code:
diff --git a/lapack/default.nix b/lapack/default.nix
index bc55358..bacaa7f 100644
--- a/lapack/default.nix
+++ b/lapack/default.nix
@@ -24,8 +24,11 @@ mkDerivation {
netlib-ffi non-empty QuickCheck quickcheck-transformer random
semigroups tfp transformers unique-logic-tf utility-ht
];
- testSystemDepends = [ libiconv liblapack gfortran ];
+ testSystemDepends = [ libiconv liblapack gfortran gfortran.cc.lib ];
homepage = "http://hub.darcs.net/thielema/lapack/";
description = "Numerical Linear Algebra using LAPACK";
license = stdenv.lib.licenses.bsd3;
+ buildFlags = [
+ "--ghc-options=-lgfortran"
+ ];
}
I don't know enough about how gfortran is packaged in nixpkgs to know if this is the _correct_ fix, but this at least worked for me.
However, even if you fix this, the actual tests will run, but when run they appear to be segfaulting for some reason. Here's the build log (although it is not very informative):
$ nix-build
these derivations will be built:
/nix/store/prsp6fm8qpvyg2krzzkvv7dzrwjyq000-lapack-0.3.1.drv
building '/nix/store/prsp6fm8qpvyg2krzzkvv7dzrwjyq000-lapack-0.3.1.drv'...
...
[20 of 24] Compiling Test.Banded.Utility ( test/Test/Banded/Utility.hs, dist/build/lapack-test/lapack-test-tmp/Test/Banded/Utility.o )
[21 of 24] Compiling Test.BandedHermitian ( test/Test/BandedHermitian.hs, dist/build/lapack-test/lapack-test-tmp/Test/BandedHermitian.o )
[22 of 24] Compiling Test.Banded ( test/Test/Banded.hs, dist/build/lapack-test/lapack-test-tmp/Test/Banded.o )
[23 of 24] Compiling Test.Vector ( test/Test/Vector.hs, dist/build/lapack-test/lapack-test-tmp/Test/Vector.o )
[24 of 24] Compiling Main ( test/Main.hs, dist/build/lapack-test/lapack-test-tmp/Main.o )
Linking dist/build/lapack-test/lapack-test ...
running tests
Running 1 test suites...
Test suite lapack-test: RUNNING...
Test suite lapack-test: FAIL
Test suite logged to: dist/test/lapack-0.3.1-lapack-test.log
0 of 1 test suites (0 of 1 test cases) passed.
builder for '/nix/store/prsp6fm8qpvyg2krzzkvv7dzrwjyq000-lapack-0.3.1.drv' failed with exit code 1
error: build of '/nix/store/prsp6fm8qpvyg2krzzkvv7dzrwjyq000-lapack-0.3.1.drv' failed
If you want to look into this further, here's an easy way to do it.
First, use a derivation we can pass to nix-shell:
{ pkgs ? import <nixpkgs> {} }:
let
overlay = self: super: {
haskellPackages = super.haskellPackages.override {
overrides = hself: hsuper: {
my-blas-ffi = hself.callPackage ../blas-ffi/default.nix {
};
my-lapack = hself.callPackage ./default.nix {
blas-ffi = hself.my-blas-ffi;
};
};
};
};
nixpkgs = import ../../../git/nixpkgs {
overlays = [ overlay ];
};
in
nixpkgs.haskellPackages.my-lapack
Save this as release.nix.
Run nix-shell on this. From within nix-shell, run genericBuild to start the normal build. This should fail while running the tests like above. From here, you can try directly running the tests:
$ nix-shell release.nix
$ # now we're in a nix-shell
$ set -e
$ genericBuild
...
$ # genericBuild should have failed when running the tests. It also might kick you out of
$ # your nix-shell if it fails, so make sure you're still in the nix-shell. Run `nix-shell release.nix`
$ # again if you're no longer in the nix-shell.
$ cd fetchdarcs/
$ dist/build/lapack-test/lapack-test
Segmentation fault
I'm not sure what is going on. I tried running it with gdb, but I didn't really get anything interesting:
$ gdb ./dist/build/lapack-test/lapack-test
Reading symbols from ./dist/build/lapack-test/lapack-test...done.
(gdb) run
Starting program: /home/illabout/temp/lapack/lapack/fetchdarcs/dist/build/lapack-test/lapack-test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libthread_db.so.1".
(72 tests)
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6ff7528 in scopy_k_HASWELL () from /nix/store/gnmyxw1gylv0rzvfrpwh0x2whyr8spv9-openblas-0.3.6/lib/libopenblas.so.0
(gdb) bt
#0 0x00007ffff6ff7528 in scopy_k_HASWELL () from /nix/store/gnmyxw1gylv0rzvfrpwh0x2whyr8spv9-openblas-0.3.6/lib/libopenblas.so.0
#1 0x00000000006f11c2 in ?? ()
#2 0x0000000000000000 in ?? ()
Thanks ever so much for this. With your hint, I managed to get this running outside stack using cabal. I had had errors using cabal but not with stack. I ran cabal2nix on the working cabal file and got
{ mkDerivation, base, blas-ffi, blaze-html, boxes, ChasingBottoms
, comfort-array, data-ref, deepseq, fixed-length, gfortran
, guarded-allocation, hyper, lapack-ffi, lazyio, monoid-transformer
, netlib-ffi, non-empty, openblasCompat, quadmath, QuickCheck
, quickcheck-transformer, random, semigroups, stdenv, text, tfp
, transformers, unique-logic-tf, utility-ht
}:
mkDerivation {
pname = "lapack";
version = "0.3.1";
src = ./.;
libraryHaskellDepends = [
base blas-ffi blaze-html boxes comfort-array deepseq fixed-length
guarded-allocation hyper lapack-ffi lazyio netlib-ffi non-empty
semigroups text tfp transformers utility-ht
];
testHaskellDepends = [
base ChasingBottoms comfort-array data-ref monoid-transformer
netlib-ffi non-empty QuickCheck quickcheck-transformer random
semigroups tfp transformers unique-logic-tf utility-ht
];
testSystemDepends = [ gfortran openblasCompat quadmath ];
homepage = "http://hub.darcs.net/thielema/lapack/";
description = "Numerical Linear Algebra using LAPACK";
license = stdenv.lib.licenses.bsd3;
}
My guess is we are missing quadmath but I can't see quadmath as nix package.
@idontgetoutmuch
It looks like libquadmath is distributed along with gcc:
$ find /nix/store -name "libquadmath*"
/nix/store/hlnxw4k6931bachvg5sv0cyaissimswb-gcc-7.4.0-lib/lib/libquadmath.so.0
/nix/store/hlnxw4k6931bachvg5sv0cyaissimswb-gcc-7.4.0-lib/lib/libquadmath.la
/nix/store/hlnxw4k6931bachvg5sv0cyaissimswb-gcc-7.4.0-lib/lib/libquadmath.so
/nix/store/hlnxw4k6931bachvg5sv0cyaissimswb-gcc-7.4.0-lib/lib/libquadmath.so.0.0.0
/nix/store/d4n93jn9fdq8fkmkm1q8f32lfagvibjk-gcc-7.4.0/lib/libquadmath.a
...
You can get access to this libquadmath.a file by using an expression like gcc.cc:
$ nix repl
> nixpkgs = import <nixpkgs> {}
> :b nixpkgs.gcc.cc
this derivation produced the following outputs:
info -> /nix/store/rm8ln66zgp9zana6g1ckj7vwlmmj023k-gcc-7.4.0-info
lib -> /nix/store/hlnxw4k6931bachvg5sv0cyaissimswb-gcc-7.4.0-lib
man -> /nix/store/7s666ag87vpcjjlc85pqbj7iybc2q31r-gcc-7.4.0-man
out -> /nix/store/d4n93jn9fdq8fkmkm1q8f32lfagvibjk-gcc-7.4.0
So you might be able to override the lapack derivation you pasted above and set quadmath = gcc.cc (or maybe gcc.cc.lib):
...
lapack = hself.callPackage ./lapack.nix {
quadmath = gcc.cc;
};
...
However, there are not many other places in nixpkgs that are referring to gcc.cc, so I don't know if the above is correct. I had thought that these types of libraries would be available as long as you are using ld provided by gcc (which I think you should be), and you set something like -lquadmath on the command line.
I played around with this a tad more and I was able to get it to successfully build.
Here's the derivation for lapack:
{ mkDerivation, base, blas-ffi, blaze-html, boxes, ChasingBottoms
, comfort-array, data-ref, deepseq, fixed-length, gfortran
, guarded-allocation, hyper, lapack-ffi, lazyio, monoid-transformer
, netlib-ffi, non-empty, openblasCompat, quadmath, QuickCheck
, quickcheck-transformer, random, semigroups, stdenv, text, tfp
, transformers, unique-logic-tf, utility-ht, fetchdarcs
}:
mkDerivation {
pname = "lapack";
version = "0.3.1";
src = fetchdarcs{ url = http://hub.darcs.net/thielema/lapack/; sha256 = "0i24b1mis2czcyklkw08zb1kk72dp7bkicynql8icf19dzwz0mq1"; };
libraryHaskellDepends = [
base blas-ffi blaze-html boxes comfort-array deepseq fixed-length
guarded-allocation hyper lapack-ffi lazyio netlib-ffi non-empty
semigroups text tfp transformers utility-ht
];
testHaskellDepends = [
base ChasingBottoms comfort-array data-ref monoid-transformer
netlib-ffi non-empty QuickCheck quickcheck-transformer random
semigroups tfp transformers unique-logic-tf utility-ht
];
buildFlags = [
"--ghc-options=-lgfortran"
];
librarySystemDepends = [ gfortran.cc.lib ];
testSystemDepends = [ gfortran openblasCompat quadmath ];
homepage = "http://hub.darcs.net/thielema/lapack/";
description = "Numerical Linear Algebra using LAPACK";
license = stdenv.lib.licenses.bsd3;
}
You might be able to simplify this as you did above by making changes to the cabal file.
And then the release.nix:
let
overlay = self: super: {
haskellPackages = super.haskellPackages.override {
overrides = hself: hsuper: {
my-blas-ffi = hself.callPackage ../blas-ffi/default.nix {
};
my-lapack = hself.callPackage ./default.nix {
blas-ffi = hself.my-blas-ffi;
quadmath = self.gcc.cc;
};
};
};
};
nixpkgs = import <nixpkgs> {
overlays = [ overlay ];
};
in
nixpkgs.haskellPackages.my-lapack
Building it:
$ nix-build release.nix
these derivations will be built:
/nix/store/rpvvfy3ln21gwy1dgzqrk2jz2l2flnqd-lapack-0.3.1.drv
building '/nix/store/rpvvfy3ln21gwy1dgzqrk2jz2l2flnqd-lapack-0.3.1.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/44zyylbbhabj2d62f7lbb6wmjlllcv10-ghc-8.6.5.
unpacking sources
...
/nix/store/qjsmq1bymypxrarc7abkxsq60gvgrwzw-lapack-0.3.1
Although like I was saying above, you should always have access to the GCC libraries, so you don't need to explicitly ask for quadmath, as long as -lquadmath has been passed, since the GCC libraries should always be available:
{ mkDerivation, base, blas-ffi, blaze-html, boxes, ChasingBottoms
, comfort-array, data-ref, deepseq, fixed-length, gfortran
, guarded-allocation, hyper, lapack-ffi, lazyio, monoid-transformer
, netlib-ffi, non-empty, openblasCompat, QuickCheck
, quickcheck-transformer, random, semigroups, stdenv, text, tfp
, transformers, unique-logic-tf, utility-ht, fetchdarcs
}:
mkDerivation {
pname = "lapack";
version = "0.3.1";
src = fetchdarcs{ url = http://hub.darcs.net/thielema/lapack/; sha256 = "0i24b1mis2czcyklkw08zb1kk72dp7bkicynql8icf19dzwz0mq1"; };
libraryHaskellDepends = [
base blas-ffi blaze-html boxes comfort-array deepseq fixed-length
guarded-allocation hyper lapack-ffi lazyio netlib-ffi non-empty
semigroups text tfp transformers utility-ht
];
testHaskellDepends = [
base ChasingBottoms comfort-array data-ref monoid-transformer
netlib-ffi non-empty QuickCheck quickcheck-transformer random
semigroups tfp transformers unique-logic-tf utility-ht
];
buildFlags = [
"--ghc-options=-lgfortran"
"--ghc-options=-lquadmath"
];
librarySystemDepends = [ gfortran.cc.lib ];
testSystemDepends = [ gfortran openblasCompat ];
homepage = "http://hub.darcs.net/thielema/lapack/";
description = "Numerical Linear Algebra using LAPACK";
license = stdenv.lib.licenses.bsd3;
}
Again, you might be able to change the .cabal file so that this works without needing to mess with nix code at all.
Thanks very much for doing this. I also got lapack to build and run its tests inside nix: https://github.com/idontgetoutmuch/lapack. Yes maybe we can change the cabal file to autogenerate things. I think I will try to get blas-ffi to build in nix automatically and submit a PR for this package to nixpkgs. If someone manages to create a .cabal file that autogenerates enough for nix to build it then we can remove the additional nix derivation at that point.
Thanks once again for taking the time - much appreciated.
I'm dealing with similar issue. In my case I need to make project that is using stack as a build tool work on my NixOS machine. I'm not trying to replace stack with nix yet because I know there will be certain complications with this specific project.
I'm using stack's integration of nix. This is the relevant part of the stack.yaml:
nix:
enable: true
packages: [ zlib.dev
, zlib.out
, postgresql
, gfortran
, gfortran.cc.lib
, sundials
, blas
, liblapack
, gsl
, glpk
, pkgconfig
, sundials
, openblas
]
The linker error is as following.
Linking .stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/executor/executor ...
/nix/store/llfz611di8wvhszikl3p3wya22ghi57m-liblapack-3.9.0/lib/liblapack.a(dgesvd.f.o):function dgesvd_: error: undefined reference to '_gfortran_concat_string'
/nix/store/llfz611di8wvhszikl3p3wya22ghi57m-liblapack-3.9.0/lib/liblapack.a(dgesvd.f.o):function dgesvd_: error: undefined reference to '_gfortran_concat_string'
/nix/store/llfz611di8wvhszikl3p3wya22ghi57m-liblapack-3.9.0/lib/liblapack.a(dhseqr.f.o):function dhseqr_: error: undefined reference to '_gfortran_concat_string'
/nix/store/llfz611di8wvhszikl3p3wya22ghi57m-liblapack-3.9.0/lib/liblapack.a(dormbr.f.o):function dormbr_: error: undefined reference to '_gfortran_concat_string'
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)
Completed 199 action(s).
This is likely related to gfortran lapack issue. Any idea how I can resolve this?
@turboMaCk I don't have a good suggestion here.
If you can come up with a simple reproducible example, it might be easy for someone to figure out a solution.
I'd suggest creating a separate issue about this, and possibly posting to discourse as well.
Also, there was a big PR touching blas and lapack you might be interested in: https://github.com/NixOS/nixpkgs/pull/83888
Thanks @cdepillabout I was just asking in case you would immediately know from your experience with this.
I figured it out myself so just for the record if some else having this issue will land here looking for help - I needed to link to gfortran on my nixos machine to make project work with stack. Essentially just this line in project.cabal:
extra-libraries: gfortran
I recommend using cabal flag and putting it to flag directive as just adding this might break compilation on system where gfortran is not available:
....
Flag GFortran
Description: Link GFortran
Default: False
...
executable foo
...
if flag(gfortran)
extra-libraries: gfortran
...
FYI @turboMaCk @idontgetoutmuch input-output-hk/haskell.nix#537 seems related to the same thing. https://github.com/input-output-hk/haskell.nix/issues/537#issuecomment-611322396 in particular discusses the fundamental issue and lists another solution. It's specific to the haskell.nix framework, but can be adapted I think: override liblapack to generate shared objects so that its dependency on gfortran is revealed to Nix. Thanks again @angerman
thanks for sharing this @nfrisby
Most helpful comment
FYI @turboMaCk @idontgetoutmuch input-output-hk/haskell.nix#537 seems related to the same thing. https://github.com/input-output-hk/haskell.nix/issues/537#issuecomment-611322396 in particular discusses the fundamental issue and lists another solution. It's specific to the
haskell.nixframework, but can be adapted I think: overrideliblapackto generate shared objects so that its dependency ongfortranis revealed to Nix. Thanks again @angerman