diff --git a/pkgs/by-name/ca/casacpp/Link-synthesis-target-with-LAPACK-BLAS-libraries.patch b/pkgs/by-name/ca/casacpp/Link-synthesis-target-with-LAPACK-BLAS-libraries.patch new file mode 100644 index 000000000000..97e17f5bfc02 --- /dev/null +++ b/pkgs/by-name/ca/casacpp/Link-synthesis-target-with-LAPACK-BLAS-libraries.patch @@ -0,0 +1,28 @@ +From 71a658844e69e3993ab2fe712e0063a67daa00e0 Mon Sep 17 00:00:00 2001 +From: Moraxyc +Date: Wed, 20 May 2026 15:13:10 +0800 +Subject: Link synthesis target with LAPACK/BLAS libraries + +--- + synthesis/CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/synthesis/CMakeLists.txt b/synthesis/CMakeLists.txt +index e2250f0..59b55dc 100644 +--- a/synthesis/CMakeLists.txt ++++ b/synthesis/CMakeLists.txt +@@ -42,6 +42,11 @@ target_link_libraries(casacpp_synthesis PUBLIC PkgConfig::CASACORE) + # Libsakura dependency + target_link_libraries(casacpp_synthesis PUBLIC PkgConfig::SAKURA) + ++# LAPACK / BLAS dependency ++find_package(BLAS REQUIRED) ++find_package(LAPACK REQUIRED) ++target_link_libraries(casacpp_synthesis PRIVATE LAPACK::LAPACK) ++ + # Optional HPG dependency + if(DEFINED hpg_FOUND AND ${hpg_FOUND}) + target_link_libraries(casacpp_synthesis PUBLIC hpg::hpg) +-- +2.53.0 + diff --git a/pkgs/by-name/ca/casacpp/package.nix b/pkgs/by-name/ca/casacpp/package.nix index 6a701b79e35b..26495a1573e6 100644 --- a/pkgs/by-name/ca/casacpp/package.nix +++ b/pkgs/by-name/ca/casacpp/package.nix @@ -17,11 +17,13 @@ protobuf, gsl, libxml2, - libxslt, fftw, fftwFloat, - sqlite, + blas, + lapack, + libxslt, openssl, + sqlite, mpi, mpiSupport ? false, }: @@ -63,6 +65,10 @@ stdenv.mkDerivation (finalAttrs: { # error: call to implicitly-deleted copy constructor of 'std::unique_ptr' # error: object of type 'std::unique_ptr' cannot be assigned because its copy assignment operator is implicitly deleted ./Fix-Vi2DataProvider-move-semantics.patch + + # fix missing LAPACK symbols + # ld: symbol(s) not found, dgetrf_ dgetri_ dposv_ dpotri_ + ./Link-synthesis-target-with-LAPACK-BLAS-libraries.patch ]; postPatch = '' @@ -88,9 +94,11 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional mpiSupport mpi; buildInputs = [ + blas libxslt - sqlite openssl + sqlite + lapack ]; propagatedBuildInputs = [