From df45d3d18fe165d7b44db44d4da9f3ddb6eecfe4 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 2 May 2024 12:51:37 +0200 Subject: [PATCH 1/4] 7.7.0 --- recipe/meta.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 1151c3b..5a0110f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "5.10.1" %} +{% set version = "7.7.0" %} package: name: suitesparse @@ -6,17 +6,18 @@ package: source: url: https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v{{ version }}.tar.gz - sha256: acb4d1045f48a237e70294b950153e48dce5b5f9ca8190e86c2b8c54ce00a7ee + sha256: 529b067f5d80981f45ddf6766627b8fc5af619822f068f342aab776e683df4f3 build: skip: true # [win] - number: 3 + number: 0 run_exports: - {{ pin_subpackage("suitesparse") }} requirements: build: - {{ compiler('c') }} + - {{ stdlib('c') }} - {{ compiler('cxx') }} - cmake - make From bdc03c9442a26a97e40202758b28769e24daac95 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 2 May 2024 12:52:04 +0200 Subject: [PATCH 2/4] MNT: Re-rendered with conda-build 24.3.0, conda-smithy 3.35.0, and conda-forge-pinning 2024.05.02.07.24.23 --- .azure-pipelines/azure-pipelines-linux.yml | 1 + .azure-pipelines/azure-pipelines-osx.yml | 3 ++- .ci_support/linux_64_.yaml | 11 +++++++++++ .ci_support/linux_aarch64_.yaml | 11 +++++++++++ .ci_support/linux_ppc64le_.yaml | 11 +++++++++++ .ci_support/osx_64_.yaml | 9 +++++++++ .ci_support/osx_arm64_.yaml | 9 +++++++++ .scripts/build_steps.sh | 6 +++--- .scripts/run_osx_build.sh | 6 +++--- README.md | 2 +- build-locally.py | 5 +++-- 11 files changed, 64 insertions(+), 10 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 4bc96db..c822fd4 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -21,6 +21,7 @@ jobs: UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-ppc64le timeoutInMinutes: 360 + variables: {} steps: # configure qemu binfmt-misc running. This allows us to run docker containers diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index f3ff063..7708e23 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-11 + vmImage: macOS-12 strategy: matrix: osx_64_: @@ -15,6 +15,7 @@ jobs: CONFIG: osx_arm64_ UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 + variables: {} steps: # TODO: Fast finish on azure pipelines? diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index e253b1a..e587eda 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -2,6 +2,10 @@ c_compiler: - gcc c_compiler_version: - '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.12' cdt_name: - cos6 channel_sources: @@ -14,6 +18,10 @@ cxx_compiler_version: - '12' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' libblas: - 3.9 *netlib libcblas: @@ -31,3 +39,6 @@ tbb_devel: zip_keys: - - c_compiler_version - cxx_compiler_version + - fortran_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 8f06939..d5eb93f 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -4,6 +4,10 @@ c_compiler: - gcc c_compiler_version: - '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_arch: - aarch64 cdt_name: @@ -18,6 +22,10 @@ cxx_compiler_version: - '12' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' libblas: - 3.9 *netlib libcblas: @@ -35,3 +43,6 @@ tbb_devel: zip_keys: - - c_compiler_version - cxx_compiler_version + - fortran_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 9d7bc8f..ac44198 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -2,6 +2,10 @@ c_compiler: - gcc c_compiler_version: - '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: - cos7 channel_sources: @@ -14,6 +18,10 @@ cxx_compiler_version: - '12' docker_image: - quay.io/condaforge/linux-anvil-ppc64le +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' libblas: - 3.9 *netlib libcblas: @@ -31,3 +39,6 @@ tbb_devel: zip_keys: - - c_compiler_version - cxx_compiler_version + - fortran_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 5442003..079dfac 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -4,6 +4,10 @@ c_compiler: - clang c_compiler_version: - '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.9' channel_sources: - conda-forge channel_targets: @@ -12,6 +16,10 @@ cxx_compiler: - clangxx cxx_compiler_version: - '16' +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' libblas: - 3.9 *netlib libcblas: @@ -31,3 +39,4 @@ tbb_devel: zip_keys: - - c_compiler_version - cxx_compiler_version + - fortran_compiler_version diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 3f62ab3..77de7bd 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -4,6 +4,10 @@ c_compiler: - clang c_compiler_version: - '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' channel_sources: - conda-forge channel_targets: @@ -12,6 +16,10 @@ cxx_compiler: - clangxx cxx_compiler_version: - '16' +fortran_compiler: +- gfortran +fortran_compiler_version: +- '12' libblas: - 3.9 *netlib libcblas: @@ -31,3 +39,4 @@ tbb_devel: zip_keys: - - c_compiler_version - cxx_compiler_version + - fortran_compiler_version diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index beda247..899ba03 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -34,9 +34,9 @@ CONDARC 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 boa conda-forge-ci-setup=4 + 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 boa conda-forge-ci-setup=4 + 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}" @@ -68,7 +68,7 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --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:-}" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 9259eb9..07dff21 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -26,9 +26,9 @@ 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 boa conda-forge-ci-setup=4 + 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 boa conda-forge-ci-setup=4 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" @@ -81,7 +81,7 @@ else EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi - conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --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" diff --git a/README.md b/README.md index 01e3ba6..e3178ba 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/suitesparse-fee Home: http://faculty.cse.tamu.edu/davis/suitesparse.html -Package license: LGPL-2.1-or-later (AMD, BTF, etc.), BSD-3-clause (UFget), GPL-2.0-or-later (UMFPACK, RBIO, SPQR, GPUQRENGINE), Apache-2.0 (Metis) +Package license: LGPL-2.1-or-later AND BSD-3-Clause AND GPL-2.0-or-later AND Apache-2.0 Summary: A suite of sparse matrix algorithms diff --git a/build-locally.py b/build-locally.py index 3f4b7a7..e0d408d 100755 --- a/build-locally.py +++ b/build-locally.py @@ -64,8 +64,9 @@ def verify_config(ns): elif ns.config.startswith("osx"): if "OSX_SDK_DIR" not in os.environ: raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " - "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) From c0d20df73e126c57b9edbfb464cd40542f7ddf23 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 2 May 2024 13:49:06 +0200 Subject: [PATCH 3/4] update build for cmake, 7.7 - no more static libs - use cmake directly --- recipe/Makefile.empty | 2 -- recipe/build.sh | 60 ++++++++++--------------------------------- recipe/meta.yaml | 38 +++++---------------------- recipe/run_test.py | 2 +- 4 files changed, 21 insertions(+), 81 deletions(-) delete mode 100644 recipe/Makefile.empty diff --git a/recipe/Makefile.empty b/recipe/Makefile.empty deleted file mode 100644 index 34c72ab..0000000 --- a/recipe/Makefile.empty +++ /dev/null @@ -1,2 +0,0 @@ -%: - @echo "skipping $@ for $(PWD)" diff --git a/recipe/build.sh b/recipe/build.sh index 2f86cf2..9965191 100755 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,13 +1,5 @@ #!/bin/bash -if [ "$(uname)" == "Darwin" ] -then - export DYLD_FALLBACK_LIBRARY_PATH="${PREFIX}/lib" - DYNAMIC_EXT=".dylib" -else - export LD_LIBRARY_PATH="${PREFIX}/lib" - DYNAMIC_EXT=".so" -fi # conda compilers strip links that aren't used by default, # even if explicitly given. @@ -17,44 +9,18 @@ fi export LDFLAGS=${LDFLAGS/-Wl,--as-needed/} export LDFLAGS=${LDFLAGS/-Wl,-dead_strip_dylibs/} -export INSTALL="${PREFIX}" -# continue to ignore docs -export INSTALL_DOC="${SRC_DIR}/doc" -# make sure CMake install goes in the right place -export CMAKE_OPTIONS="-DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_INSTALL_LIBDIR=lib" - -export BLAS="-lblas -llapack" -export LAPACK="-lblas -llapack" - -export CUDA="no" - -# export environment variable so SuiteSparse will use the METIS built above -export MY_METIS_LIB="-L${PREFIX}/lib -lmetis -Wl,-rpath,$PREFIX/lib" -export MY_METIS_INC="-I${PREFIX}/include" +export CMAKE_ARGS="${CMAKE_ARGS} -DSUITESPARSE_USE_CUDA=OFF" -# (optional) write out various make variables for easier build debugging -make config 2>&1 | tee make_config.txt - -# skip graphblas, mongoose by giving them a no-op makefile -cp -v ${RECIPE_DIR}/Makefile.empty GraphBLAS/Makefile -cp -v ${RECIPE_DIR}/Makefile.empty Mongoose/Makefile - -# make SuiteSparse -make library static VERBOSE=1 -make install +if [[ "${target_platform}" != "${build_platform}" ]]; then + export CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_CROSSCOMPILING=ON" +fi -# manually install the static libraries -cp ${SRC_DIR}/AMD/Lib/libamd.a ${PREFIX}/lib -cp ${SRC_DIR}/BTF/Lib/libbtf.a ${PREFIX}/lib -cp ${SRC_DIR}/CAMD/Lib/libcamd.a ${PREFIX}/lib -cp ${SRC_DIR}/CCOLAMD/Lib/libccolamd.a ${PREFIX}/lib -cp ${SRC_DIR}/CHOLMOD/Lib/libcholmod.a ${PREFIX}/lib -cp ${SRC_DIR}/COLAMD/Lib/libcolamd.a ${PREFIX}/lib -cp ${SRC_DIR}/CSparse/Lib/libcsparse.a ${PREFIX}/lib -cp ${SRC_DIR}/CXSparse/Lib/libcxsparse.a ${PREFIX}/lib -cp ${SRC_DIR}/KLU/Lib/libklu.a ${PREFIX}/lib -cp ${SRC_DIR}/LDL/Lib/libldl.a ${PREFIX}/lib -cp ${SRC_DIR}/RBio/Lib/librbio.a ${PREFIX}/lib -cp ${SRC_DIR}/SPQR/Lib/libspqr.a ${PREFIX}/lib -cp ${SRC_DIR}/SuiteSparse_config/libsuitesparseconfig.a ${PREFIX}/lib -cp ${SRC_DIR}/UMFPACK/Lib/libumfpack.a ${PREFIX}/lib +# add +# can add lagraph and -DSUITESPARSE_USE_SYSTEM_GRAPHBLAS after packaging 9.1 +cmake -B build \ + -DSUITESPARSE_ENABLE_PROJECTS="suitesparse_config;amd;btf;camd;ccolamd;colamd;cholmod;cxsparse;ldl;klu;umfpack;paru;rbio;spqr;spex" \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=OFF \ + ${CMAKE_ARGS} +cmake --build build --parallel "${CPU_COUNT:-1}" --verbose +cmake --install build --verbose diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5a0110f..b3c7778 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -19,6 +19,7 @@ requirements: - {{ compiler('c') }} - {{ stdlib('c') }} - {{ compiler('cxx') }} + - {{ compiler('fortran') }} - cmake - make host: @@ -28,8 +29,6 @@ requirements: - tbb-devel - metis - mpfr - run: - - metis test: commands: @@ -42,35 +41,12 @@ test: - test ! -f ${PREFIX}/lib/libgraphblas.a - test ! -f ${PREFIX}/lib/libmongoose.a - - test -f ${PREFIX}/include/amd.h - - test -f ${PREFIX}/include/umfpack.h - - test -f ${PREFIX}/lib/libamd${SHLIB_EXT} - - test -f ${PREFIX}/lib/libbtf${SHLIB_EXT} - - test -f ${PREFIX}/lib/libcamd${SHLIB_EXT} - - test -f ${PREFIX}/lib/libccolamd${SHLIB_EXT} - - test -f ${PREFIX}/lib/libcholmod${SHLIB_EXT} - - test -f ${PREFIX}/lib/libcolamd${SHLIB_EXT} - - test -f ${PREFIX}/lib/libcxsparse${SHLIB_EXT} - - test -f ${PREFIX}/lib/libklu${SHLIB_EXT} - - test -f ${PREFIX}/lib/libldl${SHLIB_EXT} - - test -f ${PREFIX}/lib/librbio${SHLIB_EXT} - - test -f ${PREFIX}/lib/libspqr${SHLIB_EXT} - - test -f ${PREFIX}/lib/libsuitesparseconfig${SHLIB_EXT} - - test -f ${PREFIX}/lib/libumfpack${SHLIB_EXT} - - test -f ${PREFIX}/lib/libumfpack${SHLIB_EXT} - - test -f ${PREFIX}/lib/libamd.a - - test -f ${PREFIX}/lib/libbtf.a - - test -f ${PREFIX}/lib/libcamd.a - - test -f ${PREFIX}/lib/libccolamd.a - - test -f ${PREFIX}/lib/libcholmod.a - - test -f ${PREFIX}/lib/libcolamd.a - - test -f ${PREFIX}/lib/libcxsparse.a - - test -f ${PREFIX}/lib/libklu.a - - test -f ${PREFIX}/lib/libldl.a - - test -f ${PREFIX}/lib/librbio.a - - test -f ${PREFIX}/lib/libspqr.a - - test -f ${PREFIX}/lib/libsuitesparseconfig.a - - test -f ${PREFIX}/lib/libumfpack.a + - test -f ${PREFIX}/include/suitesparse/amd.h + - test -f ${PREFIX}/include/suitesparse/umfpack.h + {% for name in ['amd', 'btf', 'camd', 'ccolamd', 'cholmod', 'colamd', 'cxsparse', 'klu', 'ldl', 'rbio', 'spqr', 'suitesparseconfig', 'umfpack'] %} + - test -f ${PREFIX}/lib/lib{{ name }}${SHLIB_EXT} + - test ! -f ${PREFIX}/lib/lib{{ name }}.a + {% endfor %} about: home: http://faculty.cse.tamu.edu/davis/suitesparse.html diff --git a/recipe/run_test.py b/recipe/run_test.py index f3e3b0a..258efa5 100644 --- a/recipe/run_test.py +++ b/recipe/run_test.py @@ -11,7 +11,7 @@ def check_install_name(name): otool = check_output(["otool", "-L", path]).decode("utf8") self_line = otool.splitlines()[1] install_name = self_line.strip().split()[0] - pat = "@rpath/lib{}\.\d+\.dylib".format(name) + pat = r"@rpath/lib{}\.\d+\.dylib".format(name) assert re.match(pat, install_name), "{} != {}".format(install_name, pat) From e40d733749bb193c9bff0df5a209a99da623404d Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 2 May 2024 14:48:31 +0200 Subject: [PATCH 4/4] find blas explicitly --- recipe/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index 9965191..51dacb4 100755 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -19,6 +19,8 @@ fi # can add lagraph and -DSUITESPARSE_USE_SYSTEM_GRAPHBLAS after packaging 9.1 cmake -B build \ -DSUITESPARSE_ENABLE_PROJECTS="suitesparse_config;amd;btf;camd;ccolamd;colamd;cholmod;cxsparse;ldl;klu;umfpack;paru;rbio;spqr;spex" \ + -DBLA_VENDOR="Generic" \ + -DBLAS_LIBRARIES="$PREFIX/lib/libblas${SHLIB_EXT};$PREFIX/lib/libcblas${SHLIB_EXT}" \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_STATIC_LIBS=OFF \ ${CMAKE_ARGS}