Opened 13 months ago

Last modified 12 months ago

#68507 new defect

OpenBLAS: some recent change in Macports broken finding OpenBLAS with Clang builds for some ports

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: NicosPavlov, michaelld (Michael Dickens), catap (Kirill A. Korinsky), mascguy (Christopher Nielsen), Dave-Allured (Dave Allured)
Port: OpenBLAS, madness

Description

Something very recently has broken OpenBLAS finding with clang builds for some port(s). See: https://github.com/macports/macports-ports/pull/20901

I tried to upgrade madness, which worked fine locally for me and worked on every system earlier for months: https://ports.macports.org/port/madness/details (well, okay, 10.6 Intel failed, it seems). Upgrade failed with:

  -- 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!

Initially I attributed that to a recent commit to upstream: https://github.com/m-a-d-n-e-s-s/madness/issues/504

However, when I tried revbumping our existing version of madness, it failed identically. It also fails now on Sonoma for me locally. Building with GCC on 10.6 PowerPC works fine.

I have no idea what goes wrong. Could someone help here?

Attachments (2)

CMakeConfigureLog.txt (199.6 KB) - added by barracuda156 13 months ago.
main.txt (144.0 KB) - added by barracuda156 13 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

madness @2023.09.20 builds fine for me on Monterey x86_64.

Do your cmake logs say anything about why it failed for you?

comment:2 in reply to:  1 Changed 13 months ago by barracuda156

Replying to ryandesign:

madness @2023.09.20 builds fine for me on Monterey x86_64.

Do your cmake logs say anything about why it failed for you?

The failure looks identical to what we saw on CI now.

Changed 13 months ago by barracuda156

Attachment: CMakeConfigureLog.txt added

Changed 13 months ago by barracuda156

Attachment: main.txt added

comment:3 Changed 13 months ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:4 Changed 12 months ago by DanielO (Daniel O'Connor)

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 but I have no idea how hard that would be, or you can pass -Wl,-ld_classic to the link.

(Or you can hand edit the library and change one of the references but I was in a hurry..)

comment:5 Changed 12 months ago by catap (Kirill A. Korinsky)

See: https://github.com/macports/macports-ports/pull/21452 where we figuring out that to do with near the same issue.

Note: See TracTickets for help on using tickets.