Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[armadillo] Add version 12.6.4 #19907

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions recipes/armadillo/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ sources:
"12.2.0":
url: "https://sourceforge.net/projects/arma/files/armadillo-12.2.0.tar.xz"
sha256: "b0dce042297e865add3351dad77f78c2c7638d6632f58357b015e50edcbd2186"
"12.6.4":
url: "https://sourceforge.net/projects/arma/files/armadillo-12.6.4.tar.xz"
sha256: "eb7f243ffc32f18324bc7fa978d0358637e7357ca7836bec55b4eb56e9749380"

patches:
"10.7.0":
Expand All @@ -29,3 +32,7 @@ patches:
- patch_file: "patches/0003-Guard-dependency-discovery-12.2.x.patch"
patch_description: "Add find_package statements to inject conan dependencies"
patch_type: "conan"
"12.6.4":
- patch_file: "patches/0004-Guard-dependency-discovery-12.6.x.patch"
patch_description: "Add find_package statements to inject conan dependencies"
patch_type: "conan"
4 changes: 2 additions & 2 deletions recipes/armadillo/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ def requirements(self):
# See https://gitlab.com/conradsnicta/armadillo-code/-/issues/227 for more information.
if self.options.use_hdf5 and Version(self.version) < "12":
# Use the conan dependency if the system lib isn't being used
self.requires("hdf5/1.14.0")
self.requires("hdf5/1.14.0", transitive_headers=True, transitive_libs=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per conversation in Slack:

Without the traits, consumers fail during linking with home/conan/w/prod-v2/bsr/9620/afdcf/p/openb04dc4c8cf208a/p/lib/libopenblas.so.0: error adding symbols: DSO missing from command line
https://c3i.jfrog.io/c3i/misc-v2/logs/pr/19907/2-linux-gcc/armadillo/10.7.0//6057bdc3db7276f815dd06db0a25b3e779201d99-test.txt When shared = True

An explanation https://linuxpip.org/how-to-fix-dso-missing-from-command-line. This is a tightening of requirements in later versions of binutils requiring consumers to explicitly link shared libs even when the symbol can be identified in a transitive dep. Setting transitive_libs=True adds -lopenblas to the consumer link args which is the suggested fix and resolves this


if self.options.use_blas == "openblas":
self.requires("openblas/0.3.20")
self.requires("openblas/0.3.20", transitive_libs=True)
if (
self.options.use_blas == "intel_mkl"
and self.options.use_lapack == "intel_mkl"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a67ef80..91ef979 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -259,7 +259,11 @@ if(APPLE)
set(ARMA_USE_ACCELERATE true)

if(ALLOW_OPENBLAS_MACOS)
- include(ARMA_FindOpenBLAS)
+ if(USE_OPENBLAS)
+ find_package(OpenBLAS)
+ else()
+ set(OpenBLAS_FOUND NO)
+ endif()
message(STATUS "OpenBLAS_FOUND = ${OpenBLAS_FOUND}")
message(STATUS "")
message(STATUS "*** If use of OpenBLAS is causing problems,")
@@ -274,8 +278,16 @@ if(APPLE)
endif()

if(ALLOW_BLAS_LAPACK_MACOS)
- include(ARMA_FindBLAS)
- include(ARMA_FindLAPACK)
+ if(USE_SYSTEM_BLAS)
+ include(ARMA_FindBLAS)
+ else()
+ set(BLAS_FOUND NO)
+ endif()
+ if(USE_SYSTEM_LAPACK)
+ include(ARMA_FindLAPACK)
+ else()
+ set(LAPACK_FOUND NO)
+ endif()
message(STATUS " BLAS_FOUND = ${BLAS_FOUND}" )
message(STATUS "LAPACK_FOUND = ${LAPACK_FOUND}")
message(STATUS "")
@@ -314,19 +326,45 @@ if(APPLE)

else()

- if(ALLOW_FLEXIBLAS_LINUX AND (${CMAKE_SYSTEM_NAME} MATCHES "Linux"))
- include(ARMA_FindFlexiBLAS)
+ if(USE_MKL)
+ find_package(MKL)
else()
- set(FlexiBLAS_FOUND false)
+ set(MKL_FOUND NO)
+ endif()
+
+ if(USE_OPENBLAS)
+ find_package(OpenBLAS)
+ else()
+ set(OpenBLAS_FOUND NO)
+ endif()
+
+ if(USE_SYSTEM_ATLAS)
+ include(ARMA_FindATLAS)
+ else()
+ set(ATLAS_FOUND NO)
+ endif()
+
+ if(USE_SYSTEM_BLAS)
+ include(ARMA_FindBLAS)
+ else()
+ set(BLAS_FOUND NO)
+ endif()
+
+ if(USE_SYSTEM_LAPACK)
+ include(ARMA_FindLAPACK)
+ else()
+ set(LAPACK_FOUND NO)
endif()

- include(ARMA_FindMKL)
- include(ARMA_FindOpenBLAS)
- include(ARMA_FindATLAS) # TODO: remove support for ATLAS in next major version
- include(ARMA_FindBLAS)
- include(ARMA_FindLAPACK)
-
- message(STATUS "FlexiBLAS_FOUND = ${FlexiBLAS_FOUND}" )
+ if(ALLOW_FLEXIBLAS_LINUX AND (${CMAKE_SYSTEM_NAME} MATCHES "Linux"))
+ if(USE_SYSTEM_FLEXIBLAS)
+ include(ARMA_FindFlexiBLAS)
+ else()
+ set(FlexiBLAS_FOUND NO)
+ endif()
+ endif()
+
+ message(STATUS "FlexiBLAS_FOUND = ${FlexiBLAS_FOUND}" )
message(STATUS " MKL_FOUND = ${MKL_FOUND}" )
message(STATUS " OpenBLAS_FOUND = ${OpenBLAS_FOUND}" )
message(STATUS " ATLAS_FOUND = ${ATLAS_FOUND}" )
@@ -438,7 +476,11 @@ else()
endif()


-include(ARMA_FindARPACK)
+if(USE_SYSTEM_ARPACK)
+ include(ARMA_FindARPACK)
+else()
+ set(ARPACK_FOUND NO)
+endif()
message(STATUS "ARPACK_FOUND = ${ARPACK_FOUND}")

if(ARPACK_FOUND)
@@ -446,7 +488,11 @@ if(ARPACK_FOUND)
set(ARMA_LIBS ${ARMA_LIBS} ${ARPACK_LIBRARY})
endif()

-include(ARMA_FindSuperLU5)
+if(USE_SYSTEM_SUPERLU)
+ include(ARMA_FindSuperLU5)
+else()
+ set(SuperLU_FOUND NO)
+endif()
message(STATUS "SuperLU_FOUND = ${SuperLU_FOUND}")

if(SuperLU_FOUND)
--
2.42.0

2 changes: 2 additions & 0 deletions recipes/armadillo/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ versions:
folder: all
"12.2.0":
folder: all
"12.6.4":
folder: all