Skip to content

Commit

Permalink
superlu: fix darwin
Browse files Browse the repository at this point in the history
The update from 5.2.1 -> 7.0.0 causes superlu segfaults running the
tests when linked with Accelerate due to superlu using the single
precision interface.  Set the Blas vendor to Generic to prevent cmake
from using Accelerate and use the nixpkgs provided blas/lapack
libraries.
  • Loading branch information
paparodeo committed Dec 21, 2024
1 parent 36d6a1b commit 6e276fd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pkgs/by-name/su/superlu/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,16 @@ stdenv.mkDerivation (finalAttrs: {

propagatedBuildInputs = [ blas ];

cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
(lib.cmakeBool "enable_fortran" true)
];
cmakeFlags =
[
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
(lib.cmakeBool "enable_fortran" true)
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# prevent cmake from using Accelerate, which causes tests to segfault
# https://github.com/xiaoyeli/superlu/issues/155
"-DBLA_VENDOR=Generic"
];

doCheck = true;

Expand Down

0 comments on commit 6e276fd

Please sign in to comment.