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/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] 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): diff --git a/recipe/bld.bat b/recipe/bld.bat index ef6accd..0f1bc90 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,15 +1,22 @@ +@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 -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 ^ -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_SHARED_LIBRARY_PREFIX=lib ^ -DBUILD_TESTING=ON ^ -DLAPACKE=ON ^ -DCBLAS=ON ^ @@ -17,9 +24,18 @@ cmake -G "Ninja" ^ -Wno-dev .. ninja -j%CPU_COUNT% +if %ERRORLEVEL% NEQ 0 exit 1 + 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 @@ -27,14 +43,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" 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 779ca71..20ec2ad 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" %} @@ -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=== @@ -44,24 +44,24 @@ 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 + # from Reference-LAPACK/lapack#810 + - 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 }}" 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] - - ninja # [win] - - make # [unix] + - {{ stdlib("c") }} + - {{ compiler("c") }} + - {{ compiler("fortran") }} - cmake + - make # [unix] + - ninja # [win] + - m2-sed # [win] outputs: - name: libblas @@ -76,12 +76,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: @@ -95,7 +92,9 @@ outputs: - lib/libblas.{{ version }}.dylib # [osx] - 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: @@ -107,12 +106,15 @@ 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") }} + host: + - {{ pin_subpackage("libblas", exact=True) }} + - {{ pin_subpackage("liblapack", exact=True) }} + run: + - libblas {{ version }} + - liblapack {{ version }} run_constrained: - blas * netlib files: @@ -123,7 +125,10 @@ outputs: - lib/libtmglib.{{ version_major }}.dylib # [osx] - lib/libtmglib.{{ version }}.dylib # [osx] - Library/bin/libtmglib.dll # [win] - - Library/lib/libtmglib.dll.a # [win] + - Library/lib/tmglib.lib # [win] + test: + commands: + - echo "no need to revalidate `files:` specification" - name: libcblas build: @@ -135,12 +140,11 @@ 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") }} + host: + - {{ pin_subpackage("libblas", exact=True) }} run: - libblas {{ version }}.* files: @@ -155,7 +159,9 @@ outputs: - lib/libcblas.{{ version }}.dylib # [osx] - 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: @@ -167,12 +173,11 @@ 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") }} + host: + - {{ pin_subpackage("libblas", exact=True) }} run: - libblas {{ version }}.* files: @@ -186,7 +191,9 @@ outputs: - lib/liblapack.{{ version }}.dylib # [osx] - 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: @@ -198,12 +205,11 @@ 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") }} + host: + - {{ pin_subpackage("liblapack", exact=True) }} run: - libblas {{ version }}.* - libcblas {{ version }}.* @@ -220,7 +226,9 @@ outputs: - lib/liblapacke.{{ version }}.dylib # [osx] - 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 +242,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 @@ -260,9 +271,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%\lib{{ each_lib }}.dll exit 1 # [win] {% endfor %} # For compatiblity (see #33) @@ -272,6 +283,9 @@ outputs: requirements: run: - liblapack {{ version }}.* + test: + commands: + - echo "pure meta-package" about: home: http://www.netlib.org/lapack 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..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,21 +1,23 @@ -From 1b26dcff9774541c0c5739a02c97a527964c1d87 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 1/8] 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 +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 41c48043..bdc49b91 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 41c48043..bdc49b91 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 90e19f81..b31a2da0 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 0589a74b..6ba4a2e9 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 f19bdd30..b9aa7784 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,10 +87,13 @@ index f19bdd30..b9aa7784 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}) --- -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..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 9ba3335009a801bae4b6dcb3df2cbdf47015f462 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 2/8] 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 @@ -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..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 769a9c4cc8a7da9a46b9bd7db21968fdfe411cc6 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 3/8] 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 @@ -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..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 e30d1c9ca0c08ab3559015cb33621b7f28ba801b 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 4/8] NaN not propagating in DCOMBSSQ and SCOMBSSQ +Subject: [PATCH 04/11] 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..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,14 +1,14 @@ -From e69f944b6b4df8f8dd0ef4de6574ec201b415af3 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 5/8] Fix the loop index scalar in ZHEEQUB.f +Subject: [PATCH 05/11] 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..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 a6666421568ea9eaa9a1b880cf33579a88ba808c 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 6/8] 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 @@ -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..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 b073e7b969d2e425483a2225aba8f78f9fef3c0f 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 7/8] fix workspace query in dgelq +Subject: [PATCH 07/11] 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..21bbf7b 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 528211aa33f74b456b8b6aae0fd4ac6619767502 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/11] 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..d771297 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 8f33e19e5a017f85136c962c03b4c689260e2f16 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/11] 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-cmake-allow-setting-a-prefix-for-the-library-names.patch b/recipe/patches/0010-cmake-allow-setting-a-prefix-for-the-library-names.patch new file mode 100644 index 0000000..d3c33e4 --- /dev/null +++ b/recipe/patches/0010-cmake-allow-setting-a-prefix-for-the-library-names.patch @@ -0,0 +1,24 @@ +From e722414de753b0dbefa2139504ad1872bd124a8e Mon Sep 17 00:00:00 2001 +From: "Jose E. Roman" +Date: Sat, 1 Apr 2023 11:07:38 +0200 +Subject: [PATCH 10/11] 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/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;