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

[MacPorts] LAPACK is not found when building with Clang #504

Open
barracuda156 opened this issue Oct 15, 2023 · 5 comments
Open

[MacPorts] LAPACK is not found when building with Clang #504

barracuda156 opened this issue Oct 15, 2023 · 5 comments

Comments

@barracuda156
Copy link

This commit breaks clang builds on macOS. With gcc still works.

@barracuda156
Copy link
Author

barracuda156 commented Oct 15, 2023

UPD. Hmm, reverting it made no change, it is still broken. Need to look into this.

UPD2. I do not delete initial message, but it is not that commit, but something else, possibly in Macports itself. But at the moment still a mystery why it now fails. It worked fine for months.

Currently build fails on CI like this:

  -- Found Gperftools: /opt/local/lib/libtcmalloc.dylib;/opt/local/lib/libprofiler.dylib  found components: tcmalloc profiler 
  CMake Warning at /opt/local/share/cmake-3.24/Modules/FindBoost.cmake:1384 (message):
    New Boost version may have incorrect or missing dependencies and imported
    targets
  Call Stack (most recent call first):
    /opt/local/share/cmake-3.24/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
    /opt/local/share/cmake-3.24/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
    external/boost.cmake:3 (find_package)
    CMakeLists.txt:641 (include)
  
  
  -- Found Boost: /opt/local/libexec/boost/1.81/include (found suitable version "1.81.0", minimum required is "1.4") found components: math_tr1 
  -- Looking for sgemm_
  -- Looking for sgemm_ - not found
  -- Looking for sgemm_
  -- Looking for sgemm_ - not found
  -- Looking for sgemm_
  -- Looking for sgemm_ - not found
  -- Looking for sgemm
  -- Looking for sgemm - not found
  -- Looking for sgemm
  -- Looking for sgemm - not found
  -- Looking for sgemm
  -- Looking for sgemm - not found
  -- Looking for sgemm__
  -- Looking for sgemm__ - not found
  -- Looking for sgemm__
  -- Looking for sgemm__ - not found
  -- Looking for sgemm__
  -- Looking for sgemm__ - not found
  -- Looking for SGEMM
  -- Looking for SGEMM - not found
  -- Looking for SGEMM
  -- Looking for SGEMM - not found
  -- Looking for SGEMM
  -- Looking for SGEMM - not found
  -- Looking for SGEMM_
  -- Looking for SGEMM_ - not found
  -- Looking for SGEMM_
  -- Looking for SGEMM_ - not found
  -- Looking for SGEMM_
  -- Looking for SGEMM_ - not found
  CMake Error at external/lapack.cmake:83 (message):
    Unable to link against BLAS function.  Specify the BLAS library in
    LAPACK_LIBRARIES.
  Call Stack (most recent call first):
    CMakeLists.txt:643 (include)
  
  
  -- Configuring incomplete, errors occurred!

@barracuda156 barracuda156 changed the title Recent LAPACK-related commit has broken macOS build with Clang [MacPorts] LAPACK is not found when building with Clang Oct 18, 2023
@evaleev
Copy link
Contributor

evaleev commented Oct 20, 2023

would you please post the entire configuration command (and metadata, if any, like cmake preset file), configuration log + CMake{Output,Error}.txt? thanks.

@barracuda156
Copy link
Author

@evaleev Thank you for responding. Our config: https://github.com/macports/macports-ports/blob/master/science/madness/Portfile (it was working perfectly until very recent, still works with gcc on PowerPC, but now fails on Intel and Apple Silicon).

Logs from Sonoma:
CMakeConfigureLog.txt
main.txt

@DanielO
Copy link

DanielO commented Nov 22, 2023

I think this is due to libopenblas having /opt/local/lib/libgcc listed twice as an RPATH.
I guess this would have to be fixed in the openblas build, or you can pass -Wl,-ld_classic to the link.

@barracuda156
Copy link
Author

@DanielO I think the linker issue was addressed for OpenBLAS on our end and that did not help here, but I will check that.
As a solution to fix the build I switched madness to use Accelerate on new systems – which cannot be used across the board due to this being broken:
#458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants