From 5a4714061b88e5e2f8eb33cc31bfa7be3dc437da Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 23 Jul 2024 07:16:57 +1100 Subject: [PATCH 01/15] add tests to shut up linter --- recipe/meta.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 779ca71..9da4b2c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -96,6 +96,9 @@ outputs: - Library/bin/libblas.dll # [win] - Library/lib/blas.lib # [win] - Library/lib/libblas.dll.a # [win] + test: + commands: + - echo "no need to revalidate `files:` specification" - name: libtmglib build: @@ -124,6 +127,9 @@ outputs: - lib/libtmglib.{{ version }}.dylib # [osx] - Library/bin/libtmglib.dll # [win] - Library/lib/libtmglib.dll.a # [win] + test: + commands: + - echo "no need to revalidate `files:` specification" - name: libcblas build: @@ -156,6 +162,9 @@ outputs: - Library/bin/libcblas.dll # [win] - Library/lib/cblas.lib # [win] - Library/lib/libcblas.dll.a # [win] + test: + commands: + - echo "no need to revalidate `files:` specification" - name: liblapack build: @@ -187,6 +196,9 @@ outputs: - Library/bin/liblapack.dll # [win] - Library/lib/lapack.lib # [win] - Library/lib/liblapack.dll.a # [win] + test: + commands: + - echo "no need to revalidate `files:` specification" - name: liblapacke build: @@ -221,6 +233,9 @@ outputs: - Library/bin/liblapacke.dll # [win] - Library/lib/lapacke.lib # [win] - Library/lib/liblapacke.dll.a # [win] + test: + commands: + - echo "no need to revalidate `files:` specification" - name: blas-devel build: @@ -234,6 +249,9 @@ outputs: - {{ pin_subpackage("libcblas", exact=True) }} - {{ pin_subpackage("liblapack", exact=True) }} - {{ pin_subpackage("liblapacke", exact=True) }} + test: + commands: + - echo "pure meta-package" # For conda-forge blas selector, see also blas-feedstock - name: blas @@ -272,6 +290,9 @@ outputs: requirements: run: - liblapack {{ version }}.* + test: + commands: + - echo "pure meta-package" about: home: http://www.netlib.org/lapack From 228f85261331e2582ffa119337d3ea2991d88516 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 20 Aug 2024 14:34:35 +1100 Subject: [PATCH 02/15] switch from m2w64_* to flang+MSVC on windows --- recipe/meta.yaml | 56 ++++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 38 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9da4b2c..35825ea 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -51,14 +51,9 @@ build: requirements: build: - - {{ compiler("c") }} # [unix] - - {{ stdlib("c") }} # [unix] - - {{ compiler("fortran") }} # [unix] - - {{ compiler("m2w64_c") }} # [win] - - {{ stdlib("m2w64_c") }} # [win] - - {{ compiler("m2w64_fortran") }} # [win] - # This is just for creating the import libaries - - vs2019_win-64 # [win64] + - {{ stdlib("c") }} + - {{ compiler("c") }} + - {{ compiler("fortran") }} - ninja # [win] - make # [unix] - cmake @@ -76,12 +71,9 @@ outputs: - {{ pin_subpackage("libblas", max_pin="x") }} requirements: build: - - {{ compiler("c") }} # [unix] - - {{ stdlib("c") }} # [unix] - - {{ compiler("fortran") }} # [unix] - - {{ compiler("m2w64_c") }} # [win] - - {{ stdlib("m2w64_c") }} # [win] - - {{ compiler("m2w64_fortran") }} # [win] + - {{ stdlib("c") }} + - {{ compiler("c") }} + - {{ compiler("fortran") }} run_constrained: - blas * netlib files: @@ -110,12 +102,9 @@ outputs: - {{ pin_subpackage("libtmglib", max_pin="x") }} requirements: build: - - {{ compiler("c") }} # [unix] - - {{ stdlib("c") }} # [unix] - - {{ compiler("fortran") }} # [unix] - - {{ compiler("m2w64_c") }} # [win] - - {{ stdlib("m2w64_c") }} # [win] - - {{ compiler("m2w64_fortran") }} # [win] + - {{ stdlib("c") }} + - {{ compiler("c") }} + - {{ compiler("fortran") }} run_constrained: - blas * netlib files: @@ -141,12 +130,9 @@ outputs: - {{ pin_subpackage("libcblas", max_pin="x") }} requirements: build: - - {{ compiler("c") }} # [unix] - - {{ stdlib("c") }} # [unix] - - {{ compiler("fortran") }} # [unix] - - {{ compiler("m2w64_c") }} # [win] - - {{ stdlib("m2w64_c") }} # [win] - - {{ compiler("m2w64_fortran") }} # [win] + - {{ stdlib("c") }} + - {{ compiler("c") }} + - {{ compiler("fortran") }} run: - libblas {{ version }}.* files: @@ -176,12 +162,9 @@ outputs: - {{ pin_subpackage("liblapack", max_pin="x") }} requirements: build: - - {{ compiler("c") }} # [unix] - - {{ stdlib("c") }} # [unix] - - {{ compiler("fortran") }} # [unix] - - {{ compiler("m2w64_c") }} # [win] - - {{ stdlib("m2w64_c") }} # [win] - - {{ compiler("m2w64_fortran") }} # [win] + - {{ stdlib("c") }} + - {{ compiler("c") }} + - {{ compiler("fortran") }} run: - libblas {{ version }}.* files: @@ -210,12 +193,9 @@ outputs: - {{ pin_subpackage("liblapacke", max_pin="x") }} requirements: build: - - {{ compiler("c") }} # [unix] - - {{ stdlib("c") }} # [unix] - - {{ compiler("fortran") }} # [unix] - - {{ compiler("m2w64_c") }} # [win] - - {{ stdlib("m2w64_c") }} # [win] - - {{ compiler("m2w64_fortran") }} # [win] + - {{ stdlib("c") }} + - {{ compiler("c") }} + - {{ compiler("fortran") }} run: - libblas {{ version }}.* - libcblas {{ version }}.* From 8f5f82015b19691ebb56f7196079b38919f9d209 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 20 Aug 2024 14:50:40 +1100 Subject: [PATCH 03/15] adapt bld.bat for compiler changes --- recipe/bld.bat | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index ef6accd..d356c85 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,11 +1,8 @@ +@echo on + mkdir build cd build -set "HOST=x86_64-w64-mingw32" -set "CC=%HOST%-gcc.exe" -set "CXX=%HOST%-g++.exe" -set "FC=%HOST%-gfortran.exe" - cmake -G "Ninja" ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DBUILD_SHARED_LIBS=yes ^ @@ -27,14 +24,3 @@ if %ERRORLEVEL% NEQ 0 exit 1 :: This does not work with dylibs on osx and dlls on windows. ctest --output-on-failure -E "x*cblat*" if %ERRORLEVEL% NEQ 0 exit 1 - -for %%i in (blas cblas lapack lapacke) do ( - dumpbin /exports "%LIBRARY_PREFIX%/bin/lib%%i.dll" > exports%%i.txt - echo LIBRARY lib%%i.dll > %%i.def - echo EXPORTS >> %%i.def - for /f "skip=19 tokens=4" %%A in (exports%%i.txt) do echo %%A >> %%i.def - lib /def:%%i.def /out:%%i.lib /machine:x64 - copy %%i.lib "%LIBRARY_PREFIX%/lib/%%i.lib" -) - -dir "%LIBRARY_PREFIX%/lib" From 3e3740eca03e647829127e3189966aaa667eb181 Mon Sep 17 00:00:00 2001 From: regro-cf-autotick-bot <36490558+regro-cf-autotick-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 03:34:14 +0000 Subject: [PATCH 04/15] Rebuild for flang 19 --- .ci_support/migrations/flang19.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .ci_support/migrations/flang19.yaml diff --git a/.ci_support/migrations/flang19.yaml b/.ci_support/migrations/flang19.yaml new file mode 100644 index 0000000..a486133 --- /dev/null +++ b/.ci_support/migrations/flang19.yaml @@ -0,0 +1,13 @@ +__migrator: + kind: version + migration_number: 2 + build_number: 1 + commit_message: Rebuild for flang 19 + platform_allowlist: + - win-64 + override_cbc_keys: + - fortran_compiler_stub +migrator_ts: 1722763680.3089325 + +fortran_compiler_version: # [win64] + - 19 # [win64] From f028f0ac2d45c6afccc3b0bf21cd35135a39d488 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 26 Oct 2024 20:18:40 +1100 Subject: [PATCH 05/15] add patch for linker failing to find RowMajorStrg on windows --- recipe/meta.yaml | 4 +- ...rrent_version-and-compatibility_vers.patch | 15 +-- ...prototypes-for-deprecated-LAPACK-fun.patch | 9 +- .../patches/0003-Fix-MinGW-build-error.patch | 11 +- ...propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch | 11 +- ...x-the-loop-index-scalar-in-ZHEEQUB.f.patch | 9 +- ...nconsistencies-in-LAPACK-E-_-cz-gesv.patch | 11 +- .../0007-fix-workspace-query-in-dgelq.patch | 23 ++-- recipe/patches/0008-fix-dlanv2.patch | 15 +-- ...=> 0009-remove-extraneous-semicolon.patch} | 6 +- ...re-RowMajorStrg-as-extern-on-windows.patch | 122 ++++++++++++++++++ 11 files changed, 168 insertions(+), 68 deletions(-) rename recipe/patches/{pr391.patch => 0009-remove-extraneous-semicolon.patch} (87%) create mode 100644 recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 35825ea..495bac2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -44,7 +44,9 @@ source: # from Reference-LAPACK/lapack#445, see also xianyi/OpenBLAS#2864 - patches/0008-fix-dlanv2.patch # from Reference-LAPACK/lapack#391 - - patches/pr391.patch + - patches/0009-remove-extraneous-semicolon.patch + # avoid linker errors on windows + - patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch # [win] build: number: "{{ build_num }}" diff --git a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch index e303856..527beeb 100644 --- a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch +++ b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch @@ -1,7 +1,7 @@ -From 1b26dcff9774541c0c5739a02c97a527964c1d87 Mon Sep 17 00:00:00 2001 +From 45d55d2af456d441fc284c19322f2f3a760cb2d0 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 22 Nov 2018 19:39:51 -0600 -Subject: [PATCH 1/8] Avoid setting current_version and compatibility_version +Subject: [PATCH 01/10] Avoid setting current_version and compatibility_version on OSX --- @@ -12,7 +12,7 @@ Subject: [PATCH 1/8] Avoid setting current_version and compatibility_version 4 files changed, 14 deletions(-) diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt -index 41c48043..bdc49b91 100644 +index 41c480432..bdc49b915 100644 --- a/BLAS/SRC/CMakeLists.txt +++ b/BLAS/SRC/CMakeLists.txt @@ -98,9 +98,4 @@ endif() @@ -26,7 +26,7 @@ index 41c48043..bdc49b91 100644 - ) lapack_install_library(blas) diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt -index 90e19f81..b31a2da0 100644 +index 90e19f818..b31a2da0f 100644 --- a/CBLAS/src/CMakeLists.txt +++ b/CBLAS/src/CMakeLists.txt @@ -117,8 +117,6 @@ add_library(cblas ${SOURCES}) @@ -39,7 +39,7 @@ index 90e19f81..b31a2da0 100644 target_include_directories(cblas PUBLIC $ diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt -index 0589a74b..6ba4a2e9 100644 +index 0589a74ba..6ba4a2e9a 100644 --- a/LAPACKE/CMakeLists.txt +++ b/LAPACKE/CMakeLists.txt @@ -76,8 +76,6 @@ add_library(lapacke ${SOURCES}) @@ -52,7 +52,7 @@ index 0589a74b..6ba4a2e9 100644 target_include_directories(lapacke PUBLIC $ diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt -index f19bdd30..b9aa7784 100644 +index f19bdd302..b9aa77844 100644 --- a/SRC/CMakeLists.txt +++ b/SRC/CMakeLists.txt @@ -501,11 +501,6 @@ endif() @@ -67,6 +67,3 @@ index f19bdd30..b9aa7784 100644 if(USE_XBLAS) target_link_libraries(lapack PRIVATE ${XBLAS_LIBRARY}) --- -2.26.2.windows.1 - diff --git a/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch index c6d66a7..936071c 100644 --- a/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch +++ b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch @@ -1,7 +1,7 @@ -From 9ba3335009a801bae4b6dcb3df2cbdf47015f462 Mon Sep 17 00:00:00 2001 +From c903754fc57b1a13c8f1d4570a39b928d00454f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Sat, 23 Nov 2019 12:22:20 +0100 -Subject: [PATCH 2/8] Restore missing prototypes for deprecated LAPACK +Subject: [PATCH 02/10] Restore missing prototypes for deprecated LAPACK functions Some LAPACK functions prototypes were inadvertedly dropped in 3.9.0. As a @@ -15,7 +15,7 @@ Squash of lapack#367, lapack#434 & lapack#437 1 file changed, 161 insertions(+), 21 deletions(-) diff --git a/LAPACKE/include/lapack.h b/LAPACKE/include/lapack.h -index 3f425325..9a8f46bb 100644 +index 3f425325f..9a8f46bb1 100644 --- a/LAPACKE/include/lapack.h +++ b/LAPACKE/include/lapack.h @@ -12,27 +12,6 @@ @@ -251,6 +251,3 @@ index 3f425325..9a8f46bb 100644 #define LAPACK_cggsvp3 LAPACK_GLOBAL(cggsvp3,CGGSVP3) void LAPACK_cggsvp3( char const* jobu, char const* jobv, char const* jobq, --- -2.26.2.windows.1 - diff --git a/recipe/patches/0003-Fix-MinGW-build-error.patch b/recipe/patches/0003-Fix-MinGW-build-error.patch index 6eb19b4..002624c 100644 --- a/recipe/patches/0003-Fix-MinGW-build-error.patch +++ b/recipe/patches/0003-Fix-MinGW-build-error.patch @@ -1,7 +1,7 @@ -From 769a9c4cc8a7da9a46b9bd7db21968fdfe411cc6 Mon Sep 17 00:00:00 2001 +From f0a4318be913a6cdd6492c0129e4b1ebdf942bdb Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Mon, 25 Nov 2019 19:41:16 +0100 -Subject: [PATCH 3/8] Fix MinGW build error +Subject: [PATCH 03/10] Fix MinGW build error With MinGW the build fails for some LAPACKE xgesvd routines with: lapacke_cgesvdq.c:74:5: error: aggregate value used where an integer was expected @@ -12,7 +12,7 @@ Seems the C2INT macro is useful there. 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LAPACKE/src/lapacke_cgesvdq.c b/LAPACKE/src/lapacke_cgesvdq.c -index 80156945..6ecd0696 100644 +index 801569453..6ecd06962 100644 --- a/LAPACKE/src/lapacke_cgesvdq.c +++ b/LAPACKE/src/lapacke_cgesvdq.c @@ -71,7 +71,7 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp, @@ -25,7 +25,7 @@ index 80156945..6ecd0696 100644 /* Allocate memory for work arrays */ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork ); diff --git a/LAPACKE/src/lapacke_zgesvdq.c b/LAPACKE/src/lapacke_zgesvdq.c -index 7c205dab..1674138f 100644 +index 7c205dab3..1674138fc 100644 --- a/LAPACKE/src/lapacke_zgesvdq.c +++ b/LAPACKE/src/lapacke_zgesvdq.c @@ -71,7 +71,7 @@ lapack_int LAPACKE_zgesvdq( int matrix_layout, char joba, char jobp, @@ -37,6 +37,3 @@ index 7c205dab..1674138f 100644 lrwork = (lapack_int)rwork_query; /* Allocate memory for work arrays */ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork ); --- -2.26.2.windows.1 - diff --git a/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch index 9e2c318..dc400c9 100644 --- a/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch +++ b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch @@ -1,7 +1,7 @@ -From e30d1c9ca0c08ab3559015cb33621b7f28ba801b Mon Sep 17 00:00:00 2001 +From 0b90108cb26142d6f18c21e418ad3c0a03086158 Mon Sep 17 00:00:00 2001 From: pdalgd <55156186+pdalgd@users.noreply.github.com> Date: Fri, 21 Feb 2020 13:24:37 +0100 -Subject: [PATCH 4/8] NaN not propagating in DCOMBSSQ and SCOMBSSQ +Subject: [PATCH 04/10] NaN not propagating in DCOMBSSQ and SCOMBSSQ --- SRC/dcombssq.f | 2 ++ @@ -9,7 +9,7 @@ Subject: [PATCH 4/8] NaN not propagating in DCOMBSSQ and SCOMBSSQ 2 files changed, 4 insertions(+) diff --git a/SRC/dcombssq.f b/SRC/dcombssq.f -index 79f6d95c..980a80e6 100644 +index 79f6d95c9..980a80e66 100644 --- a/SRC/dcombssq.f +++ b/SRC/dcombssq.f @@ -80,6 +80,8 @@ @@ -22,7 +22,7 @@ index 79f6d95c..980a80e6 100644 ELSE V1( 2 ) = V2( 2 ) + ( V1( 1 ) / V2( 1 ) )**2 * V1( 2 ) diff --git a/SRC/scombssq.f b/SRC/scombssq.f -index 76bc0e32..cc51a324 100644 +index 76bc0e320..cc51a324b 100644 --- a/SRC/scombssq.f +++ b/SRC/scombssq.f @@ -80,6 +80,8 @@ @@ -34,6 +34,3 @@ index 76bc0e32..cc51a324 100644 END IF ELSE V1( 2 ) = V2( 2 ) + ( V1( 1 ) / V2( 1 ) )**2 * V1( 2 ) --- -2.26.2.windows.1 - diff --git a/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch index 87a5cba..83951bf 100644 --- a/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch +++ b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch @@ -1,14 +1,14 @@ -From e69f944b6b4df8f8dd0ef4de6574ec201b415af3 Mon Sep 17 00:00:00 2001 +From 3f17ea8a00a81492f4e01b16edd2b4f0a5138395 Mon Sep 17 00:00:00 2001 From: Ilhan Polat Date: Mon, 27 Apr 2020 12:36:59 +0200 -Subject: [PATCH 5/8] Fix the loop index scalar in ZHEEQUB.f +Subject: [PATCH 05/10] Fix the loop index scalar in ZHEEQUB.f --- SRC/zheequb.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SRC/zheequb.f b/SRC/zheequb.f -index d698232e..7d719f41 100644 +index d698232e8..7d719f41e 100644 --- a/SRC/zheequb.f +++ b/SRC/zheequb.f @@ -271,7 +271,7 @@ @@ -20,6 +20,3 @@ index d698232e..7d719f41 100644 WORK( I ) = S( I-N ) * WORK( I-N ) - AVG END DO CALL ZLASSQ( N, WORK( N+1 ), 1, SCALE, SUMSQ ) --- -2.26.2.windows.1 - diff --git a/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch index c74d34b..32d0b2a 100644 --- a/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch +++ b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch @@ -1,7 +1,7 @@ -From a6666421568ea9eaa9a1b880cf33579a88ba808c Mon Sep 17 00:00:00 2001 +From 1979f4abf0b9080c9f935152f64d0c70a5a9ee24 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 26 Apr 2020 00:57:37 +0200 -Subject: [PATCH 6/8] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq +Subject: [PATCH 06/10] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq For LAPACKE_cgesvdq, align datatype of `rwork` with lapacke.h and callsite in LAPACKE_cgesvdq_work; both of the latter use `float* rwork`, so there's @@ -17,7 +17,7 @@ https://github.com/Reference-LAPACK/lapack/blob/v3.9.0/SRC/zgesvdq.f#L422 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LAPACKE/include/lapack.h b/LAPACKE/include/lapack.h -index 9a8f46bb..aedaa308 100644 +index 9a8f46bb1..aedaa308d 100644 --- a/LAPACKE/include/lapack.h +++ b/LAPACKE/include/lapack.h @@ -2513,7 +2513,7 @@ void LAPACK_zgesvdq( @@ -30,7 +30,7 @@ index 9a8f46bb..aedaa308 100644 lapack_int* info ); diff --git a/LAPACKE/src/lapacke_cgesvdq.c b/LAPACKE/src/lapacke_cgesvdq.c -index 6ecd0696..eee945e4 100644 +index 6ecd06962..eee945e4b 100644 --- a/LAPACKE/src/lapacke_cgesvdq.c +++ b/LAPACKE/src/lapacke_cgesvdq.c @@ -47,8 +47,8 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp, @@ -53,6 +53,3 @@ index 6ecd0696..eee945e4 100644 if( rwork == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; --- -2.26.2.windows.1 - diff --git a/recipe/patches/0007-fix-workspace-query-in-dgelq.patch b/recipe/patches/0007-fix-workspace-query-in-dgelq.patch index 067e376..1cf88cf 100644 --- a/recipe/patches/0007-fix-workspace-query-in-dgelq.patch +++ b/recipe/patches/0007-fix-workspace-query-in-dgelq.patch @@ -1,7 +1,7 @@ -From b073e7b969d2e425483a2225aba8f78f9fef3c0f Mon Sep 17 00:00:00 2001 +From b1a96d4f048521026138b787576cbfe972a46fcc Mon Sep 17 00:00:00 2001 From: Thijs Steel Date: Wed, 16 Sep 2020 12:14:21 +0200 -Subject: [PATCH 7/8] fix workspace query in dgelq +Subject: [PATCH 07/10] fix workspace query in dgelq --- SRC/cgelq.f | 28 ++++++++++++++++++++-------- @@ -15,7 +15,7 @@ Subject: [PATCH 7/8] fix workspace query in dgelq 8 files changed, 84 insertions(+), 36 deletions(-) diff --git a/SRC/cgelq.f b/SRC/cgelq.f -index c3b2238b..0c8a18ed 100644 +index c3b2238bf..0c8a18ed1 100644 --- a/SRC/cgelq.f +++ b/SRC/cgelq.f @@ -187,7 +187,7 @@ @@ -94,7 +94,7 @@ index c3b2238b..0c8a18ed 100644 RETURN * diff --git a/SRC/cgetsls.f b/SRC/cgetsls.f -index 3d783be6..01de3c98 100644 +index 3d783be66..01de3c984 100644 --- a/SRC/cgetsls.f +++ b/SRC/cgetsls.f @@ -261,7 +261,7 @@ @@ -107,7 +107,7 @@ index 3d783be6..01de3c98 100644 WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM diff --git a/SRC/dgelq.f b/SRC/dgelq.f -index fc14d892..cae24cfc 100644 +index fc14d892f..cae24cfce 100644 --- a/SRC/dgelq.f +++ b/SRC/dgelq.f @@ -187,7 +187,7 @@ @@ -186,7 +186,7 @@ index fc14d892..cae24cfc 100644 RETURN * diff --git a/SRC/dgetsls.f b/SRC/dgetsls.f -index dfc72c8b..c2ba5e2b 100644 +index dfc72c8b2..c2ba5e2b8 100644 --- a/SRC/dgetsls.f +++ b/SRC/dgetsls.f @@ -258,7 +258,7 @@ @@ -199,7 +199,7 @@ index dfc72c8b..c2ba5e2b 100644 WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM diff --git a/SRC/sgelq.f b/SRC/sgelq.f -index 96c4097e..aadf1412 100644 +index 96c4097e8..aadf14125 100644 --- a/SRC/sgelq.f +++ b/SRC/sgelq.f @@ -187,7 +187,7 @@ @@ -278,7 +278,7 @@ index 96c4097e..aadf1412 100644 * * End of SGELQ diff --git a/SRC/sgetsls.f b/SRC/sgetsls.f -index 53d2f943..3bf08451 100644 +index 53d2f9431..3bf084515 100644 --- a/SRC/sgetsls.f +++ b/SRC/sgetsls.f @@ -258,7 +258,7 @@ @@ -291,7 +291,7 @@ index 53d2f943..3bf08451 100644 WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM diff --git a/SRC/zgelq.f b/SRC/zgelq.f -index 4e7e7e38..e0e7512a 100644 +index 4e7e7e38e..e0e7512aa 100644 --- a/SRC/zgelq.f +++ b/SRC/zgelq.f @@ -187,7 +187,7 @@ @@ -370,7 +370,7 @@ index 4e7e7e38..e0e7512a 100644 RETURN * diff --git a/SRC/zgetsls.f b/SRC/zgetsls.f -index 1aab3c66..11233785 100644 +index 1aab3c662..11233785b 100644 --- a/SRC/zgetsls.f +++ b/SRC/zgetsls.f @@ -261,7 +261,7 @@ @@ -382,6 +382,3 @@ index 1aab3c66..11233785 100644 LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM --- -2.26.2.windows.1 - diff --git a/recipe/patches/0008-fix-dlanv2.patch b/recipe/patches/0008-fix-dlanv2.patch index d50d12f..41d4c16 100644 --- a/recipe/patches/0008-fix-dlanv2.patch +++ b/recipe/patches/0008-fix-dlanv2.patch @@ -1,7 +1,7 @@ -From b00f9da24e1aaefdfb492b23c1ada78ad045e64f Mon Sep 17 00:00:00 2001 +From 8ca1c363c61ac2bb6401a743678a71ab31dec70b Mon Sep 17 00:00:00 2001 From: thijs Date: Fri, 18 Sep 2020 11:19:12 +0200 -Subject: [PATCH 8/8] fix-dlanv2 +Subject: [PATCH 08/10] fix-dlanv2 --- SRC/dlanv2.f | 28 ++++++++++++++++++++++++++-- @@ -9,7 +9,7 @@ Subject: [PATCH 8/8] fix-dlanv2 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/SRC/dlanv2.f b/SRC/dlanv2.f -index d68481f7..61b016f1 100644 +index d68481f7e..2a7072ac1 100644 --- a/SRC/dlanv2.f +++ b/SRC/dlanv2.f @@ -140,13 +140,16 @@ @@ -25,7 +25,7 @@ index d68481f7..61b016f1 100644 * .. Local Scalars .. DOUBLE PRECISION AA, BB, BCMAX, BCMIS, CC, CS1, DD, EPS, P, SAB, - $ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z -+ $ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z, SAFMIN, ++ $ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z, SAFMIN, + $ SAFMN2, SAFMX2 + INTEGER COUNT * .. @@ -69,7 +69,7 @@ index d68481f7..61b016f1 100644 CS = SQRT( HALF*( ONE+ABS( SIGMA ) / TAU ) ) SN = -( P / ( TAU*CS ) )*SIGN( ONE, SIGMA ) diff --git a/SRC/slanv2.f b/SRC/slanv2.f -index 1163446f..e678305f 100644 +index 1163446fa..46700e235 100644 --- a/SRC/slanv2.f +++ b/SRC/slanv2.f @@ -140,13 +140,16 @@ @@ -85,7 +85,7 @@ index 1163446f..e678305f 100644 * .. Local Scalars .. REAL AA, BB, BCMAX, BCMIS, CC, CS1, DD, EPS, P, SAB, - $ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z -+ $ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z, SAFMIN, ++ $ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z, SAFMIN, + $ SAFMN2, SAFMX2 + INTEGER COUNT * .. @@ -128,6 +128,3 @@ index 1163446f..e678305f 100644 TAU = SLAPY2( SIGMA, TEMP ) CS = SQRT( HALF*( ONE+ABS( SIGMA ) / TAU ) ) SN = -( P / ( TAU*CS ) )*SIGN( ONE, SIGMA ) --- -2.26.2.windows.1 - diff --git a/recipe/patches/pr391.patch b/recipe/patches/0009-remove-extraneous-semicolon.patch similarity index 87% rename from recipe/patches/pr391.patch rename to recipe/patches/0009-remove-extraneous-semicolon.patch index d878097..4f88419 100644 --- a/recipe/patches/pr391.patch +++ b/recipe/patches/0009-remove-extraneous-semicolon.patch @@ -1,7 +1,7 @@ -From 64e8a7500d817869e5fcde35afd39af8bc7a8086 Mon Sep 17 00:00:00 2001 +From 8824b73924b7c3294d1a061e5919d1c6bcacc484 Mon Sep 17 00:00:00 2001 From: Iain Hibbert Date: Sun, 23 Feb 2020 21:39:25 +0000 -Subject: [PATCH] remove extraneous semicolon +Subject: [PATCH 09/10] remove extraneous semicolon this semicolon causes a test to fail with read error, using g95 --- @@ -9,7 +9,7 @@ this semicolon causes a test to fail with read error, using g95 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TESTING/dbal.in b/TESTING/dbal.in -index c00fe3e83b..828629b150 100644 +index c00fe3e83..828629b15 100644 --- a/TESTING/dbal.in +++ b/TESTING/dbal.in @@ -209,6 +209,6 @@ DBL: Tests DGEBAL diff --git a/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch b/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch new file mode 100644 index 0000000..420a74c --- /dev/null +++ b/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch @@ -0,0 +1,122 @@ +From 729749ad7fa884a233cffb9c242e70975d5c65aa Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Sat, 26 Oct 2024 20:13:34 +1100 +Subject: [PATCH 10/10] don't declare RowMajorStrg as extern on windows + +on platforms with HAS_ATTRIBUTE_WEAK_SUPPORT, this presumably plays a role in +the linker shenanigans with cblas_xerbla, but on windows it just blows up +--- + CBLAS/testing/c_c2chke.c | 2 +- + CBLAS/testing/c_c3chke.c | 2 +- + CBLAS/testing/c_d2chke.c | 2 +- + CBLAS/testing/c_d3chke.c | 2 +- + CBLAS/testing/c_s2chke.c | 2 +- + CBLAS/testing/c_s3chke.c | 2 +- + CBLAS/testing/c_z2chke.c | 2 +- + CBLAS/testing/c_z3chke.c | 2 +- + 8 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/CBLAS/testing/c_c2chke.c b/CBLAS/testing/c_c2chke.c +index 28b771980..9a26ece56 100644 +--- a/CBLAS/testing/c_c2chke.c ++++ b/CBLAS/testing/c_c2chke.c +@@ -33,7 +33,7 @@ void F77_c2chke(char *rout) { + BETA[2] = {0.0,0.0}, + RALPHA = 0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + if (link_xerbla) /* call these first to link */ +diff --git a/CBLAS/testing/c_c3chke.c b/CBLAS/testing/c_c3chke.c +index 1be0c3fd1..29cf86ee8 100644 +--- a/CBLAS/testing/c_c3chke.c ++++ b/CBLAS/testing/c_c3chke.c +@@ -33,7 +33,7 @@ void F77_c3chke(char * rout) { + BETA[2] = {0.0,0.0}, + RALPHA = 0.0, RBETA = 0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + cblas_ok = TRUE ; +diff --git a/CBLAS/testing/c_d2chke.c b/CBLAS/testing/c_d2chke.c +index d989811d2..4d6c122f0 100644 +--- a/CBLAS/testing/c_d2chke.c ++++ b/CBLAS/testing/c_d2chke.c +@@ -31,7 +31,7 @@ void F77_d2chke(char *rout) { + Y[2] = {0.0,0.0}, + ALPHA=0.0, BETA=0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + if (link_xerbla) /* call these first to link */ +diff --git a/CBLAS/testing/c_d3chke.c b/CBLAS/testing/c_d3chke.c +index e41901e79..bf155684e 100644 +--- a/CBLAS/testing/c_d3chke.c ++++ b/CBLAS/testing/c_d3chke.c +@@ -31,7 +31,7 @@ void F77_d3chke(char *rout) { + C[2] = {0.0,0.0}, + ALPHA=0.0, BETA=0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + if (link_xerbla) /* call these first to link */ +diff --git a/CBLAS/testing/c_s2chke.c b/CBLAS/testing/c_s2chke.c +index 63f167152..11c6af7e1 100644 +--- a/CBLAS/testing/c_s2chke.c ++++ b/CBLAS/testing/c_s2chke.c +@@ -31,7 +31,7 @@ void F77_s2chke(char *rout) { + Y[2] = {0.0,0.0}, + ALPHA=0.0, BETA=0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + if (link_xerbla) /* call these first to link */ +diff --git a/CBLAS/testing/c_s3chke.c b/CBLAS/testing/c_s3chke.c +index 1872f005c..bd09a8041 100644 +--- a/CBLAS/testing/c_s3chke.c ++++ b/CBLAS/testing/c_s3chke.c +@@ -31,7 +31,7 @@ void F77_s3chke(char *rout) { + C[2] = {0.0,0.0}, + ALPHA=0.0, BETA=0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + if (link_xerbla) /* call these first to link */ +diff --git a/CBLAS/testing/c_z2chke.c b/CBLAS/testing/c_z2chke.c +index d51c7c267..8a888be95 100644 +--- a/CBLAS/testing/c_z2chke.c ++++ b/CBLAS/testing/c_z2chke.c +@@ -33,7 +33,7 @@ void F77_z2chke(char *rout) { + BETA[2] = {0.0,0.0}, + RALPHA = 0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + if (link_xerbla) /* call these first to link */ +diff --git a/CBLAS/testing/c_z3chke.c b/CBLAS/testing/c_z3chke.c +index 10078a103..bf8a6f9b3 100644 +--- a/CBLAS/testing/c_z3chke.c ++++ b/CBLAS/testing/c_z3chke.c +@@ -33,7 +33,7 @@ void F77_z3chke(char * rout) { + BETA[2] = {0.0,0.0}, + RALPHA = 0.0, RBETA = 0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + cblas_ok = TRUE ; From bdd9ae383c0d55b99ab4ffd0f1e7af4adee72bac Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 26 Oct 2024 20:19:34 +1100 Subject: [PATCH 06/15] bump build number --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 495bac2..6b15bdc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ {% set version = "3.9.0" %} # if build_num is reset to 0 (for new version), update increment for blas_minor below -{% set build_num = 7 %} +{% set build_num = 8 %} {% set version_major = version.split(".")[0] %} # blas_major denotes major infrastructural change to how blas is managed {% set blas_major = "2" %} From 8274e40570c718d3b8cda20282367f5d5276691d Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 26 Oct 2024 23:17:54 +1100 Subject: [PATCH 07/15] use __declspec(selectany) in cblas_xerbla on windows see https://stackoverflow.com/a/2290838 --- recipe/meta.yaml | 2 ++ ...rrent_version-and-compatibility_vers.patch | 2 +- ...prototypes-for-deprecated-LAPACK-fun.patch | 2 +- .../patches/0003-Fix-MinGW-build-error.patch | 2 +- ...propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch | 2 +- ...x-the-loop-index-scalar-in-ZHEEQUB.f.patch | 2 +- ...nconsistencies-in-LAPACK-E-_-cz-gesv.patch | 2 +- .../0007-fix-workspace-query-in-dgelq.patch | 2 +- recipe/patches/0008-fix-dlanv2.patch | 2 +- .../0009-remove-extraneous-semicolon.patch | 2 +- ...re-RowMajorStrg-as-extern-on-windows.patch | 2 +- ...electany-for-cblas_xerbla-s-RowMajor.patch | 23 +++++++++++++++++++ 12 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6b15bdc..59048b0 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -47,6 +47,8 @@ source: - patches/0009-remove-extraneous-semicolon.patch # avoid linker errors on windows - patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch # [win] + # make xerbla-shenanigans work on windows + - patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch # [win] build: number: "{{ build_num }}" diff --git a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch index 527beeb..1e88a5e 100644 --- a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch +++ b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch @@ -1,7 +1,7 @@ From 45d55d2af456d441fc284c19322f2f3a760cb2d0 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 22 Nov 2018 19:39:51 -0600 -Subject: [PATCH 01/10] Avoid setting current_version and compatibility_version +Subject: [PATCH 01/11] Avoid setting current_version and compatibility_version on OSX --- diff --git a/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch index 936071c..4d37a34 100644 --- a/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch +++ b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch @@ -1,7 +1,7 @@ From c903754fc57b1a13c8f1d4570a39b928d00454f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Sat, 23 Nov 2019 12:22:20 +0100 -Subject: [PATCH 02/10] Restore missing prototypes for deprecated LAPACK +Subject: [PATCH 02/11] Restore missing prototypes for deprecated LAPACK functions Some LAPACK functions prototypes were inadvertedly dropped in 3.9.0. As a diff --git a/recipe/patches/0003-Fix-MinGW-build-error.patch b/recipe/patches/0003-Fix-MinGW-build-error.patch index 002624c..a6e1c8a 100644 --- a/recipe/patches/0003-Fix-MinGW-build-error.patch +++ b/recipe/patches/0003-Fix-MinGW-build-error.patch @@ -1,7 +1,7 @@ From f0a4318be913a6cdd6492c0129e4b1ebdf942bdb Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Mon, 25 Nov 2019 19:41:16 +0100 -Subject: [PATCH 03/10] Fix MinGW build error +Subject: [PATCH 03/11] Fix MinGW build error With MinGW the build fails for some LAPACKE xgesvd routines with: lapacke_cgesvdq.c:74:5: error: aggregate value used where an integer was expected diff --git a/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch index dc400c9..d5599ce 100644 --- a/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch +++ b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch @@ -1,7 +1,7 @@ From 0b90108cb26142d6f18c21e418ad3c0a03086158 Mon Sep 17 00:00:00 2001 From: pdalgd <55156186+pdalgd@users.noreply.github.com> Date: Fri, 21 Feb 2020 13:24:37 +0100 -Subject: [PATCH 04/10] NaN not propagating in DCOMBSSQ and SCOMBSSQ +Subject: [PATCH 04/11] NaN not propagating in DCOMBSSQ and SCOMBSSQ --- SRC/dcombssq.f | 2 ++ diff --git a/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch index 83951bf..cfe6c23 100644 --- a/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch +++ b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch @@ -1,7 +1,7 @@ From 3f17ea8a00a81492f4e01b16edd2b4f0a5138395 Mon Sep 17 00:00:00 2001 From: Ilhan Polat Date: Mon, 27 Apr 2020 12:36:59 +0200 -Subject: [PATCH 05/10] Fix the loop index scalar in ZHEEQUB.f +Subject: [PATCH 05/11] Fix the loop index scalar in ZHEEQUB.f --- SRC/zheequb.f | 2 +- diff --git a/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch index 32d0b2a..868373d 100644 --- a/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch +++ b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch @@ -1,7 +1,7 @@ From 1979f4abf0b9080c9f935152f64d0c70a5a9ee24 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 26 Apr 2020 00:57:37 +0200 -Subject: [PATCH 06/10] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq +Subject: [PATCH 06/11] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq For LAPACKE_cgesvdq, align datatype of `rwork` with lapacke.h and callsite in LAPACKE_cgesvdq_work; both of the latter use `float* rwork`, so there's diff --git a/recipe/patches/0007-fix-workspace-query-in-dgelq.patch b/recipe/patches/0007-fix-workspace-query-in-dgelq.patch index 1cf88cf..602a812 100644 --- a/recipe/patches/0007-fix-workspace-query-in-dgelq.patch +++ b/recipe/patches/0007-fix-workspace-query-in-dgelq.patch @@ -1,7 +1,7 @@ From b1a96d4f048521026138b787576cbfe972a46fcc Mon Sep 17 00:00:00 2001 From: Thijs Steel Date: Wed, 16 Sep 2020 12:14:21 +0200 -Subject: [PATCH 07/10] fix workspace query in dgelq +Subject: [PATCH 07/11] fix workspace query in dgelq --- SRC/cgelq.f | 28 ++++++++++++++++++++-------- diff --git a/recipe/patches/0008-fix-dlanv2.patch b/recipe/patches/0008-fix-dlanv2.patch index 41d4c16..db77cfd 100644 --- a/recipe/patches/0008-fix-dlanv2.patch +++ b/recipe/patches/0008-fix-dlanv2.patch @@ -1,7 +1,7 @@ From 8ca1c363c61ac2bb6401a743678a71ab31dec70b Mon Sep 17 00:00:00 2001 From: thijs Date: Fri, 18 Sep 2020 11:19:12 +0200 -Subject: [PATCH 08/10] fix-dlanv2 +Subject: [PATCH 08/11] fix-dlanv2 --- SRC/dlanv2.f | 28 ++++++++++++++++++++++++++-- diff --git a/recipe/patches/0009-remove-extraneous-semicolon.patch b/recipe/patches/0009-remove-extraneous-semicolon.patch index 4f88419..9d642d1 100644 --- a/recipe/patches/0009-remove-extraneous-semicolon.patch +++ b/recipe/patches/0009-remove-extraneous-semicolon.patch @@ -1,7 +1,7 @@ From 8824b73924b7c3294d1a061e5919d1c6bcacc484 Mon Sep 17 00:00:00 2001 From: Iain Hibbert Date: Sun, 23 Feb 2020 21:39:25 +0000 -Subject: [PATCH 09/10] remove extraneous semicolon +Subject: [PATCH 09/11] remove extraneous semicolon this semicolon causes a test to fail with read error, using g95 --- diff --git a/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch b/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch index 420a74c..4d8d5cf 100644 --- a/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch +++ b/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch @@ -1,7 +1,7 @@ From 729749ad7fa884a233cffb9c242e70975d5c65aa Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 26 Oct 2024 20:13:34 +1100 -Subject: [PATCH 10/10] don't declare RowMajorStrg as extern on windows +Subject: [PATCH 10/11] don't declare RowMajorStrg as extern on windows on platforms with HAS_ATTRIBUTE_WEAK_SUPPORT, this presumably plays a role in the linker shenanigans with cblas_xerbla, but on windows it just blows up diff --git a/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch b/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch new file mode 100644 index 0000000..8986b9d --- /dev/null +++ b/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch @@ -0,0 +1,23 @@ +From ed1059d1c19dc63d2c9956781ad5b10ba06569b9 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Sun, 27 Oct 2024 00:15:33 +1100 +Subject: [PATCH 11/11] use __declspec(selectany) for cblas_xerbla's + RowMajorStrg on windows + +--- + CBLAS/testing/c_xerbla.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CBLAS/testing/c_xerbla.c b/CBLAS/testing/c_xerbla.c +index 0ba5264db..86ef142cb 100644 +--- a/CBLAS/testing/c_xerbla.c ++++ b/CBLAS/testing/c_xerbla.c +@@ -9,7 +9,7 @@ void cblas_xerbla(int info, const char *rout, const char *form, ...) + { + extern int cblas_lerr, cblas_info, cblas_ok; + extern int link_xerbla; +- extern int RowMajorStrg; ++ extern __declspec(selectany) int RowMajorStrg; + extern char *cblas_rout; + + /* Initially, c__3chke will call this routine with From ebff8dac10adb2f01d62bbd9b2a56bb341aae168 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 27 Oct 2024 06:38:32 +1100 Subject: [PATCH 08/15] update `files:` spec and tests --- recipe/meta.yaml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 59048b0..2876f30 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -89,9 +89,8 @@ outputs: - lib/libblas.dylib # [osx] - lib/libblas.{{ version_major }}.dylib # [osx] - lib/libblas.{{ version }}.dylib # [osx] - - Library/bin/libblas.dll # [win] + - Library/bin/blas.dll # [win] - Library/lib/blas.lib # [win] - - Library/lib/libblas.dll.a # [win] test: commands: - echo "no need to revalidate `files:` specification" @@ -118,8 +117,8 @@ outputs: - lib/libtmglib.dylib # [osx] - lib/libtmglib.{{ version_major }}.dylib # [osx] - lib/libtmglib.{{ version }}.dylib # [osx] - - Library/bin/libtmglib.dll # [win] - - Library/lib/libtmglib.dll.a # [win] + - Library/bin/tmglib.dll # [win] + - Library/lib/tmglib.lib # [win] test: commands: - echo "no need to revalidate `files:` specification" @@ -149,9 +148,8 @@ outputs: - lib/libcblas.dylib # [osx] - lib/libcblas.{{ version_major }}.dylib # [osx] - lib/libcblas.{{ version }}.dylib # [osx] - - Library/bin/libcblas.dll # [win] + - Library/bin/cblas.dll # [win] - Library/lib/cblas.lib # [win] - - Library/lib/libcblas.dll.a # [win] test: commands: - echo "no need to revalidate `files:` specification" @@ -180,9 +178,8 @@ outputs: - lib/liblapack.dylib # [osx] - lib/liblapack.{{ version_major }}.dylib # [osx] - lib/liblapack.{{ version }}.dylib # [osx] - - Library/bin/liblapack.dll # [win] + - Library/bin/lapack.dll # [win] - Library/lib/lapack.lib # [win] - - Library/lib/liblapack.dll.a # [win] test: commands: - echo "no need to revalidate `files:` specification" @@ -214,9 +211,8 @@ outputs: - lib/liblapacke.dylib # [osx] - lib/liblapacke.{{ version_major }}.dylib # [osx] - lib/liblapacke.{{ version }}.dylib # [osx] - - Library/bin/liblapacke.dll # [win] + - Library/bin/lapacke.dll # [win] - Library/lib/lapacke.lib # [win] - - Library/lib/liblapacke.dll.a # [win] test: commands: - echo "no need to revalidate `files:` specification" @@ -262,9 +258,9 @@ outputs: - test -f $PREFIX/lib/lib{{ each_lib }}.{{ version_major }}.dylib # [osx] - test -f $PREFIX/lib/lib{{ each_lib }}.{{ version }}.dylib # [osx] - test -f $PREFIX/lib/pkgconfig/{{ each_lib }}.pc # [unix] - - if not exist "%LIBRARY_LIB%\\pkgconfig\\{{ each_lib }}.pc" exit 1 # [win] - - if not exist "%LIBRARY_LIB%\\{{ each_lib }}.lib" exit 1 # [win] - - if not exist "%LIBRARY_BIN%\\lib{{ each_lib }}.dll" exit 1 # [win] + - if not exist %LIBRARY_LIB%\pkgconfig\{{ each_lib }}.pc exit 1 # [win] + - if not exist %LIBRARY_LIB%\{{ each_lib }}.lib exit 1 # [win] + - if not exist %LIBRARY_BIN%\{{ each_lib }}.dll exit 1 # [win] {% endfor %} # For compatiblity (see #33) From aa4f3bd2bd01e51699f81a5db60569fd2a3a6d65 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 27 Oct 2024 07:40:52 +1100 Subject: [PATCH 09/15] add host deps to ensure a clean(er) link check --- recipe/meta.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2876f30..a8e28e9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -108,6 +108,12 @@ outputs: - {{ stdlib("c") }} - {{ compiler("c") }} - {{ compiler("fortran") }} + host: + - {{ pin_subpackage("libblas", exact=True) }} + - {{ pin_subpackage("liblapack", exact=True) }} + run: + - libblas {{ version }} + - liblapack {{ version }} run_constrained: - blas * netlib files: @@ -136,6 +142,8 @@ outputs: - {{ stdlib("c") }} - {{ compiler("c") }} - {{ compiler("fortran") }} + host: + - {{ pin_subpackage("libblas", exact=True) }} run: - libblas {{ version }}.* files: @@ -167,6 +175,8 @@ outputs: - {{ stdlib("c") }} - {{ compiler("c") }} - {{ compiler("fortran") }} + host: + - {{ pin_subpackage("libblas", exact=True) }} run: - libblas {{ version }}.* files: @@ -197,6 +207,8 @@ outputs: - {{ stdlib("c") }} - {{ compiler("c") }} - {{ compiler("fortran") }} + host: + - {{ pin_subpackage("liblapack", exact=True) }} run: - libblas {{ version }}.* - libcblas {{ version }}.* From ee9df163a8b8e2a68c9003ecfbaecfbe1e5c4c2c Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 5 Nov 2024 12:05:35 +1100 Subject: [PATCH 10/15] MNT: Re-rendered with conda-build 24.9.0, conda-smithy 3.43.2, and conda-forge-pinning 2024.11.04.16.29.58 --- .azure-pipelines/azure-pipelines-osx.yml | 2 +- .azure-pipelines/azure-pipelines-win.yml | 19 ++--------- .ci_support/linux_64_.yaml | 8 ++--- .ci_support/linux_aarch64_.yaml | 4 +-- .ci_support/linux_ppc64le_.yaml | 4 +-- .ci_support/osx_64_.yaml | 4 +-- .ci_support/osx_arm64_.yaml | 4 +-- .ci_support/win_64_.yaml | 20 +++++------ .scripts/build_steps.sh | 17 +++++----- .scripts/run_osx_build.sh | 43 +++++++++++++++--------- .scripts/run_win_build.bat | 41 ++++++++++++++++------ azure-pipelines.yml | 33 +++++++++++++++--- build-locally.py | 9 +++-- 13 files changed, 124 insertions(+), 84 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 7708e23..ac0bf38 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,7 +5,7 @@ jobs: - job: osx pool: - vmImage: macOS-12 + vmImage: macOS-13 strategy: matrix: osx_64_: diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index d609fcd..9901917 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -14,31 +14,16 @@ jobs: timeoutInMinutes: 360 variables: CONDA_BLD_PATH: D:\\bld\\ + MINIFORGE_HOME: D:\Miniforge UPLOAD_TEMP: D:\\tmp steps: - - task: PythonScript@0 - displayName: 'Download Miniforge' - inputs: - scriptSource: inline - script: | - import urllib.request - url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe' - path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" - urllib.request.urlretrieve(url, path) - - - script: | - start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge - displayName: Install Miniforge - - - powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts" - displayName: Add conda to PATH - - script: | call ".scripts\run_win_build.bat" displayName: Run Windows build env: + MINIFORGE_HOME: $(MINIFORGE_HOME) PYTHONUNBUFFERED: 1 CONFIG: $(CONFIG) CI: azure diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index ffe0c46..32e5dd9 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,13 +1,13 @@ c_compiler: - gcc c_compiler_version: -- '12' +- '13' c_stdlib: - sysroot c_stdlib_version: -- '2.12' +- '2.17' cdt_name: -- cos6 +- cos7 channel_sources: - conda-forge channel_targets: @@ -17,7 +17,7 @@ docker_image: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' target_platform: - linux-64 zip_keys: diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index e2bb838..04eee7a 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '12' +- '13' c_stdlib: - sysroot c_stdlib_version: @@ -21,7 +21,7 @@ docker_image: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' target_platform: - linux-aarch64 zip_keys: diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 4fd5669..a61cef1 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '12' +- '13' c_stdlib: - sysroot c_stdlib_version: @@ -17,7 +17,7 @@ docker_image: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' target_platform: - linux-ppc64le zip_keys: diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 29d5368..6e63c30 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -5,7 +5,7 @@ MACOSX_SDK_VERSION: c_compiler: - clang c_compiler_version: -- '16' +- '18' c_stdlib: - macosx_deployment_target c_stdlib_version: @@ -17,7 +17,7 @@ channel_targets: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' macos_machine: - x86_64-apple-darwin13.4.0 target_platform: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 0e85bef..4033390 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -5,7 +5,7 @@ MACOSX_SDK_VERSION: c_compiler: - clang c_compiler_version: -- '16' +- '18' c_stdlib: - macosx_deployment_target c_stdlib_version: @@ -17,7 +17,7 @@ channel_targets: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' macos_machine: - arm64-apple-darwin20.0.0 target_platform: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 931f5bc..0151107 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -1,18 +1,14 @@ +c_compiler: +- vs2019 +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: - conda-forge main -m2w64_c_compiler: -- gcc -m2w64_c_compiler_version: -- '13' -m2w64_c_stdlib: -- m2w64-sysroot -m2w64_c_stdlib_version: -- '12' -m2w64_fortran_compiler: -- gfortran -m2w64_fortran_compiler_version: -- '13' +fortran_compiler: +- flang +fortran_compiler_version: +- '19' target_platform: - win-64 diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 97dc8d9..f8051ab 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,18 +31,20 @@ pkgs_dirs: solver: libmamba CONDARC +mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d-%H-%M-%S) +echo > /opt/conda/conda-meta/history +micromamba install --root-prefix ~/.conda --prefix /opt/conda \ + --yes --override-channels --channel conda-forge --strict-channel-priority \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 -mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" - # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup + + # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -69,11 +71,10 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" - ( startgroup "Inspecting artifacts" ) 2> /dev/null - # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 - command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 0c9e992..cc73c21 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -7,28 +7,39 @@ source .scripts/logging_utils.sh set -xe MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} +MINIFORGE_HOME=${MINIFORGE_HOME%/} # remove trailing slash -( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null - -MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" -MINIFORGE_FILE="Mambaforge-MacOSX-$(uname -m).sh" -curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" -rm -rf ${MINIFORGE_HOME} -bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} - -( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null +( startgroup "Provisioning base env with micromamba" ) 2> /dev/null +MICROMAMBA_VERSION="1.5.10-0" +if [[ "$(uname -m)" == "arm64" ]]; then + osx_arch="osx-arm64" +else + osx_arch="osx-64" +fi +MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}" +MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)" +echo "Downloading micromamba ${MICROMAMBA_VERSION}" +micromamba_exe="$(mktemp -d)/micromamba" +curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}" +chmod +x "${micromamba_exe}" +echo "Creating environment" +"${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ + --channel conda-forge \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" +mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" +echo "Cleaning up micromamba" +rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true +( endgroup "Provisioning base env with micromamba" ) 2> /dev/null ( startgroup "Configuring conda" ) 2> /dev/null -source ${MINIFORGE_HOME}/etc/profile.d/conda.sh +source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" conda activate base export CONDA_SOLVER="libmamba" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 -mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + @@ -84,8 +95,8 @@ else ( startgroup "Inspecting artifacts" ) 2> /dev/null - # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 - command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index 24ef201..e3ee03e 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -3,30 +3,49 @@ :: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also :: benefit from the improvement. -:: Note: we assume a Miniforge installation is available - :: INPUTS (required environment variables) :: CONFIG: name of the .ci_support/*.yaml file for this job :: CI: azure, github_actions, or unset +:: MINIFORGE_HOME: where to install the base conda environment :: UPLOAD_PACKAGES: true or false :: UPLOAD_ON_BRANCH: true or false setlocal enableextensions enabledelayedexpansion +if "%MINIFORGE_HOME%"=="" set "MINIFORGE_HOME=%USERPROFILE%\Miniforge3" +:: Remove trailing backslash, if present +if "%MINIFORGE_HOME:~-1%"=="\" set "MINIFORGE_HOME=%MINIFORGE_HOME:~0,-1%" +call :start_group "Provisioning base env with micromamba" +set "MAMBA_ROOT_PREFIX=%MINIFORGE_HOME%-micromamba-%RANDOM%" +set "MICROMAMBA_VERSION=1.5.10-0" +set "MICROMAMBA_URL=https://github.com/mamba-org/micromamba-releases/releases/download/%MICROMAMBA_VERSION%/micromamba-win-64" +set "MICROMAMBA_TMPDIR=%TMP%\micromamba-%RANDOM%" +set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe" + +echo Downloading micromamba %MICROMAMBA_VERSION% +if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%" +certutil -urlcache -split -f "%MICROMAMBA_URL%" "%MICROMAMBA_EXE%" +if !errorlevel! neq 0 exit /b !errorlevel! + +echo Creating environment +call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefix "%MINIFORGE_HOME%" ^ + --channel conda-forge ^ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +if !errorlevel! neq 0 exit /b !errorlevel! +echo Removing %MAMBA_ROOT_PREFIX% +del /S /Q "%MAMBA_ROOT_PREFIX%" +del /S /Q "%MICROMAMBA_TMPDIR%" +call :end_group + call :start_group "Configuring conda" :: Activate the base conda environment -call activate base +call "%MINIFORGE_HOME%\Scripts\activate.bat" :: Configure the solver set "CONDA_SOLVER=libmamba" if !errorlevel! neq 0 exit /b !errorlevel! set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" -:: Provision the necessary dependencies to build the recipe later -echo Installing dependencies -mamba.exe install "python=3.10" pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -c conda-forge --strict-channel-priority --yes -if !errorlevel! neq 0 exit /b !errorlevel! - :: Set basic configuration echo Setting up configuration setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml @@ -43,7 +62,7 @@ if EXIST LICENSE.txt ( ) if NOT [%flow_run_id%] == [] ( - set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" ) call :end_group @@ -54,8 +73,8 @@ conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTR if !errorlevel! neq 0 exit /b !errorlevel! call :start_group "Inspecting artifacts" -:: inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 -WHERE inspect_artifacts >nul 2>nul && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" +:: inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 +WHERE inspect_artifacts >nul 2>nul && inspect_artifacts --recipe-dir ".\recipe" -m .ci_support\%CONFIG%.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" call :end_group :: Prepare some environment variables for the upload step diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e5306da..eff4ad6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,7 +2,32 @@ # update the conda-forge.yml and/or the recipe/meta.yaml. # -*- mode: yaml -*- -jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml - - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file +stages: +- stage: Check + jobs: + - job: Skip + pool: + vmImage: 'ubuntu-22.04' + variables: + DECODE_PERCENTS: 'false' + RET: 'true' + steps: + - checkout: self + fetchDepth: '2' + - bash: | + git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "` + echo "##vso[task.setvariable variable=log]$git_log" + displayName: Obtain commit message + - bash: echo "##vso[task.setvariable variable=RET]false" + condition: and(eq(variables['Build.Reason'], 'PullRequest'), or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))) + displayName: Skip build? + - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" + name: result + displayName: Export result +- stage: Build + condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) + dependsOn: Check + jobs: + - template: ./.azure-pipelines/azure-pipelines-linux.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml + - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index e0d408d..6788aea 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,13 +1,16 @@ -#!/usr/bin/env python3 +#!/bin/sh +"""exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on # # This file has been generated by conda-smithy in order to build the recipe # locally. # -import os +# The line above this comment is a bash / sh / zsh guard +# to stop people from running it with the wrong interpreter import glob +import os +import platform import subprocess from argparse import ArgumentParser -import platform def setup_environment(ns): From 45f12eb96dec811f213c4109055b8c2bb56c3212 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 5 Nov 2024 13:25:13 +1100 Subject: [PATCH 11/15] libtmglib lost its SOVERSION --- recipe/meta.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a8e28e9..7a1b6fa 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -121,8 +121,6 @@ outputs: - lib/libtmglib.so.{{ version_major }} # [linux] - lib/libtmglib.so.{{ version }} # [linux] - lib/libtmglib.dylib # [osx] - - lib/libtmglib.{{ version_major }}.dylib # [osx] - - lib/libtmglib.{{ version }}.dylib # [osx] - Library/bin/tmglib.dll # [win] - Library/lib/tmglib.lib # [win] test: From 59c906bfd47d90964056af9b27222b746f71f441 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 8 Nov 2024 06:34:27 +1100 Subject: [PATCH 12/15] Keep library naming as before This partially reverts commit ebff8dac10adb2f01d62bbd9b2a56bb341aae168. --- recipe/bld.bat | 7 ++ recipe/meta.yaml | 16 ++-- ...rrent_version-and-compatibility_vers.patch | 64 ++++++++++---- ...prototypes-for-deprecated-LAPACK-fun.patch | 4 +- .../patches/0003-Fix-MinGW-build-error.patch | 4 +- ...propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch | 4 +- ...x-the-loop-index-scalar-in-ZHEEQUB.f.patch | 4 +- ...nconsistencies-in-LAPACK-E-_-cz-gesv.patch | 4 +- .../0007-fix-workspace-query-in-dgelq.patch | 4 +- recipe/patches/0008-fix-dlanv2.patch | 4 +- .../0009-remove-extraneous-semicolon.patch | 4 +- ...re-RowMajorStrg-as-extern-on-windows.patch | 4 +- ...electany-for-cblas_xerbla-s-RowMajor.patch | 4 +- ...y-naming-as-before-switching-to-msvc.patch | 84 +++++++++++++++++++ 14 files changed, 167 insertions(+), 44 deletions(-) create mode 100644 recipe/patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch diff --git a/recipe/bld.bat b/recipe/bld.bat index d356c85..012b4ab 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -17,6 +17,13 @@ ninja -j%CPU_COUNT% ninja install if %ERRORLEVEL% NEQ 0 exit 1 +:: strip "lib" prefix from import libraries, in line with previous naming +move %LIBRARY_LIB%\libblas.lib %LIBRARY_LIB%\blas.lib +move %LIBRARY_LIB%\libcblas.lib %LIBRARY_LIB%\cblas.lib +move %LIBRARY_LIB%\liblapack.lib %LIBRARY_LIB%\lapack.lib +move %LIBRARY_LIB%\liblapacke.lib %LIBRARY_LIB%\lapacke.lib +move %LIBRARY_LIB%\libtmglib.lib %LIBRARY_LIB%\tmglib.lib + :: testing with shared libraries does not work - skip them. :: This is because: to test that the program exits if wrong parameters are given, :: the testsuite overrides the symbol xerbla (xerbla logs the error and exits) with diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7a1b6fa..cd4e225 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -23,7 +23,7 @@ source: sha256: 106087f1bb5f46afdfba7f569d0cbe23dacb9a07cd24733765a0e89dbe1ad573 patches: # Avoid setting current_version and compatibility_version - - patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch # [osx] + - patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch # # carry upstream patches for build errors/bugs; these can all be removed upon next release # ===FIX BUILD ERRORS=== @@ -49,6 +49,8 @@ source: - patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch # [win] # make xerbla-shenanigans work on windows - patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch # [win] + # keep things called libblas.dll & blas.lib (as with m2w64-compilers) + - patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch build: number: "{{ build_num }}" @@ -89,7 +91,7 @@ outputs: - lib/libblas.dylib # [osx] - lib/libblas.{{ version_major }}.dylib # [osx] - lib/libblas.{{ version }}.dylib # [osx] - - Library/bin/blas.dll # [win] + - Library/bin/libblas.dll # [win] - Library/lib/blas.lib # [win] test: commands: @@ -121,7 +123,7 @@ outputs: - lib/libtmglib.so.{{ version_major }} # [linux] - lib/libtmglib.so.{{ version }} # [linux] - lib/libtmglib.dylib # [osx] - - Library/bin/tmglib.dll # [win] + - Library/bin/libtmglib.dll # [win] - Library/lib/tmglib.lib # [win] test: commands: @@ -154,7 +156,7 @@ outputs: - lib/libcblas.dylib # [osx] - lib/libcblas.{{ version_major }}.dylib # [osx] - lib/libcblas.{{ version }}.dylib # [osx] - - Library/bin/cblas.dll # [win] + - Library/bin/libcblas.dll # [win] - Library/lib/cblas.lib # [win] test: commands: @@ -186,7 +188,7 @@ outputs: - lib/liblapack.dylib # [osx] - lib/liblapack.{{ version_major }}.dylib # [osx] - lib/liblapack.{{ version }}.dylib # [osx] - - Library/bin/lapack.dll # [win] + - Library/bin/liblapack.dll # [win] - Library/lib/lapack.lib # [win] test: commands: @@ -221,7 +223,7 @@ outputs: - lib/liblapacke.dylib # [osx] - lib/liblapacke.{{ version_major }}.dylib # [osx] - lib/liblapacke.{{ version }}.dylib # [osx] - - Library/bin/lapacke.dll # [win] + - Library/bin/liblapacke.dll # [win] - Library/lib/lapacke.lib # [win] test: commands: @@ -270,7 +272,7 @@ outputs: - test -f $PREFIX/lib/pkgconfig/{{ each_lib }}.pc # [unix] - if not exist %LIBRARY_LIB%\pkgconfig\{{ each_lib }}.pc exit 1 # [win] - if not exist %LIBRARY_LIB%\{{ each_lib }}.lib exit 1 # [win] - - if not exist %LIBRARY_BIN%\{{ each_lib }}.dll exit 1 # [win] + - if not exist %LIBRARY_BIN%\lib{{ each_lib }}.dll exit 1 # [win] {% endfor %} # For compatiblity (see #33) diff --git a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch index 1e88a5e..d09157a 100644 --- a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch +++ b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch @@ -1,21 +1,23 @@ -From 45d55d2af456d441fc284c19322f2f3a760cb2d0 Mon Sep 17 00:00:00 2001 +From add4fa0662dce4366dabe53d76ad84dd0652e34d Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 22 Nov 2018 19:39:51 -0600 -Subject: [PATCH 01/11] Avoid setting current_version and compatibility_version +Subject: [PATCH 01/12] Avoid setting current_version and compatibility_version on OSX +To facilitate the switching of implementations, avoid these appearing +in libblas.dylib etc., so that downstream consumers don't record them. --- - BLAS/SRC/CMakeLists.txt | 5 ----- - CBLAS/src/CMakeLists.txt | 2 -- - LAPACKE/CMakeLists.txt | 2 -- - SRC/CMakeLists.txt | 5 ----- - 4 files changed, 14 deletions(-) + BLAS/SRC/CMakeLists.txt | 10 ++++++---- + CBLAS/src/CMakeLists.txt | 9 +++++++-- + LAPACKE/CMakeLists.txt | 9 +++++++-- + SRC/CMakeLists.txt | 10 ++++++---- + 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt -index 41c480432..bdc49b915 100644 +index 41c480432..7b484a8d7 100644 --- a/BLAS/SRC/CMakeLists.txt +++ b/BLAS/SRC/CMakeLists.txt -@@ -98,9 +98,4 @@ endif() +@@ -98,9 +98,11 @@ endif() list(REMOVE_DUPLICATES SOURCES) add_library(blas ${SOURCES}) @@ -23,39 +25,61 @@ index 41c480432..bdc49b915 100644 - blas PROPERTIES - VERSION ${LAPACK_VERSION} - SOVERSION ${LAPACK_MAJOR_VERSION} -- ) ++if(NOT APPLE) ++ set_target_properties( ++ blas PROPERTIES ++ VERSION ${LAPACK_VERSION} ++ SOVERSION ${LAPACK_MAJOR_VERSION} + ) ++endif() lapack_install_library(blas) diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt -index 90e19f818..b31a2da0f 100644 +index 90e19f818..992036859 100644 --- a/CBLAS/src/CMakeLists.txt +++ b/CBLAS/src/CMakeLists.txt -@@ -117,8 +117,6 @@ add_library(cblas ${SOURCES}) +@@ -117,9 +117,14 @@ add_library(cblas ${SOURCES}) set_target_properties( cblas PROPERTIES LINKER_LANGUAGE C - VERSION ${LAPACK_VERSION} - SOVERSION ${LAPACK_MAJOR_VERSION} ) ++if(NOT APPLE) ++ set_target_properties( ++ cblas PROPERTIES ++ VERSION ${LAPACK_VERSION} ++ SOVERSION ${LAPACK_MAJOR_VERSION} ++ ) ++endif() target_include_directories(cblas PUBLIC $ + $ diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt -index 0589a74ba..6ba4a2e9a 100644 +index 0589a74ba..51a186e71 100644 --- a/LAPACKE/CMakeLists.txt +++ b/LAPACKE/CMakeLists.txt -@@ -76,8 +76,6 @@ add_library(lapacke ${SOURCES}) +@@ -76,9 +76,14 @@ add_library(lapacke ${SOURCES}) set_target_properties( lapacke PROPERTIES LINKER_LANGUAGE C - VERSION ${LAPACK_VERSION} - SOVERSION ${LAPACK_MAJOR_VERSION} ) ++if(NOT APPLE) ++ set_target_properties( ++ lapacke PROPERTIES ++ VERSION ${LAPACK_VERSION} ++ SOVERSION ${LAPACK_MAJOR_VERSION} ++ ) ++endif() target_include_directories(lapacke PUBLIC $ + $ diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt -index f19bdd302..b9aa77844 100644 +index f19bdd302..076c979ba 100644 --- a/SRC/CMakeLists.txt +++ b/SRC/CMakeLists.txt -@@ -501,11 +501,6 @@ endif() +@@ -501,11 +501,13 @@ endif() list(REMOVE_DUPLICATES SOURCES) add_library(lapack ${SOURCES}) @@ -63,7 +87,13 @@ index f19bdd302..b9aa77844 100644 - lapack PROPERTIES - VERSION ${LAPACK_VERSION} - SOVERSION ${LAPACK_MAJOR_VERSION} -- ) ++if(NOT APPLE) ++ set_target_properties( ++ lapack PROPERTIES ++ VERSION ${LAPACK_VERSION} ++ SOVERSION ${LAPACK_MAJOR_VERSION} + ) ++endif() if(USE_XBLAS) target_link_libraries(lapack PRIVATE ${XBLAS_LIBRARY}) diff --git a/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch index 4d37a34..30760ad 100644 --- a/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch +++ b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch @@ -1,7 +1,7 @@ -From c903754fc57b1a13c8f1d4570a39b928d00454f7 Mon Sep 17 00:00:00 2001 +From bc6d791aee1ffac6b76bc7580dc62dc6d053c35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Sat, 23 Nov 2019 12:22:20 +0100 -Subject: [PATCH 02/11] Restore missing prototypes for deprecated LAPACK +Subject: [PATCH 02/12] Restore missing prototypes for deprecated LAPACK functions Some LAPACK functions prototypes were inadvertedly dropped in 3.9.0. As a diff --git a/recipe/patches/0003-Fix-MinGW-build-error.patch b/recipe/patches/0003-Fix-MinGW-build-error.patch index a6e1c8a..161d4df 100644 --- a/recipe/patches/0003-Fix-MinGW-build-error.patch +++ b/recipe/patches/0003-Fix-MinGW-build-error.patch @@ -1,7 +1,7 @@ -From f0a4318be913a6cdd6492c0129e4b1ebdf942bdb Mon Sep 17 00:00:00 2001 +From a5d9a0df4ef795b63fc2ac9921a28da91e396a5e Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Mon, 25 Nov 2019 19:41:16 +0100 -Subject: [PATCH 03/11] Fix MinGW build error +Subject: [PATCH 03/12] Fix MinGW build error With MinGW the build fails for some LAPACKE xgesvd routines with: lapacke_cgesvdq.c:74:5: error: aggregate value used where an integer was expected diff --git a/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch index d5599ce..09c52c1 100644 --- a/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch +++ b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch @@ -1,7 +1,7 @@ -From 0b90108cb26142d6f18c21e418ad3c0a03086158 Mon Sep 17 00:00:00 2001 +From 19a647b67764a46d7b90a566bc5f60ba936d54f2 Mon Sep 17 00:00:00 2001 From: pdalgd <55156186+pdalgd@users.noreply.github.com> Date: Fri, 21 Feb 2020 13:24:37 +0100 -Subject: [PATCH 04/11] NaN not propagating in DCOMBSSQ and SCOMBSSQ +Subject: [PATCH 04/12] NaN not propagating in DCOMBSSQ and SCOMBSSQ --- SRC/dcombssq.f | 2 ++ diff --git a/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch index cfe6c23..dbf090e 100644 --- a/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch +++ b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch @@ -1,7 +1,7 @@ -From 3f17ea8a00a81492f4e01b16edd2b4f0a5138395 Mon Sep 17 00:00:00 2001 +From d884d6670e1df5757be0bd2c6de2b90426dcdaa1 Mon Sep 17 00:00:00 2001 From: Ilhan Polat Date: Mon, 27 Apr 2020 12:36:59 +0200 -Subject: [PATCH 05/11] Fix the loop index scalar in ZHEEQUB.f +Subject: [PATCH 05/12] Fix the loop index scalar in ZHEEQUB.f --- SRC/zheequb.f | 2 +- diff --git a/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch index 868373d..75e8c57 100644 --- a/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch +++ b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch @@ -1,7 +1,7 @@ -From 1979f4abf0b9080c9f935152f64d0c70a5a9ee24 Mon Sep 17 00:00:00 2001 +From bcc81995cbcf23954493e0c05db066814b0d9fa1 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 26 Apr 2020 00:57:37 +0200 -Subject: [PATCH 06/11] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq +Subject: [PATCH 06/12] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq For LAPACKE_cgesvdq, align datatype of `rwork` with lapacke.h and callsite in LAPACKE_cgesvdq_work; both of the latter use `float* rwork`, so there's diff --git a/recipe/patches/0007-fix-workspace-query-in-dgelq.patch b/recipe/patches/0007-fix-workspace-query-in-dgelq.patch index 602a812..707bf1d 100644 --- a/recipe/patches/0007-fix-workspace-query-in-dgelq.patch +++ b/recipe/patches/0007-fix-workspace-query-in-dgelq.patch @@ -1,7 +1,7 @@ -From b1a96d4f048521026138b787576cbfe972a46fcc Mon Sep 17 00:00:00 2001 +From d08adb65a3c80595c10d186ee7343a91cd32c1ff Mon Sep 17 00:00:00 2001 From: Thijs Steel Date: Wed, 16 Sep 2020 12:14:21 +0200 -Subject: [PATCH 07/11] fix workspace query in dgelq +Subject: [PATCH 07/12] fix workspace query in dgelq --- SRC/cgelq.f | 28 ++++++++++++++++++++-------- diff --git a/recipe/patches/0008-fix-dlanv2.patch b/recipe/patches/0008-fix-dlanv2.patch index db77cfd..cc8c2f3 100644 --- a/recipe/patches/0008-fix-dlanv2.patch +++ b/recipe/patches/0008-fix-dlanv2.patch @@ -1,7 +1,7 @@ -From 8ca1c363c61ac2bb6401a743678a71ab31dec70b Mon Sep 17 00:00:00 2001 +From 528211aa33f74b456b8b6aae0fd4ac6619767502 Mon Sep 17 00:00:00 2001 From: thijs Date: Fri, 18 Sep 2020 11:19:12 +0200 -Subject: [PATCH 08/11] fix-dlanv2 +Subject: [PATCH 08/12] fix-dlanv2 --- SRC/dlanv2.f | 28 ++++++++++++++++++++++++++-- diff --git a/recipe/patches/0009-remove-extraneous-semicolon.patch b/recipe/patches/0009-remove-extraneous-semicolon.patch index 9d642d1..53c02fc 100644 --- a/recipe/patches/0009-remove-extraneous-semicolon.patch +++ b/recipe/patches/0009-remove-extraneous-semicolon.patch @@ -1,7 +1,7 @@ -From 8824b73924b7c3294d1a061e5919d1c6bcacc484 Mon Sep 17 00:00:00 2001 +From 8f33e19e5a017f85136c962c03b4c689260e2f16 Mon Sep 17 00:00:00 2001 From: Iain Hibbert Date: Sun, 23 Feb 2020 21:39:25 +0000 -Subject: [PATCH 09/11] remove extraneous semicolon +Subject: [PATCH 09/12] remove extraneous semicolon this semicolon causes a test to fail with read error, using g95 --- diff --git a/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch b/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch index 4d8d5cf..6ea48f1 100644 --- a/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch +++ b/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch @@ -1,7 +1,7 @@ -From 729749ad7fa884a233cffb9c242e70975d5c65aa Mon Sep 17 00:00:00 2001 +From 0e1d9fa9c2b16ddc0c09f581f6cc74c24f09e522 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 26 Oct 2024 20:13:34 +1100 -Subject: [PATCH 10/11] don't declare RowMajorStrg as extern on windows +Subject: [PATCH 10/12] don't declare RowMajorStrg as extern on windows on platforms with HAS_ATTRIBUTE_WEAK_SUPPORT, this presumably plays a role in the linker shenanigans with cblas_xerbla, but on windows it just blows up diff --git a/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch b/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch index 8986b9d..bad395b 100644 --- a/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch +++ b/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch @@ -1,7 +1,7 @@ -From ed1059d1c19dc63d2c9956781ad5b10ba06569b9 Mon Sep 17 00:00:00 2001 +From d3f254e1c36be5c134a1987205b2ae358f5157f7 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 27 Oct 2024 00:15:33 +1100 -Subject: [PATCH 11/11] use __declspec(selectany) for cblas_xerbla's +Subject: [PATCH 11/12] use __declspec(selectany) for cblas_xerbla's RowMajorStrg on windows --- diff --git a/recipe/patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch b/recipe/patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch new file mode 100644 index 0000000..4e11895 --- /dev/null +++ b/recipe/patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch @@ -0,0 +1,84 @@ +From 27c8ecb686769dbcfb0b46d34547fef9d91ba55d Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Fri, 8 Nov 2024 06:28:01 +1100 +Subject: [PATCH 12/12] keep same library naming as before switching to + msvc+flang + +--- + BLAS/SRC/CMakeLists.txt | 4 +++- + CBLAS/src/CMakeLists.txt | 4 +++- + LAPACKE/CMakeLists.txt | 1 + + SRC/CMakeLists.txt | 4 +++- + TESTING/MATGEN/CMakeLists.txt | 3 +++ + 5 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt +index 7b484a8d7..6a73873f7 100644 +--- a/BLAS/SRC/CMakeLists.txt ++++ b/BLAS/SRC/CMakeLists.txt +@@ -98,7 +98,9 @@ endif() + list(REMOVE_DUPLICATES SOURCES) + + add_library(blas ${SOURCES}) +-if(NOT APPLE) ++if(WIN32 AND NOT UNIX) ++ set_target_properties(blas PROPERTIES OUTPUT_NAME "libblas") ++elseif(NOT APPLE) + set_target_properties( + blas PROPERTIES + VERSION ${LAPACK_VERSION} +diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt +index 992036859..fe944b114 100644 +--- a/CBLAS/src/CMakeLists.txt ++++ b/CBLAS/src/CMakeLists.txt +@@ -118,7 +118,9 @@ set_target_properties( + cblas PROPERTIES + LINKER_LANGUAGE C + ) +-if(NOT APPLE) ++if(WIN32 AND NOT UNIX) ++ set_target_properties(cblas PROPERTIES OUTPUT_NAME "libcblas") ++elseif(NOT APPLE) + set_target_properties( + cblas PROPERTIES + VERSION ${LAPACK_VERSION} +diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt +index 51a186e71..54af3662f 100644 +--- a/LAPACKE/CMakeLists.txt ++++ b/LAPACKE/CMakeLists.txt +@@ -91,6 +91,7 @@ target_include_directories(lapacke PUBLIC + if(WIN32 AND NOT UNIX) + target_compile_definitions(lapacke PUBLIC HAVE_LAPACK_CONFIG_H LAPACK_COMPLEX_STRUCTURE) + message(STATUS "Windows BUILD") ++ set_target_properties(lapacke PROPERTIES OUTPUT_NAME "liblapacke") + endif() + + if(LAPACKE_WITH_TMG) +diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt +index 076c979ba..83c5c73bf 100644 +--- a/SRC/CMakeLists.txt ++++ b/SRC/CMakeLists.txt +@@ -501,7 +501,9 @@ endif() + list(REMOVE_DUPLICATES SOURCES) + + add_library(lapack ${SOURCES}) +-if(NOT APPLE) ++if(WIN32 AND NOT UNIX) ++ set_target_properties(lapack PROPERTIES OUTPUT_NAME "liblapack") ++elseif(NOT APPLE) + set_target_properties( + lapack PROPERTIES + VERSION ${LAPACK_VERSION} +diff --git a/TESTING/MATGEN/CMakeLists.txt b/TESTING/MATGEN/CMakeLists.txt +index bc986da3a..f5ebf3677 100644 +--- a/TESTING/MATGEN/CMakeLists.txt ++++ b/TESTING/MATGEN/CMakeLists.txt +@@ -48,5 +48,8 @@ endif() + list(REMOVE_DUPLICATES SOURCES) + + add_library(tmglib ${SOURCES}) ++if(WIN32 AND NOT UNIX) ++ set_target_properties(tmglib PROPERTIES OUTPUT_NAME "libtmglib") ++endif() + target_link_libraries(tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) + lapack_install_library(tmglib) From 30e03d0257ac5354eb46bbc603499e75177db3e1 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 8 Nov 2024 09:49:00 +1100 Subject: [PATCH 13/15] extend SOVER handling on osx to libtmglib This partially reverts commit 45f12eb96dec811f213c4109055b8c2bb56c3212 --- recipe/build.sh | 2 +- recipe/meta.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index 8dcb035..36627f2 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -58,7 +58,7 @@ make install if [[ "${target_platform}" == osx-* ]]; then - for lib in blas cblas lapack lapacke; do + for lib in blas cblas lapack lapacke tmglib; do mv $PREFIX/lib/lib$lib.dylib $PREFIX/lib/lib$lib.$PKG_VERSION.dylib install_name_tool -id $PREFIX/lib/lib$lib.3.dylib $PREFIX/lib/lib$lib.$PKG_VERSION.dylib ln -s $PREFIX/lib/lib$lib.$PKG_VERSION.dylib $PREFIX/lib/lib$lib.dylib diff --git a/recipe/meta.yaml b/recipe/meta.yaml index cd4e225..92f60c4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -123,6 +123,8 @@ outputs: - lib/libtmglib.so.{{ version_major }} # [linux] - lib/libtmglib.so.{{ version }} # [linux] - lib/libtmglib.dylib # [osx] + - lib/libtmglib.{{ version_major }}.dylib # [osx] + - lib/libtmglib.{{ version }}.dylib # [osx] - Library/bin/libtmglib.dll # [win] - Library/lib/tmglib.lib # [win] test: From b68db16156769ecebe6cf443ab81ec0b0859c278 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 8 Nov 2024 10:23:45 +1100 Subject: [PATCH 14/15] don't patch in OUTPUT_NAME; backport patch for using CMAKE_SHARED_LIBRARY_PREFIX --- recipe/bld.bat | 1 + recipe/meta.yaml | 4 +- ...tting-a-prefix-for-the-library-names.patch | 24 ++++++ ...y-naming-as-before-switching-to-msvc.patch | 84 ------------------- 4 files changed, 27 insertions(+), 86 deletions(-) create mode 100644 recipe/patches/0012-cmake-allow-setting-a-prefix-for-the-library-names.patch delete mode 100644 recipe/patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch diff --git a/recipe/bld.bat b/recipe/bld.bat index 012b4ab..b0c0987 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -7,6 +7,7 @@ cmake -G "Ninja" ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DBUILD_SHARED_LIBS=yes ^ -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_SHARED_LIBRARY_PREFIX=lib ^ -DBUILD_TESTING=ON ^ -DLAPACKE=ON ^ -DCBLAS=ON ^ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 92f60c4..d76609b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -49,8 +49,8 @@ source: - patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch # [win] # make xerbla-shenanigans work on windows - patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch # [win] - # keep things called libblas.dll & blas.lib (as with m2w64-compilers) - - patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch + # from Reference-LAPACK/lapack#810 + - patches/0012-cmake-allow-setting-a-prefix-for-the-library-names.patch build: number: "{{ build_num }}" diff --git a/recipe/patches/0012-cmake-allow-setting-a-prefix-for-the-library-names.patch b/recipe/patches/0012-cmake-allow-setting-a-prefix-for-the-library-names.patch new file mode 100644 index 0000000..f289691 --- /dev/null +++ b/recipe/patches/0012-cmake-allow-setting-a-prefix-for-the-library-names.patch @@ -0,0 +1,24 @@ +From 4e77e7838aeecd0c76708c341e8824a0fa23c561 Mon Sep 17 00:00:00 2001 +From: "Jose E. Roman" +Date: Sat, 1 Apr 2023 11:07:38 +0200 +Subject: [PATCH 12/12] cmake: allow setting a prefix for the library names + +--- + CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d9dbf9746..81abd53b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,6 +10,10 @@ set( + ${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION} + ) + ++# Allow setting a prefix for the library names ++set(CMAKE_STATIC_LIBRARY_PREFIX "lib${LIBRARY_PREFIX}") ++set(CMAKE_SHARED_LIBRARY_PREFIX "lib${LIBRARY_PREFIX}") ++ + # Add the CMake directory for custon CMake modules + set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH}) + diff --git a/recipe/patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch b/recipe/patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch deleted file mode 100644 index 4e11895..0000000 --- a/recipe/patches/0012-keep-same-library-naming-as-before-switching-to-msvc.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 27c8ecb686769dbcfb0b46d34547fef9d91ba55d Mon Sep 17 00:00:00 2001 -From: "H. Vetinari" -Date: Fri, 8 Nov 2024 06:28:01 +1100 -Subject: [PATCH 12/12] keep same library naming as before switching to - msvc+flang - ---- - BLAS/SRC/CMakeLists.txt | 4 +++- - CBLAS/src/CMakeLists.txt | 4 +++- - LAPACKE/CMakeLists.txt | 1 + - SRC/CMakeLists.txt | 4 +++- - TESTING/MATGEN/CMakeLists.txt | 3 +++ - 5 files changed, 13 insertions(+), 3 deletions(-) - -diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt -index 7b484a8d7..6a73873f7 100644 ---- a/BLAS/SRC/CMakeLists.txt -+++ b/BLAS/SRC/CMakeLists.txt -@@ -98,7 +98,9 @@ endif() - list(REMOVE_DUPLICATES SOURCES) - - add_library(blas ${SOURCES}) --if(NOT APPLE) -+if(WIN32 AND NOT UNIX) -+ set_target_properties(blas PROPERTIES OUTPUT_NAME "libblas") -+elseif(NOT APPLE) - set_target_properties( - blas PROPERTIES - VERSION ${LAPACK_VERSION} -diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt -index 992036859..fe944b114 100644 ---- a/CBLAS/src/CMakeLists.txt -+++ b/CBLAS/src/CMakeLists.txt -@@ -118,7 +118,9 @@ set_target_properties( - cblas PROPERTIES - LINKER_LANGUAGE C - ) --if(NOT APPLE) -+if(WIN32 AND NOT UNIX) -+ set_target_properties(cblas PROPERTIES OUTPUT_NAME "libcblas") -+elseif(NOT APPLE) - set_target_properties( - cblas PROPERTIES - VERSION ${LAPACK_VERSION} -diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt -index 51a186e71..54af3662f 100644 ---- a/LAPACKE/CMakeLists.txt -+++ b/LAPACKE/CMakeLists.txt -@@ -91,6 +91,7 @@ target_include_directories(lapacke PUBLIC - if(WIN32 AND NOT UNIX) - target_compile_definitions(lapacke PUBLIC HAVE_LAPACK_CONFIG_H LAPACK_COMPLEX_STRUCTURE) - message(STATUS "Windows BUILD") -+ set_target_properties(lapacke PROPERTIES OUTPUT_NAME "liblapacke") - endif() - - if(LAPACKE_WITH_TMG) -diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt -index 076c979ba..83c5c73bf 100644 ---- a/SRC/CMakeLists.txt -+++ b/SRC/CMakeLists.txt -@@ -501,7 +501,9 @@ endif() - list(REMOVE_DUPLICATES SOURCES) - - add_library(lapack ${SOURCES}) --if(NOT APPLE) -+if(WIN32 AND NOT UNIX) -+ set_target_properties(lapack PROPERTIES OUTPUT_NAME "liblapack") -+elseif(NOT APPLE) - set_target_properties( - lapack PROPERTIES - VERSION ${LAPACK_VERSION} -diff --git a/TESTING/MATGEN/CMakeLists.txt b/TESTING/MATGEN/CMakeLists.txt -index bc986da3a..f5ebf3677 100644 ---- a/TESTING/MATGEN/CMakeLists.txt -+++ b/TESTING/MATGEN/CMakeLists.txt -@@ -48,5 +48,8 @@ endif() - list(REMOVE_DUPLICATES SOURCES) - - add_library(tmglib ${SOURCES}) -+if(WIN32 AND NOT UNIX) -+ set_target_properties(tmglib PROPERTIES OUTPUT_NAME "libtmglib") -+endif() - target_link_libraries(tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - lapack_install_library(tmglib) From 95bed8268305d26721e34b2792489e636f2486da Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 8 Nov 2024 14:48:11 +1100 Subject: [PATCH 15/15] use CBLAS_DLL markers for RowMajorStrg --- recipe/bld.bat | 11 ++ recipe/meta.yaml | 13 +- ...rrent_version-and-compatibility_vers.patch | 2 +- ...prototypes-for-deprecated-LAPACK-fun.patch | 2 +- .../patches/0003-Fix-MinGW-build-error.patch | 2 +- ...propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch | 2 +- ...x-the-loop-index-scalar-in-ZHEEQUB.f.patch | 2 +- ...nconsistencies-in-LAPACK-E-_-cz-gesv.patch | 2 +- .../0007-fix-workspace-query-in-dgelq.patch | 2 +- recipe/patches/0008-fix-dlanv2.patch | 2 +- .../0009-remove-extraneous-semicolon.patch | 2 +- ...ting-a-prefix-for-the-library-names.patch} | 4 +- ...re-RowMajorStrg-as-extern-on-windows.patch | 122 ------------------ ...rt-export-machinery-for-RowMajorStrg.patch | 61 +++++++++ ...electany-for-cblas_xerbla-s-RowMajor.patch | 23 ---- 15 files changed, 89 insertions(+), 163 deletions(-) rename recipe/patches/{0012-cmake-allow-setting-a-prefix-for-the-library-names.patch => 0010-cmake-allow-setting-a-prefix-for-the-library-names.patch} (84%) delete mode 100644 recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch create mode 100644 recipe/patches/0011-add-DLL-import-export-machinery-for-RowMajorStrg.patch delete mode 100644 recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch diff --git a/recipe/bld.bat b/recipe/bld.bat index b0c0987..0f1bc90 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,5 +1,14 @@ @echo on +:: add CBLAS_DLL markers to RowMajorStrg/CBLAS_CallFromC in CBLAS/{src,testing} +for %%f in (CBLAS\src\*.c) do ( + sed -i.bak "s/extern int RowMajorStrg;/CBLAS_DLL extern int RowMajorStrg;/g" %%f + sed -i.bak "s/extern int CBLAS_CallFromC;/CBLAS_DLL extern int CBLAS_CallFromC;/g" %%f +) +for %%f in (CBLAS\testing\*.c) do ( + sed -i.bak "s/extern int RowMajorStrg;/CBLAS_DLL extern int RowMajorStrg;/g" %%f +) + mkdir build cd build @@ -15,6 +24,8 @@ cmake -G "Ninja" ^ -Wno-dev .. ninja -j%CPU_COUNT% +if %ERRORLEVEL% NEQ 0 exit 1 + ninja install if %ERRORLEVEL% NEQ 0 exit 1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d76609b..20ec2ad 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -45,12 +45,10 @@ source: - patches/0008-fix-dlanv2.patch # from Reference-LAPACK/lapack#391 - patches/0009-remove-extraneous-semicolon.patch - # avoid linker errors on windows - - patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch # [win] - # make xerbla-shenanigans work on windows - - patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch # [win] # from Reference-LAPACK/lapack#810 - - patches/0012-cmake-allow-setting-a-prefix-for-the-library-names.patch + - patches/0010-cmake-allow-setting-a-prefix-for-the-library-names.patch + # make symbol RowMajorStrg visible through DLL boundary + - patches/0011-add-DLL-import-export-machinery-for-RowMajorStrg.patch build: number: "{{ build_num }}" @@ -60,9 +58,10 @@ requirements: - {{ stdlib("c") }} - {{ compiler("c") }} - {{ compiler("fortran") }} - - ninja # [win] - - make # [unix] - cmake + - make # [unix] + - ninja # [win] + - m2-sed # [win] outputs: - name: libblas diff --git a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch index d09157a..c55ef64 100644 --- a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch +++ b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch @@ -1,7 +1,7 @@ From add4fa0662dce4366dabe53d76ad84dd0652e34d Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 22 Nov 2018 19:39:51 -0600 -Subject: [PATCH 01/12] Avoid setting current_version and compatibility_version +Subject: [PATCH 01/11] Avoid setting current_version and compatibility_version on OSX To facilitate the switching of implementations, avoid these appearing diff --git a/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch index 30760ad..3119e08 100644 --- a/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch +++ b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch @@ -1,7 +1,7 @@ From bc6d791aee1ffac6b76bc7580dc62dc6d053c35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Sat, 23 Nov 2019 12:22:20 +0100 -Subject: [PATCH 02/12] Restore missing prototypes for deprecated LAPACK +Subject: [PATCH 02/11] Restore missing prototypes for deprecated LAPACK functions Some LAPACK functions prototypes were inadvertedly dropped in 3.9.0. As a diff --git a/recipe/patches/0003-Fix-MinGW-build-error.patch b/recipe/patches/0003-Fix-MinGW-build-error.patch index 161d4df..571aa2a 100644 --- a/recipe/patches/0003-Fix-MinGW-build-error.patch +++ b/recipe/patches/0003-Fix-MinGW-build-error.patch @@ -1,7 +1,7 @@ From a5d9a0df4ef795b63fc2ac9921a28da91e396a5e Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Mon, 25 Nov 2019 19:41:16 +0100 -Subject: [PATCH 03/12] Fix MinGW build error +Subject: [PATCH 03/11] Fix MinGW build error With MinGW the build fails for some LAPACKE xgesvd routines with: lapacke_cgesvdq.c:74:5: error: aggregate value used where an integer was expected diff --git a/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch index 09c52c1..ef44088 100644 --- a/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch +++ b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch @@ -1,7 +1,7 @@ From 19a647b67764a46d7b90a566bc5f60ba936d54f2 Mon Sep 17 00:00:00 2001 From: pdalgd <55156186+pdalgd@users.noreply.github.com> Date: Fri, 21 Feb 2020 13:24:37 +0100 -Subject: [PATCH 04/12] NaN not propagating in DCOMBSSQ and SCOMBSSQ +Subject: [PATCH 04/11] NaN not propagating in DCOMBSSQ and SCOMBSSQ --- SRC/dcombssq.f | 2 ++ diff --git a/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch index dbf090e..f88baf6 100644 --- a/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch +++ b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch @@ -1,7 +1,7 @@ From d884d6670e1df5757be0bd2c6de2b90426dcdaa1 Mon Sep 17 00:00:00 2001 From: Ilhan Polat Date: Mon, 27 Apr 2020 12:36:59 +0200 -Subject: [PATCH 05/12] Fix the loop index scalar in ZHEEQUB.f +Subject: [PATCH 05/11] Fix the loop index scalar in ZHEEQUB.f --- SRC/zheequb.f | 2 +- diff --git a/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch index 75e8c57..76ffe2e 100644 --- a/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch +++ b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch @@ -1,7 +1,7 @@ From bcc81995cbcf23954493e0c05db066814b0d9fa1 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 26 Apr 2020 00:57:37 +0200 -Subject: [PATCH 06/12] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq +Subject: [PATCH 06/11] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq For LAPACKE_cgesvdq, align datatype of `rwork` with lapacke.h and callsite in LAPACKE_cgesvdq_work; both of the latter use `float* rwork`, so there's diff --git a/recipe/patches/0007-fix-workspace-query-in-dgelq.patch b/recipe/patches/0007-fix-workspace-query-in-dgelq.patch index 707bf1d..c0a4f73 100644 --- a/recipe/patches/0007-fix-workspace-query-in-dgelq.patch +++ b/recipe/patches/0007-fix-workspace-query-in-dgelq.patch @@ -1,7 +1,7 @@ From d08adb65a3c80595c10d186ee7343a91cd32c1ff Mon Sep 17 00:00:00 2001 From: Thijs Steel Date: Wed, 16 Sep 2020 12:14:21 +0200 -Subject: [PATCH 07/12] fix workspace query in dgelq +Subject: [PATCH 07/11] fix workspace query in dgelq --- SRC/cgelq.f | 28 ++++++++++++++++++++-------- diff --git a/recipe/patches/0008-fix-dlanv2.patch b/recipe/patches/0008-fix-dlanv2.patch index cc8c2f3..21bbf7b 100644 --- a/recipe/patches/0008-fix-dlanv2.patch +++ b/recipe/patches/0008-fix-dlanv2.patch @@ -1,7 +1,7 @@ From 528211aa33f74b456b8b6aae0fd4ac6619767502 Mon Sep 17 00:00:00 2001 From: thijs Date: Fri, 18 Sep 2020 11:19:12 +0200 -Subject: [PATCH 08/12] fix-dlanv2 +Subject: [PATCH 08/11] fix-dlanv2 --- SRC/dlanv2.f | 28 ++++++++++++++++++++++++++-- diff --git a/recipe/patches/0009-remove-extraneous-semicolon.patch b/recipe/patches/0009-remove-extraneous-semicolon.patch index 53c02fc..d771297 100644 --- a/recipe/patches/0009-remove-extraneous-semicolon.patch +++ b/recipe/patches/0009-remove-extraneous-semicolon.patch @@ -1,7 +1,7 @@ From 8f33e19e5a017f85136c962c03b4c689260e2f16 Mon Sep 17 00:00:00 2001 From: Iain Hibbert Date: Sun, 23 Feb 2020 21:39:25 +0000 -Subject: [PATCH 09/12] remove extraneous semicolon +Subject: [PATCH 09/11] remove extraneous semicolon this semicolon causes a test to fail with read error, using g95 --- diff --git a/recipe/patches/0012-cmake-allow-setting-a-prefix-for-the-library-names.patch b/recipe/patches/0010-cmake-allow-setting-a-prefix-for-the-library-names.patch similarity index 84% rename from recipe/patches/0012-cmake-allow-setting-a-prefix-for-the-library-names.patch rename to recipe/patches/0010-cmake-allow-setting-a-prefix-for-the-library-names.patch index f289691..d3c33e4 100644 --- a/recipe/patches/0012-cmake-allow-setting-a-prefix-for-the-library-names.patch +++ b/recipe/patches/0010-cmake-allow-setting-a-prefix-for-the-library-names.patch @@ -1,7 +1,7 @@ -From 4e77e7838aeecd0c76708c341e8824a0fa23c561 Mon Sep 17 00:00:00 2001 +From e722414de753b0dbefa2139504ad1872bd124a8e Mon Sep 17 00:00:00 2001 From: "Jose E. Roman" Date: Sat, 1 Apr 2023 11:07:38 +0200 -Subject: [PATCH 12/12] cmake: allow setting a prefix for the library names +Subject: [PATCH 10/11] cmake: allow setting a prefix for the library names --- CMakeLists.txt | 4 ++++ diff --git a/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch b/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch deleted file mode 100644 index 6ea48f1..0000000 --- a/recipe/patches/0010-don-t-declare-RowMajorStrg-as-extern-on-windows.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 0e1d9fa9c2b16ddc0c09f581f6cc74c24f09e522 Mon Sep 17 00:00:00 2001 -From: "H. Vetinari" -Date: Sat, 26 Oct 2024 20:13:34 +1100 -Subject: [PATCH 10/12] don't declare RowMajorStrg as extern on windows - -on platforms with HAS_ATTRIBUTE_WEAK_SUPPORT, this presumably plays a role in -the linker shenanigans with cblas_xerbla, but on windows it just blows up ---- - CBLAS/testing/c_c2chke.c | 2 +- - CBLAS/testing/c_c3chke.c | 2 +- - CBLAS/testing/c_d2chke.c | 2 +- - CBLAS/testing/c_d3chke.c | 2 +- - CBLAS/testing/c_s2chke.c | 2 +- - CBLAS/testing/c_s3chke.c | 2 +- - CBLAS/testing/c_z2chke.c | 2 +- - CBLAS/testing/c_z3chke.c | 2 +- - 8 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/CBLAS/testing/c_c2chke.c b/CBLAS/testing/c_c2chke.c -index 28b771980..9a26ece56 100644 ---- a/CBLAS/testing/c_c2chke.c -+++ b/CBLAS/testing/c_c2chke.c -@@ -33,7 +33,7 @@ void F77_c2chke(char *rout) { - BETA[2] = {0.0,0.0}, - RALPHA = 0.0; - extern int cblas_info, cblas_lerr, cblas_ok; -- extern int RowMajorStrg; -+ int RowMajorStrg = TRUE; - extern char *cblas_rout; - - if (link_xerbla) /* call these first to link */ -diff --git a/CBLAS/testing/c_c3chke.c b/CBLAS/testing/c_c3chke.c -index 1be0c3fd1..29cf86ee8 100644 ---- a/CBLAS/testing/c_c3chke.c -+++ b/CBLAS/testing/c_c3chke.c -@@ -33,7 +33,7 @@ void F77_c3chke(char * rout) { - BETA[2] = {0.0,0.0}, - RALPHA = 0.0, RBETA = 0.0; - extern int cblas_info, cblas_lerr, cblas_ok; -- extern int RowMajorStrg; -+ int RowMajorStrg = TRUE; - extern char *cblas_rout; - - cblas_ok = TRUE ; -diff --git a/CBLAS/testing/c_d2chke.c b/CBLAS/testing/c_d2chke.c -index d989811d2..4d6c122f0 100644 ---- a/CBLAS/testing/c_d2chke.c -+++ b/CBLAS/testing/c_d2chke.c -@@ -31,7 +31,7 @@ void F77_d2chke(char *rout) { - Y[2] = {0.0,0.0}, - ALPHA=0.0, BETA=0.0; - extern int cblas_info, cblas_lerr, cblas_ok; -- extern int RowMajorStrg; -+ int RowMajorStrg = TRUE; - extern char *cblas_rout; - - if (link_xerbla) /* call these first to link */ -diff --git a/CBLAS/testing/c_d3chke.c b/CBLAS/testing/c_d3chke.c -index e41901e79..bf155684e 100644 ---- a/CBLAS/testing/c_d3chke.c -+++ b/CBLAS/testing/c_d3chke.c -@@ -31,7 +31,7 @@ void F77_d3chke(char *rout) { - C[2] = {0.0,0.0}, - ALPHA=0.0, BETA=0.0; - extern int cblas_info, cblas_lerr, cblas_ok; -- extern int RowMajorStrg; -+ int RowMajorStrg = TRUE; - extern char *cblas_rout; - - if (link_xerbla) /* call these first to link */ -diff --git a/CBLAS/testing/c_s2chke.c b/CBLAS/testing/c_s2chke.c -index 63f167152..11c6af7e1 100644 ---- a/CBLAS/testing/c_s2chke.c -+++ b/CBLAS/testing/c_s2chke.c -@@ -31,7 +31,7 @@ void F77_s2chke(char *rout) { - Y[2] = {0.0,0.0}, - ALPHA=0.0, BETA=0.0; - extern int cblas_info, cblas_lerr, cblas_ok; -- extern int RowMajorStrg; -+ int RowMajorStrg = TRUE; - extern char *cblas_rout; - - if (link_xerbla) /* call these first to link */ -diff --git a/CBLAS/testing/c_s3chke.c b/CBLAS/testing/c_s3chke.c -index 1872f005c..bd09a8041 100644 ---- a/CBLAS/testing/c_s3chke.c -+++ b/CBLAS/testing/c_s3chke.c -@@ -31,7 +31,7 @@ void F77_s3chke(char *rout) { - C[2] = {0.0,0.0}, - ALPHA=0.0, BETA=0.0; - extern int cblas_info, cblas_lerr, cblas_ok; -- extern int RowMajorStrg; -+ int RowMajorStrg = TRUE; - extern char *cblas_rout; - - if (link_xerbla) /* call these first to link */ -diff --git a/CBLAS/testing/c_z2chke.c b/CBLAS/testing/c_z2chke.c -index d51c7c267..8a888be95 100644 ---- a/CBLAS/testing/c_z2chke.c -+++ b/CBLAS/testing/c_z2chke.c -@@ -33,7 +33,7 @@ void F77_z2chke(char *rout) { - BETA[2] = {0.0,0.0}, - RALPHA = 0.0; - extern int cblas_info, cblas_lerr, cblas_ok; -- extern int RowMajorStrg; -+ int RowMajorStrg = TRUE; - extern char *cblas_rout; - - if (link_xerbla) /* call these first to link */ -diff --git a/CBLAS/testing/c_z3chke.c b/CBLAS/testing/c_z3chke.c -index 10078a103..bf8a6f9b3 100644 ---- a/CBLAS/testing/c_z3chke.c -+++ b/CBLAS/testing/c_z3chke.c -@@ -33,7 +33,7 @@ void F77_z3chke(char * rout) { - BETA[2] = {0.0,0.0}, - RALPHA = 0.0, RBETA = 0.0; - extern int cblas_info, cblas_lerr, cblas_ok; -- extern int RowMajorStrg; -+ int RowMajorStrg = TRUE; - extern char *cblas_rout; - - cblas_ok = TRUE ; diff --git a/recipe/patches/0011-add-DLL-import-export-machinery-for-RowMajorStrg.patch b/recipe/patches/0011-add-DLL-import-export-machinery-for-RowMajorStrg.patch new file mode 100644 index 0000000..0e5c584 --- /dev/null +++ b/recipe/patches/0011-add-DLL-import-export-machinery-for-RowMajorStrg.patch @@ -0,0 +1,61 @@ +From 1b351ff20d9cc56d6610557058331dd21e65b088 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Fri, 8 Nov 2024 14:35:19 +1100 +Subject: [PATCH 11/11] add DLL import/export machinery for RowMajorStrg + +Suggested-By: Isuru Fernando +--- + CBLAS/include/cblas.h | 9 +++++++++ + CBLAS/src/CMakeLists.txt | 3 +++ + CBLAS/src/cblas_globals.c | 10 ++++++++-- + 3 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/CBLAS/include/cblas.h b/CBLAS/include/cblas.h +index 9e937964e..171d4d778 100644 +--- a/CBLAS/include/cblas.h ++++ b/CBLAS/include/cblas.h +@@ -2,6 +2,15 @@ + #define CBLAS_H + #include + ++#ifdef _MSC_VER ++# ifdef CBLAS_BUILDING_DLL ++# define CBLAS_DLL __declspec(dllexport) ++# else ++# define CBLAS_DLL __declspec(dllimport) ++# endif ++#else ++# define CBLAS_DLL ++#endif + + #ifdef __cplusplus + extern "C" { /* Assume C declarations for C++ */ +diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt +index 992036859..c7a2dad27 100644 +--- a/CBLAS/src/CMakeLists.txt ++++ b/CBLAS/src/CMakeLists.txt +@@ -125,6 +125,9 @@ if(NOT APPLE) + SOVERSION ${LAPACK_MAJOR_VERSION} + ) + endif() ++if(BUILD_SHARED_LIBS) ++ target_compile_definitions(cblas PRIVATE CBLAS_BUILDING_DLL) ++endif() + target_include_directories(cblas PUBLIC + $ + $ +diff --git a/CBLAS/src/cblas_globals.c b/CBLAS/src/cblas_globals.c +index ebcd74db3..b7bf74e23 100644 +--- a/CBLAS/src/cblas_globals.c ++++ b/CBLAS/src/cblas_globals.c +@@ -1,2 +1,8 @@ +-int CBLAS_CallFromC=0; +-int RowMajorStrg=0; ++#ifdef _MSC_VER ++# define CBLAS_DLL __declspec(dllexport) ++#else ++# define CBLAS_DLL ++#endif ++ ++CBLAS_DLL int CBLAS_CallFromC=0; ++CBLAS_DLL int RowMajorStrg=0; diff --git a/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch b/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch deleted file mode 100644 index bad395b..0000000 --- a/recipe/patches/0011-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch +++ /dev/null @@ -1,23 +0,0 @@ -From d3f254e1c36be5c134a1987205b2ae358f5157f7 Mon Sep 17 00:00:00 2001 -From: "H. Vetinari" -Date: Sun, 27 Oct 2024 00:15:33 +1100 -Subject: [PATCH 11/12] use __declspec(selectany) for cblas_xerbla's - RowMajorStrg on windows - ---- - CBLAS/testing/c_xerbla.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CBLAS/testing/c_xerbla.c b/CBLAS/testing/c_xerbla.c -index 0ba5264db..86ef142cb 100644 ---- a/CBLAS/testing/c_xerbla.c -+++ b/CBLAS/testing/c_xerbla.c -@@ -9,7 +9,7 @@ void cblas_xerbla(int info, const char *rout, const char *form, ...) - { - extern int cblas_lerr, cblas_info, cblas_ok; - extern int link_xerbla; -- extern int RowMajorStrg; -+ extern __declspec(selectany) int RowMajorStrg; - extern char *cblas_rout; - - /* Initially, c__3chke will call this routine with