-
Notifications
You must be signed in to change notification settings - Fork 22
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
patch_morphology build failure with external BLAS #153
Comments
What was your cmake config? I found if you're doing BLAS stuff you can't switch it on and reconfigure, it must be set from the first-step. |
Didn't do any config beyond disabling ANTs (non-default option to build OpenBLAS as part of superbuild also fails in an unrelated way). |
I hit the same error an hour after. |
This fixes the build for me when using the internal OpenBLAS diff --git a/cmake-modules/BuildOpenBLAS.cmake b/cmake-modules/BuildOpenBLAS.cmake
index 5e82918..67e9966 100644
--- a/cmake-modules/BuildOpenBLAS.cmake
+++ b/cmake-modules/BuildOpenBLAS.cmake
@@ -93,7 +93,7 @@ macro(build_open_blas install_prefix staging_prefix build_parallel)
INSTALL_DIR ${staging_prefix}/${install_prefix}
)
- SET(OpenBLAS_INCLUDE_DIRS ${staging_prefix}/${install_prefix}/include )
+ SET(OpenBLAS_INCLUDE_DIRS ${staging_prefix}/${install_prefix}/include/openblas )
SET(OpenBLAS_LIBRARIES ${staging_prefix}/${install_prefix}/lib${LIB_SUFFIX}/libopenblas.so )
SET(OpenBLAS_LIBRARY ${OpenBLAS_LIBRARIES})
SET(OpenBLAS_DIR ${staging_prefix}/${install_prefix}/share/cmake/OpenBLAS )
diff --git a/cmake-modules/BuildPatchMorphology.cmake b/cmake-modules/BuildPatchMorphology.cmake
index 31630ef..d538f9a 100644
--- a/cmake-modules/BuildPatchMorphology.cmake
+++ b/cmake-modules/BuildPatchMorphology.cmake
@@ -40,7 +40,8 @@ macro(build_PatchMorphology install_prefix staging_prefix itk_dir)
-DCMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=${CMAKE_STATIC_LINKER_FLAGS_RELEASE}
-DCMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DOpenBLAS_INCLUDE_DIR:PATH=${OpenBLAS_INCLUDE_DIRS}
+ -DOpenBLAS_INCLUDE_DIRS:PATH=${OpenBLAS_INCLUDE_DIRS}
+ -DOpenBLAS_LIBRARIES:PATH=${OpenBLAS_LIBRARIES}
-DOpenBLAS_LIBRARY:PATH=${OpenBLAS_LIBRARY}
-DCMAKE_DISABLE_FIND_PACKAGE_OpenBLAS:BOOL=ON
-DOpenBLAS_DIR:PATH=${OpenBLAS_DIR}
@bcdarwin I think this line Its also possible all these variables need to be changed to BLAS_* etc instead of OpenBLAS_, because as I understand find_package(BLAS) it it exports BLAS_* variables |
@bcdarwin I think the issue in your case is also we probably need to add In openblas the blas/lapack includes are in the same place, but on ubuntu (and probably your system), these end up in different places, from different packages. Ubuntu 2204:
I'll try sorting out the non-superbuild-blas after I confirm the superbuild variant works. P.S. what's your cmake version? I see mentions elsewhere that find_package(BLAS) didn't find OpenBLAS until >3.6 |
Building the toolkit (roughly 1.9.18-develop) on Rocky Linux 8.5 (RHEL 8 derivative) fails with:
However,
I assume this is a CMake issue, but the MINC toolkit doesn't expose CMake options to set the LAPACK location.
The text was updated successfully, but these errors were encountered: