Skip to content

SuiteSparse 7.12.1 fails to build against openblas iwth 64_ symbol suffix #1019

@opoplawski

Description

@opoplawski

Describe the bug
Fedora provides a version of openblas with a 64_ symbol suffix, and provides a version of SuiteSparse built against it. However, changes in the latest version breaks in this build.

To Reproduce

+ CMAKE_OPTIONS='-DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF                    -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCOMPACT=ON -DSUITESPARSE_INCLUDEDIR_POSTFIX=SuiteSparse64_ -DSUITESPARSE_PKGFILEDIR=/usr/lib64/SuiteSparse64_ -DCMAKE_RELEASE_POSTFIX=64_ -DBLA_VENDOR=OpenBLAS -DALLOW_64BIT_BLAS=yes -DBLAS_LIBRARIES=/usr/lib64/libopenblas64_.so'
+ export 'CFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -DBLAS_OPENBLAS_64'
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -DBLAS_OPENBLAS_64'
+ /usr/bin/make -O -j6 V=1 VERBOSE=1 'CMAKE_OPTIONS=-DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF                    -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCOMPACT=ON -DSUITESPARSE_INCLUDEDIR_POSTFIX=SuiteSparse64_ -DSUITESPARSE_PKGFILEDIR=/usr/lib64/SuiteSparse64_ -DCMAKE_RELEASE_POSTFIX=64_ -DBLA_VENDOR=OpenBLAS -DALLOW_64BIT_BLAS=yes -DBLAS_LIBRARIES=/usr/lib64/libopenblas64_.so --debug-trycompile' JOBS=6
( cd SuiteSparse_config && /usr/bin/make )
make[1]: Entering directory '/home/orion/fedora/suitesparse/suitesparse-7.12.1-build/suitesparse-7.12.1/SuiteSparse64_-7.12.1/SuiteSparse_config'
( cd build && cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF                    -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCOMPACT=ON -DSUITESPARSE_INCLUDEDIR_POSTFIX=SuiteSparse64_ -DSUITESPARSE_PKGFILEDIR=/usr/lib64/SuiteSparse64_ -DCMAKE_RELEASE_POSTFIX=64_ -DBLA_VENDOR=OpenBLAS -DALLOW_64BIT_BLAS=yes -DBLAS_LIBRARIES=/usr/lib64/libopenblas64_.so --debug-trycompile .. && cmake --build . --config Release -j6 )

Expected behavior
A successful build.

Output

CMake Error at cmake_modules/SuiteSparse__blas_threading.cmake:123 (message):
  BLAS: OpenBLAS failed to compile (v0.2.14 or later is required)
Call Stack (most recent call first):
  cmake_modules/SuiteSparseBLAS32.cmake:23 (include)
  cmake_modules/SuiteSparseBLAS.cmake:39 (include)
  CMakeLists.txt:121 (include)

The try compile fails with:

/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e4340.dir/link.txt --verbose=1
/usr/lib64/ccache/gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -DBLAS_OPENBLAS_64  -Wl,-z,relro -Wl,--as-needed  -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes  CMakeFiles/cmTC_e4340.dir/check_openblas_Mar2015.c.o -o cmTC_e4340  /usr/lib64/libopenblas64_.so
/usr/bin/ld: /tmp/ccGGfri5.ltrans0.ltrans.o: in function `main':
/home/orion/fedora/suitesparse/suitesparse-7.12.1-build/suitesparse-7.12.1/SuiteSparse64_-7.12.1/SuiteSparse_config/cmake_modules/check_openblas_Mar2015.c:16:(.text.startup+0x9): undefined reference to `openblas_get_num_threads'
collect2: error: ld returned 1 exit status

This try compile with openblas64_ needs to be looking for openblas_get_num_threads64_.

Desktop (please complete the following information):

  • OS: Fedora Rawhide
  • compiler gcc 15.2.1
  • BLAS and LAPACK library, if applicable - openblas64_ 0.3.29

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions