summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wolsieffer <benwolsieffer@gmail.com>2022-12-06 17:19:36 -0500
committerBen Wolsieffer <benwolsieffer@gmail.com>2022-12-09 13:19:08 -0500
commit3ae3e1f5a364f097bdc4657ad13c8e089c7d2891 (patch)
tree8066e21519c289452a3fd304a47f726d7e9adbca
parentMerge pull request #204330 from jvanbruegge/isabelle-fix-components (diff)
downloadnixpkgs-3ae3e1f5a364f097bdc4657ad13c8e089c7d2891.tar.gz
liblapack: fix cross-compilation
3.11 now attempts to run host platform binaries at build time by default. Fortunately, this can be easily disabled. These binaries test certain compiler behaviors and are for informational purposes only. Apparently, they cause problems with GCC 12 as well and therefore will likely be disabled by default in the next release.
-rw-r--r--pkgs/development/libraries/science/math/liblapack/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/libraries/science/math/liblapack/default.nix b/pkgs/development/libraries/science/math/liblapack/default.nix
index c8f0b37e0659..b9563346ada4 100644
--- a/pkgs/development/libraries/science/math/liblapack/default.nix
+++ b/pkgs/development/libraries/science/math/liblapack/default.nix
@@ -30,7 +30,11 @@ stdenv.mkDerivation rec {
"-DCBLAS=ON"
"-DBUILD_TESTING=ON"
] ++ lib.optional shared "-DBUILD_SHARED_LIBS=ON"
- ++ lib.optional blas64 "-DBUILD_INDEX64=ON";
+ ++ lib.optional blas64 "-DBUILD_INDEX64=ON"
+ # Tries to run host platform binaries during the build
+ # Will likely be disabled by default in 3.12, see:
+ # https://github.com/Reference-LAPACK/lapack/issues/757
+ ++ lib.optional (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) "-DTEST_FORTRAN_COMPILER=OFF";
passthru = { inherit blas64; };