From 3dd44b931481d7a8e9ba412621fa810232b66289 Mon Sep 17 00:00:00 2001 From: jim wang <122244446+jimwang118@users.noreply.github.com> Date: Tue, 27 Feb 2024 09:06:19 +0000 Subject: [PATCH] [openblas] Fix build errors on osx (#36072) Fixes https://github.com/microsoft/vcpkg/issues/36031 ``` ld: error: undefined symbol: cabsf >>> referenced by c_cblat2c.c:3566 (/home/CORP/b.manganelli/Projects/vcpkg/buildtrees/openblas/src/v0.3.25-dc6d649124.clean/ctest/c_cblat2c.c:3566) >>> ctest/CMakeFiles/xccblat2.dir/c_cblat2c.c.o:(cmvch_) ``` - [X] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md) - [ ] ~~SHA512s are updated for each updated download~~ - [ ] ~~The "supports" clause reflects platforms that may be fixed by this new version~~ - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [ ] ~~Any patches that are no longer applied are deleted from the port's directory.~~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file. Usage test pass with following triplets: ``` x64-windows x64-osx ``` --------- Co-authored-by: Jim wang (BEYONDSOFT CONSULTING INC) --- ports/openblas/portfile.cmake | 5 +++++ ports/openblas/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/o-/openblas.json | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index 8f06e235c3a330..840c7fe25ad129 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -33,11 +33,16 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS set(COMMON_OPTIONS -DBUILD_WITHOUT_LAPACK=ON) if(VCPKG_TARGET_IS_OSX) + list(APPEND COMMON_OPTIONS -DONLY_CBLAS=1) if("dynamic-arch" IN_LIST FEATURES) set(conf_opts GENERATOR "Unix Makefiles") endif() endif() +if(VCPKG_TARGET_IS_ANDROID) + list(APPEND COMMON_OPTIONS -DONLY_CBLAS=1) +endif() + set(OPENBLAS_EXTRA_OPTIONS) # for UWP version, must build non uwp first for helper # binaries. diff --git a/ports/openblas/vcpkg.json b/ports/openblas/vcpkg.json index 144676a297603e..25f9a6b7cab7e4 100644 --- a/ports/openblas/vcpkg.json +++ b/ports/openblas/vcpkg.json @@ -1,6 +1,7 @@ { "name": "openblas", "version": "0.3.26", + "port-version": 1, "description": "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.", "homepage": "https://github.com/xianyi/OpenBLAS", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index 18b3022742d72b..ae58f44ed35f6d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6310,7 +6310,7 @@ }, "openblas": { "baseline": "0.3.26", - "port-version": 0 + "port-version": 1 }, "opencascade": { "baseline": "7.8.0", diff --git a/versions/o-/openblas.json b/versions/o-/openblas.json index a36deac02a88aa..5f405923f7326b 100644 --- a/versions/o-/openblas.json +++ b/versions/o-/openblas.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "162536c889250c48f1c0aaa8c7cae66806f467b3", + "version": "0.3.26", + "port-version": 1 + }, { "git-tree": "3fde0f066aa319941b8f352596f28a92f099b2f5", "version": "0.3.26",