octave: build with openblas
The expression inherits integer width from OpenBLAS, so Octave will use 64-bit integers if OpenBLAS supports it. However, this feature in Octave is experimental, so we continue to use OpenBLAS with 32-bit integers by default. (This only applies to the integer width, the pointer width is always the platform-native width.)
This commit is contained in:
parent
fa290cb741
commit
614c867b29
@ -1,10 +1,22 @@
|
|||||||
{ stdenv, fetchurl, gfortran, readline, ncurses, perl, flex, texinfo, qhull
|
{ stdenv, fetchurl, gfortran, readline, ncurses, perl, flex, texinfo, qhull
|
||||||
, libX11, graphicsmagick, pcre, liblapack, pkgconfig, mesa, fltk
|
, libX11, graphicsmagick, pcre, pkgconfig, mesa, fltk
|
||||||
, fftw, fftwSinglePrec, zlib, curl, qrupdate
|
, fftw, fftwSinglePrec, zlib, curl, qrupdate, openblas
|
||||||
, qt ? null, qscintilla ? null, ghostscript ? null, llvm ? null, hdf5 ? null,glpk ? null
|
, qt ? null, qscintilla ? null, ghostscript ? null, llvm ? null, hdf5 ? null,glpk ? null
|
||||||
, suitesparse ? null, gnuplot ? null, jdk ? null, python ? null
|
, suitesparse ? null, gnuplot ? null, jdk ? null, python ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
suitesparseOrig = suitesparse;
|
||||||
|
qrupdateOrig = qrupdate;
|
||||||
|
in
|
||||||
|
# integer width is determined by openblas, so all dependencies must be built
|
||||||
|
# with exactly the same openblas
|
||||||
|
let
|
||||||
|
suitesparse =
|
||||||
|
if suitesparseOrig != null then suitesparseOrig.override { inherit openblas; } else null;
|
||||||
|
qrupdate = if qrupdateOrig != null then qrupdateOrig.override { inherit openblas; } else null;
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "4.0.0";
|
version = "4.0.0";
|
||||||
name = "octave-${version}";
|
name = "octave-${version}";
|
||||||
@ -14,7 +26,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ gfortran readline ncurses perl flex texinfo qhull libX11
|
buildInputs = [ gfortran readline ncurses perl flex texinfo qhull libX11
|
||||||
graphicsmagick pcre liblapack pkgconfig mesa fltk zlib curl
|
graphicsmagick pcre pkgconfig mesa fltk zlib curl openblas
|
||||||
fftw fftwSinglePrec qrupdate ]
|
fftw fftwSinglePrec qrupdate ]
|
||||||
++ (stdenv.lib.optional (qt != null) qt)
|
++ (stdenv.lib.optional (qt != null) qt)
|
||||||
++ (stdenv.lib.optional (qscintilla != null) qscintilla)
|
++ (stdenv.lib.optional (qscintilla != null) qscintilla)
|
||||||
@ -34,7 +46,13 @@ stdenv.mkDerivation rec {
|
|||||||
# problems on Hydra
|
# problems on Hydra
|
||||||
enableParallelBuilding = false;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
configureFlags = [ "--enable-readline" "--enable-dl" ];
|
configureFlags =
|
||||||
|
[ "--enable-readline"
|
||||||
|
"--enable-dl"
|
||||||
|
"--with-blas=openblas"
|
||||||
|
"--with-lapack=openblas"
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optional openblas.blas64 "--enable-64";
|
||||||
|
|
||||||
# Keep a copy of the octave tests detailed results in the output
|
# Keep a copy of the octave tests detailed results in the output
|
||||||
# derivation, because someone may care
|
# derivation, because someone may care
|
||||||
|
@ -4820,6 +4820,7 @@ let
|
|||||||
glpk = null;
|
glpk = null;
|
||||||
suitesparse = null;
|
suitesparse = null;
|
||||||
jdk = null;
|
jdk = null;
|
||||||
|
openblas = openblasCompat;
|
||||||
};
|
};
|
||||||
octaveFull = (lowPrio (callPackage ../development/interpreters/octave {
|
octaveFull = (lowPrio (callPackage ../development/interpreters/octave {
|
||||||
fltk = fltk13.override { cfg.xftSupport = true; };
|
fltk = fltk13.override { cfg.xftSupport = true; };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user