mpimd-csc / flexiblas

FlexiBLAS - A BLAS and LAPACK wrapper library with runtime exchangeable backends. This is only a mirror of https://gitlab.mpi-magdeburg.mpg.de/software/flexiblas-release
https://www.mpi-magdeburg.mpg.de/projects/flexiblas
GNU Lesser General Public License v3.0
36 stars 6 forks source link

flexiblas fails to find OpenBLAS and blis, despite them being installed, but finds atlas and Accelerate #40

Open barracuda156 opened 7 months ago

barracuda156 commented 7 months ago
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_Fortran: -fopenmp (found version "4.5") 
-- OpenBLAS-Serial:  Candidate: /opt/local/lib/libopenblas.dylib
-- OpenBLAS-Serial:  /opt/local/lib/libopenblas.dylib does not contain the Serial version of OpenBLAS.
-- Could NOT find OpenBLASSerial (missing: OpenBLASSerial_LIBRARY) 
-- OpenBLASSerial not found.
-- OpenBLAS-PThread:  Candidate: /opt/local/lib/libopenblas.dylib
-- OpenBLAS-PThread:  /opt/local/lib/libopenblas.dylib does not contain the PThread version of OpenBLAS.
-- Could NOT find OpenBLASPThread (missing: OpenBLASPThread_LIBRARY) 
-- OpenBLASPThread not found.
-- OpenBLAS-OpenMP:  Candidate: /opt/local/lib/libopenblas.dylib
-- OpenBLAS-OpenMP:  /opt/local/lib/libopenblas.dylib does not contain the OpenMP version of OpenBLAS.
-- Could NOT find OpenBLASOpenMP (missing: OpenBLASOpenMP_LIBRARY) 
-- OpenBLASOpenMP not found.
-- Could NOT find BlisSerial (missing: BlisSerial_LIBRARY) 
-- BlisSerial not found.
-- Could NOT find BlisPThread (missing: BlisPThread_LIBRARY) 
-- BlisPThread not found.
-- Could NOT find BlisOpenMP (missing: BlisOpenMP_LIBRARY) 
-- BlisOpenMP not found.
-- Search for MKL: mkl_gf_lp64 mkl_sequential mkl_core
-- MklSerial not found.
-- Search for MKL: mkl_gf_lp64 mkl_gnu_thread mkl_core
-- MklOpenMP not found.
-- PP: 
-- SP: 
-- MKL_TBB depends on TBB. Not Found.
-- MklTBB not found.
-- 
-- Search for ATLAS
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- BLAS Library ATLAS works with 64bit integers
-- Found BLAS: ATLAS (/opt/local/lib/libf77blas.a;/opt/local/lib/libtatlas.dylib;-lm)
-- Build extra BLAS interface: ATLAS
-- Libs: /opt/local/lib/libf77blas.a;/opt/local/lib/libtatlas.dylib;-lm
-- Performing Test ZDOTC_MKL
-- Performing Test ZDOTC_MKL - Failed
-- Looking for Fortran SCABS1
-- Looking for Fortran SCABS1 - not found
-- Looking for flexiblas_exit
-- Looking for flexiblas_exit - not found
-- Looking for Fortran DAXPY
-- Looking for Fortran DAXPY - found
-- Looking for Fortran MKL_DOMATCOPY
-- Looking for Fortran MKL_DOMATCOPY - not found
-- Looking for cblas_daxpy
-- Looking for cblas_daxpy - found
-- ATLAS does not provide a scabs1 function
-- Add CBLAS in dummy library
-- Extra Linker Flags: 
-- 
-- Search for Apple
-- Looking for Fortran dgemm
-- Looking for Fortran dgemm - found
-- BLAS Library Apple works with 64bit integers
-- Found BLAS: Apple (//System/Library/Frameworks/Accelerate.framework)
-- Build extra BLAS interface: Apple
-- Libs: //System/Library/Frameworks/Accelerate.framework
-- Performing Test ZDOTC_MKL
-- Performing Test ZDOTC_MKL - Failed
-- Looking for flexiblas_exit
-- Looking for flexiblas_exit - not found
-- Looking for Fortran DAXPY
-- Looking for Fortran DAXPY - found
-- Looking for Fortran MKL_DOMATCOPY
-- Looking for Fortran MKL_DOMATCOPY - not found
-- Looking for cblas_daxpy
-- Looking for cblas_daxpy - found
-- Apple does not provide a scabs1 function
-- Add CBLAS in dummy library
-- Extra Linker Flags: 
-- Default BLAS  not found. Use NETLIB instead.
-- Found hook directory.
-- Build profile hook.
-- Enable Testing...
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/sblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/sblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/sblat3.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/dblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/dblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/dblat3.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/cblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/cblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/cblat3.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/zblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/zblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/zblat3.in
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named sysconfig
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named sysconfig
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named sysconfig
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named sysconfig
-- Could NOT find PythonInterp (missing: PYTHON_INCLUDE_DIR) 
-- Running Summary
-- ------------------------------------------------
--       Final Configuration Status 
-- ------------------------------------------------
-- Build 8 byte integer: OFF
-- Build CBLAS interface: ON
-- Install path: /opt/local
-- Extra BLAS search path: /opt/local/lib/flexiblas/
-- LAPACK Support: ON
-- LAPACK_API_VERSION: 3.11.0
-- ABI: GNU
-- Interface to Extra BLAS Libraries:
--  /opt/local/lib/libf77blas.a;/opt/local/lib/libtatlas.dylib;-lm;gfortran - ATLAS 
--  //System/Library/Frameworks/Accelerate.framework;gfortran - APPLE 
-- Default BLAS: NETLIB
barracuda156 commented 7 months ago

Configure logs: CMakeOutput.log CMakeCache.txt CMakeError.log

barracuda156 commented 7 months ago

Above logs are relevant for OpenBLAS but not for blis, since it happened that it was inactive on that system, but nevertheless it is not found. I will update logs soon from 10.6, but even on 14.2 blis fails to be found (while OpenBLAS is found in this case):

-- Found OpenMP_C: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP_Fortran: -fopenmp (found version "4.5") 
-- OpenBLAS-Serial:  Candidate: /opt/local/lib/libopenblas.dylib
-- OpenBLAS-Serial:  /opt/local/lib/libopenblas.dylib does not contain the Serial version of OpenBLAS.
-- Could NOT find OpenBLASSerial (missing: OpenBLASSerial_LIBRARY) 
-- OpenBLASSerial not found.
-- OpenBLAS-PThread:  Candidate: /opt/local/lib/libopenblas.dylib
-- Found OpenBLASPThread: /opt/local/lib/libopenblas.dylib  
-- Build BLAS interface: OpenBLASPThread
-- Libs: /opt/local/lib/libopenblas.dylib
-- Build additional BLAS interface: OpenBLASPThread
-- -- Libs: /opt/local/lib/libopenblas.dylib
-- -- Linker Flags: 
-- Performing Test ZDOTC_MKL
-- Performing Test ZDOTC_MKL - Failed
-- Looking for flexiblas_exit
-- Looking for flexiblas_exit - not found
-- Looking for Fortran DAXPY
-- Looking for Fortran DAXPY - found
-- Looking for cblas_daxpy
-- Looking for cblas_daxpy - found
-- Looking for MKL_Get_Version
-- Looking for MKL_Get_Version - not found
-- Add CBLAS in dummy library
-- OpenBLAS-OpenMP:  Candidate: /opt/local/lib/libopenblas.dylib
-- OpenBLAS-OpenMP:  /opt/local/lib/libopenblas.dylib does not contain the OpenMP version of OpenBLAS.
-- Could NOT find OpenBLASOpenMP (missing: OpenBLASOpenMP_LIBRARY) 
-- OpenBLASOpenMP not found.
-- Blis-Serial:  Candidate: /opt/local/lib/libblis.dylib
-- Blis-Serial:  /opt/local/lib/libblis.dylib does not contain the Serial version of Blis.
-- Could NOT find BlisSerial (missing: BlisSerial_LIBRARY) 
-- BlisSerial not found.
-- Blis-PThread:  Candidate: /opt/local/lib/libblis.dylib
-- Blis-PThread:  /opt/local/lib/libblis.dylib does not contain the PThread version of Blis.
-- Could NOT find BlisPThread (missing: BlisPThread_LIBRARY) 
-- BlisPThread not found.
-- Blis-OpenMP:  Candidate: /opt/local/lib/libblis.dylib
-- Blis-OpenMP:  /opt/local/lib/libblis.dylib does not contain the OpenMP version of Blis.
-- Could NOT find BlisOpenMP (missing: BlisOpenMP_LIBRARY) 
-- BlisOpenMP not found.
-- Search for MKL: mkl_gf_lp64 mkl_sequential mkl_core
-- MklSerial not found.
-- Search for MKL: mkl_gf_lp64 mkl_gnu_thread mkl_core
-- MklOpenMP not found.
-- PP: 
-- SP: 
-- MKL_TBB depends on TBB. Not Found.
-- MklTBB not found.
-- 
-- Search for ATLAS
-- A library with BLAS API not found. Please specify library location.
-- 
-- Search for Apple
-- Looking for Fortran dgemm
-- Looking for Fortran dgemm - found
-- BLAS Library Apple works with 64bit integers
-- Found BLAS: Apple (/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework)
-- Build extra BLAS interface: Apple
-- Libs: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework
-- Performing Test ZDOTC_MKL
-- Performing Test ZDOTC_MKL - Success
-- Looking for Fortran SCABS1
-- Looking for Fortran SCABS1 - not found
-- Looking for flexiblas_exit
-- Looking for flexiblas_exit - not found
-- Looking for Fortran DAXPY
-- Looking for Fortran DAXPY - found
-- Looking for Fortran MKL_DOMATCOPY
-- Looking for Fortran MKL_DOMATCOPY - not found
-- Looking for cblas_daxpy
-- Looking for cblas_daxpy - found
-- Apple uses Intel ZDOTC
-- Apple does not provide a scabs1 function
-- Add CBLAS in dummy library
-- Extra Linker Flags: 
-- Default BLAS  not found. Use NETLIB instead.
-- Found hook directory.
-- Build profile hook.
-- Enable Testing...
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/sblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/sblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/sblat3.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/dblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/dblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/dblat3.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/cblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/cblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/cblat3.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/zblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/zblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.3.1/test/blas/zblat3.in
-- Found PythonInterp: /usr/bin/python3  
-- Found Python (3.9.6): /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers
-- Running Summary
-- ------------------------------------------------
--       Final Configuration Status 
-- ------------------------------------------------
-- Build 8 byte integer: OFF
-- Build CBLAS interface: ON
-- Install path: /opt/local
-- Extra BLAS search path: /opt/local/lib/flexiblas/
-- LAPACK Support: ON
-- LAPACK_API_VERSION: 3.11.0
-- ABI: GNU
-- Interface to Extra BLAS Libraries:
--  /opt/local/lib/libopenblas.dylib - OpenBLASPThread 
--  /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework - APPLE 
-- Default BLAS: NETLIB
-- 
-- Compiler Options:
--  CMAKE_C_FLAGS               = -pipe -Os -DNDEBUG -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -fPIC -D_FILE_OFFSET_BITS=64 
--  CMAKE_C_FLAGS_RELEASE       = -O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual
--  CMAKE_C_FLAGS_DEBUG         = -g -Wall -Wunused -g -Wextra -Wshadow -Wstrict-aliasing -Wundef -Wparentheses -Wcast-qual -O0 -Wpedantic -Wstrict-prototypes -Wcast-qual
--  CMAKE_Fortran_FLAGS         = -pipe -Os -m64 -frecursive -fPIC
--  CMAKE_Fortran_FLAGS_RELEASE = -O3 -DNDEBUG -O3 -O3
--  CMAKE_Fortran_FLAGS_DEBUG   = -g -Wimplicit-procedure -Wall -Wunused -Warray-temporaries -fbacktrace -Wshadow -O0
-- ------------------------------------------------
-- Configuring done
-- Generating done

CMakeOutput.log CMakeError.log CMakeCache.txt (These are logs from macOS Sonoma / aarch64.)

grisuthedragon commented 7 months ago

Since macOS isn't my default Default development platform, it will take some days to get rid of the error. Can you provide some information to reproduce your environment? Intel/Arm Mac, macports or brew and how (including options) you installed openblas and blis.

barracuda156 commented 7 months ago

@grisuthedragon Thank you for responding! Everything is Macports, and I maintain flexiblas port there.

For the time-being, please ignore OpenBLAS issue. I just got it recognized on 10.6 PPC (where it failed initially) after switching to a different version, so the error may be on our side.

blis does not work however on either of tested systems. (It may be our problem still, I just do not know.)

blis: https://ports.macports.org/port/blis https://github.com/macports/macports-ports/blob/master/math/blis/Portfile

Systems tested: 10.6 / ppc (PowerPC 32-bit), 14.2 / aarch64 (M1). For OpenBLAS, only OpenBLASPThread is found on either of the systems.

barracuda156 commented 7 months ago

@grisuthedragon Ok, I have found a fix for blis: we should disable rpath when building it. I will make a PR to Macports now.

Perhaps the only remaining question is whether it is correct that only pthread versions of both are found. Perhaps for blis it is expected, since it is explicitly set to that at the moment: https://github.com/macports/macports-ports/blob/47c9d89f5ad1fdddfe63f2b00c9a6426e6bf81bb/math/blis/Portfile#L30 I am not sure for OpenBLAS though.

grisuthedragon commented 6 months ago

@barracuda156

Systems tested: 10.6 / ppc (PowerPC 32-bit), 14.2 / aarch64 (M1). For OpenBLAS, only OpenBLASPThread is found on either of the systems.

Can you provide me the names and locations of the different OpenBLAS shared objects? I do not have a mac at available.

barracuda156 commented 6 months ago

@grisuthedragon If you click on Files on the right on the following page, it will show the list with paths: https://ports.macports.org/port/OpenBLAS/details As far as I can see, it is uniform across the platforms (to no surprise, it should be).

grisuthedragon commented 6 months ago

So the macports variant of OpenBLAS is fixed with respected to threading. It seems that it only provides one version.

barracuda156 commented 6 months ago

So the macports variant of OpenBLAS is fixed with respected to threading. It seems that it only provides one version.

It does not seem we have any local fixes with regard to threading: https://github.com/macports/macports-ports/blob/master/math/OpenBLAS/Portfile It something supposed to be broken in the upstream version?

This port tracks upstream: https://ports.macports.org/port/OpenBLAS-devel/details (with some delay).

grisuthedragon commented 6 months ago

As far as I understand the portfile, you are builing the Pthreads version of OpenBLAS (This is the default if nothing different). Thus it would be correct, that FlexiBLAS only finds the -- /opt/local/lib/libopenblas.dylib - OpenBLASPThread version of it.

barracuda156 commented 1 month ago

@grisuthedragon Sorry to resurrect this, but blis does not seem to work with recent versions of flexiblas again. The installation of blis appears correct (no @rpath):

36-244% otool -L /opt/local/lib/libblis.dylib
/opt/local/lib/libblis.dylib:
    /opt/local/lib/libblis.4.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 117.0.0)

However it is not accepted:

:info:configure -- Blis-Serial:  Candidate: /opt/local/lib/libblis.dylib
:info:configure -- Blis-Serial:  /opt/local/lib/libblis.dylib does not contain the Serial version of Blis.
:info:configure -- Could NOT find BlisSerial (missing: BlisSerial_LIBRARY) 
:info:configure -- BlisSerial not found.
:info:configure -- Blis-PThread:  Candidate: /opt/local/lib/libblisp.dylib
:info:configure -- Blis-PThread:  /opt/local/lib/libblisp.dylib does not contain the PThread version of Blis.
:info:configure -- Could NOT find BlisPThread (missing: BlisPThread_LIBRARY) 
:info:configure -- BlisPThread not found.
:info:configure -- Blis-OpenMP:  Candidate: /opt/local/lib/libblis.dylib
:info:configure -- Blis-OpenMP:  /opt/local/lib/libblis.dylib does not contain the OpenMP version of Blis.
:info:configure -- Could NOT find BlisOpenMP (missing: BlisOpenMP_LIBRARY) 
:info:configure -- BlisOpenMP not found.

Others are okay:

:info:configure -- ------------------------------------------------
:info:configure --       Final Configuration Status 
:info:configure -- ------------------------------------------------
:info:configure -- Build 8 byte integer: OFF
:info:configure -- Build CBLAS interface: ON
:info:configure -- Install path: /opt/local
:info:configure -- Extra BLAS search path: /opt/local/lib/flexiblas/
:info:configure -- LAPACK Support: ON
:info:configure -- LAPACK_API_VERSION: 3.12.0
:info:configure -- ABI: GNU
:info:configure -- Interface to Extra BLAS Libraries:
:info:configure --  /opt/local/lib/libopenblas.dylib - OpenBLASPThread 
:info:configure --  //usr/lib/libblas.dylib;/opt/local/lib/libf77blas.a;/opt/local/lib/libatlas.a;gfortran - ATLAS 
:info:configure --  //System/Library/Frameworks/Accelerate.framework;gfortran - APPLE 
:info:configure -- Default BLAS: NETLIB

CMake configure log has this:

    kind: "try_run-v1"
    backtrace:
      - "cmake/FindBlisSerial.cmake:38 (TRY_RUN)"
      - "src/CMakeLists.txt:480 (FIND_PACKAGE)"
      - "src/CMakeLists.txt:631 (BuildFindPackage)"
    directories:
      source: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/CMakeFiles/CMakeTmp"
      binary: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/CMakeFiles/CMakeTmp"
    cmakeVariables:
      CMAKE_C_FLAGS: "-pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64 "
      CMAKE_C_FLAGS_RELEASE: "-O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual"
      CMAKE_EXE_LINKER_FLAGS: "-Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc"
      CMAKE_MODULE_PATH: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/flexiblas-3.4.3/libcscutils/CMakeModules;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/flexiblas-3.4.3/cmake;/opt/local/share/cmake/Modules"
      CMAKE_OSX_ARCHITECTURES: "ppc"
      CMAKE_OSX_DEPLOYMENT_TARGET: "10.6"
      CMAKE_OSX_SYSROOT: "/"
      CMAKE_POSITION_INDEPENDENT_CODE: "ON"
      CMAKE_WARN_DEPRECATED: "FALSE"
    buildResult:
      variable: "_COMPILE_RES"
      cached: true
      stdout: |
        Change Dir: '/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/CMakeFiles/CMakeTmp'

        Run Build Command(s): /opt/local/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_48a14/fast
        /usr/bin/make  -f CMakeFiles/cmTC_48a14.dir/build.make CMakeFiles/cmTC_48a14.dir/build
        Building C object CMakeFiles/cmTC_48a14.dir/otest.c.o
        /opt/local/bin/gcc-mp-13   -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64   -O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual -std=gnu99 -arch ppc -mmacosx-version-min=10.6 -fPIE -o CMakeFiles/cmTC_48a14.dir/otest.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c:7:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
            7 |     extern int bli_info_get_enable_blas();
              |     ^~~~~~
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c:8:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
            8 |     extern int bli_info_get_enable_openmp();
              |     ^~~~~~
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c:9:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
            9 |     extern int bli_info_get_enable_pthreads();
              |     ^~~~~~
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c:10:9: warning: function declaration isn't a prototype [-Wstrict-prototypes]
           10 |     int main() { assert(bli_info_get_enable_pthreads() == 0 && bli_info_get_enable_openmp()==0); return 0;}
              |         ^~~~
        Linking C executable cmTC_48a14
        /opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_48a14.dir/link.txt --verbose=1
        /opt/local/bin/gcc-mp-13 -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64   -O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual -arch ppc -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc  CMakeFiles/cmTC_48a14.dir/otest.c.o -o cmTC_48a14  /opt/local/lib/libblis.dylib

      exitCode: 0
    runResult:
      variable: "_RUN_RES"
      cached: true
      stdout: |
        Assertion failed: (bli_info_get_enable_pthreads() == 0 && bli_info_get_enable_openmp()==0), function main, file /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c, line 10.
        Subprocess aborted
      exitCode: "FAILED_TO_RUN"
  -
    kind: "try_run-v1"
    backtrace:
      - "cmake/FindBlisPThread.cmake:38 (TRY_RUN)"
      - "src/CMakeLists.txt:480 (FIND_PACKAGE)"
      - "src/CMakeLists.txt:632 (BuildFindPackage)"
    directories:
      source: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/CMakeFiles/CMakeTmp"
      binary: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/CMakeFiles/CMakeTmp"
    cmakeVariables:
      CMAKE_C_FLAGS: "-pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64 "
      CMAKE_C_FLAGS_RELEASE: "-O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual"
      CMAKE_EXE_LINKER_FLAGS: "-Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc"
      CMAKE_MODULE_PATH: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/flexiblas-3.4.3/libcscutils/CMakeModules;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/flexiblas-3.4.3/cmake;/opt/local/share/cmake/Modules"
      CMAKE_OSX_ARCHITECTURES: "ppc"
      CMAKE_OSX_DEPLOYMENT_TARGET: "10.6"
      CMAKE_OSX_SYSROOT: "/"
      CMAKE_POSITION_INDEPENDENT_CODE: "ON"
      CMAKE_WARN_DEPRECATED: "FALSE"
    buildResult:
      variable: "_COMPILE_RES"
      cached: true
      stdout: |
        Change Dir: '/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/CMakeFiles/CMakeTmp'

        Run Build Command(s): /opt/local/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_ce0cb/fast
        /usr/bin/make  -f CMakeFiles/cmTC_ce0cb.dir/build.make CMakeFiles/cmTC_ce0cb.dir/build
        Building C object CMakeFiles/cmTC_ce0cb.dir/otest.c.o
        /opt/local/bin/gcc-mp-13   -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64   -O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual -std=gnu99 -arch ppc -mmacosx-version-min=10.6 -fPIE -o CMakeFiles/cmTC_ce0cb.dir/otest.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c:7:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
            7 |     extern int bli_info_get_enable_blas();
              |     ^~~~~~
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c:8:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
            8 |     extern int bli_info_get_enable_openmp();
              |     ^~~~~~
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c:9:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
            9 |     extern int bli_info_get_enable_pthreads();
              |     ^~~~~~
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/otest.c:10:9: warning: function declaration isn't a prototype [-Wstrict-prototypes]
           10 |     int main() { assert(bli_info_get_enable_pthreads() == 1 && bli_info_get_enable_openmp()==0); return 0;}
              |         ^~~~
        Linking C executable cmTC_ce0cb
        /opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ce0cb.dir/link.txt --verbose=1
        /opt/local/bin/gcc-mp-13 -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64   -O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual -arch ppc -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc  CMakeFiles/cmTC_ce0cb.dir/otest.c.o -o cmTC_ce0cb  /opt/local/lib/libblisp.dylib
        Undefined symbols:
          "_bli_info_get_enable_openmp", referenced from:
              _main in otest.c.o
          "_bli_info_get_enable_pthreads", referenced from:
              _main in otest.c.o
        ld: symbol(s) not found
        collect2: error: ld returned 1 exit status
        make[1]: *** [cmTC_ce0cb] Error 1
        make: *** [cmTC_ce0cb/fast] Error 2

      exitCode: 2
    runResult:
      variable: "_RUN_RES"
      cached: true
  -
    kind: "try_run-v1"
    backtrace:
      - "cmake/FindBlisOpenMP.cmake:38 (TRY_RUN)"
      - "src/CMakeLists.txt:480 (FIND_PACKAGE)"
      - "src/CMakeLists.txt:633 (BuildFindPackage)"
    directories:
      source: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/CMakeFiles/CMakeTmp"
      binary: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/CMakeFiles/CMakeTmp"
    cmakeVariables:
      CMAKE_C_FLAGS: "-pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64 "
      CMAKE_C_FLAGS_RELEASE: "-O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual"
      CMAKE_EXE_LINKER_FLAGS: "-Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc"
      CMAKE_MODULE_PATH: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/flexiblas-3.4.3/libcscutils/CMakeModules;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/flexiblas-3.4.3/cmake;/opt/local/share/cmake/Modules"
      CMAKE_OSX_ARCHITECTURES: "ppc"
      CMAKE_OSX_DEPLOYMENT_TARGET: "10.6"
      CMAKE_OSX_SYSROOT: "/"
      CMAKE_POSITION_INDEPENDENT_CODE: "ON"
      CMAKE_WARN_DEPRECATED: "FALSE"
    buildResult:
      variable: "_COMPILE_RES"
      cached: true
      stdout: |
        Change Dir: '/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/CMakeFiles/CMakeTmp'

        Run Build Command(s): /opt/local/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_7505e/fast
        /usr/bin/make  -f CMakeFiles/cmTC_7505e.dir/build.make CMakeFiles/cmTC_7505e.dir/build
        Building C object CMakeFiles/cmTC_7505e.dir/btest.c.o
        /opt/local/bin/gcc-mp-13   -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64   -O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual -std=gnu99 -arch ppc -mmacosx-version-min=10.6 -fPIE -o CMakeFiles/cmTC_7505e.dir/btest.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/btest.c
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/btest.c:7:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
            7 |     extern int bli_info_get_enable_blas();
              |     ^~~~~~
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/btest.c:8:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
            8 |     extern int bli_info_get_enable_openmp();
              |     ^~~~~~
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/btest.c:9:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
            9 |     extern int bli_info_get_enable_pthreads();
              |     ^~~~~~
        /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/btest.c:10:9: warning: function declaration isn't a prototype [-Wstrict-prototypes]
           10 |     int main() { assert(bli_info_get_enable_pthreads() == 0 && bli_info_get_enable_openmp()==1) ; return 0;}
              |         ^~~~
        Linking C executable cmTC_7505e
        /opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7505e.dir/link.txt --verbose=1
        /opt/local/bin/gcc-mp-13 -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64   -O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual -arch ppc -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc  CMakeFiles/cmTC_7505e.dir/btest.c.o -o cmTC_7505e  /opt/local/lib/libblis.dylib

      exitCode: 0
    runResult:
      variable: "_RUN_RES"
      cached: true
      stdout: |
        Assertion failed: (bli_info_get_enable_pthreads() == 0 && bli_info_get_enable_openmp()==1), function main, file /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_flexiblas/flexiblas/work/build/btest.c, line 10.
        Subprocess aborted
      exitCode: "FAILED_TO_RUN"
  -
grisuthedragon commented 1 month ago

That looks like something in the BLIS library provided by macports changed. I'll try to take a look on this.

barracuda156 commented 1 month ago

@grisuthedragon At least not by intention. The last update was trivial: https://github.com/macports/macports-ports/commit/7ce24d79cf216f251785b6b42557a1347d3a52fe

Before that there was an rpath fix which actually made it work with FlexiBLAS earlier. Nothing in between: https://github.com/macports/macports-ports/commits/master/math/blis/Portfile

There was a change to linearalgebra PortGroup (which is actually slightly wrong but a better fix not yet merged) related to blis when it is used as a variant: https://github.com/macports/macports-ports/commit/5986d5a39071ec27241f81d7a96baa147bea7a60 But FlexiBLAS port does not use blis via a variant, it just sets a dependency directly (because we do not want either OpenBLAS or blis but both): https://github.com/macports/macports-ports/blob/8f118cb25575e545ca42033c539653e833a65c76/math/flexiblas/Portfile

Also, we can see that FlexiBLAS does find libblis, but does not accept it. This should not be caused by the port group (an error in PG will rather prevent finding something or allow linking where it should not be allowed).

barracuda156 commented 1 month ago

I can try removing the port group completely, I am not sure we actually need it at all.

barracuda156 commented 1 month ago

UPD. Sorry, turned out flexiblas is not using linear_algebra portgroup, so changes there are irrelevant. But then it is even more puzzling, what did change at all to produce such an effect.

barracuda156 commented 1 month ago

@grisuthedragon So, 3.3.1 linked to blis, commit for the port version: https://github.com/macports/macports-ports/commit/d49e446aa7c704fec3e5188308d7c115b8578b55 And 3.4.1 did not, commit: https://github.com/macports/macports-ports/commit/c325d5a6dbe7f818bef45a6af298721353d3a41a

There were no updates for the blis port in between these: https://github.com/macports/macports-ports/commits/master/math/blis/Portfile

Specifically, here are differences on my machine:

Port flexiblas @3.3.1_2+gfortran contains:
  /etc/opt/local/flexiblasrc
  /etc/opt/local/flexiblasrc.d/ATLAS.conf
  /etc/opt/local/flexiblasrc.d/Apple.conf
  /etc/opt/local/flexiblasrc.d/BlisPThread.conf
  /etc/opt/local/flexiblasrc.d/NETLIB.conf
  /etc/opt/local/flexiblasrc.d/OpenBLASPThread.conf
  /opt/local/bin/flexiblas
  /opt/local/bin/flexiblas-config
  /opt/local/include/flexiblas/blas_gnu.h
  /opt/local/include/flexiblas/blas_intel.h
  /opt/local/include/flexiblas/cblas.h
  /opt/local/include/flexiblas/flexiblas_api.h
  /opt/local/include/flexiblas/flexiblas_backend.h
  /opt/local/include/flexiblas/flexiblas_config.h
  /opt/local/include/flexiblas/flexiblas_dummy_cblas.h
  /opt/local/include/flexiblas/flexiblas_dummy_fortran.h
  /opt/local/include/flexiblas/flexiblas_fortran_mangle.h
  /opt/local/include/flexiblas/flexiblas_mgmt.h
  /opt/local/include/flexiblas/flexiblas_real_calls.h
  /opt/local/include/flexiblas/flexiblas_real_cblas_calls.h
  /opt/local/include/flexiblas/flexiblas_real_lapack.h
  /opt/local/include/flexiblas/lapack.h
  /opt/local/lib/flexiblas/libflexiblas_apple.dylib
  /opt/local/lib/flexiblas/libflexiblas_atlas.dylib
  /opt/local/lib/flexiblas/libflexiblas_blispthread.dylib
  /opt/local/lib/flexiblas/libflexiblas_fallback_lapack.dylib
  /opt/local/lib/flexiblas/libflexiblas_hook_dummy.dylib
  /opt/local/lib/flexiblas/libflexiblas_hook_profile.dylib
  /opt/local/lib/flexiblas/libflexiblas_netlib.dylib
  /opt/local/lib/flexiblas/libflexiblas_openblaspthread.dylib
  /opt/local/lib/libflexiblas.3.3.dylib
  /opt/local/lib/libflexiblas.3.dylib
  /opt/local/lib/libflexiblas.dylib
  /opt/local/lib/libflexiblas_api.3.3.dylib
  /opt/local/lib/libflexiblas_api.3.dylib
  /opt/local/lib/libflexiblas_api.dylib
  /opt/local/lib/libflexiblas_mgmt.3.3.dylib
  /opt/local/lib/libflexiblas_mgmt.3.dylib
  /opt/local/lib/libflexiblas_mgmt.dylib
  /opt/local/lib/pkgconfig/flexiblas.pc
  /opt/local/lib/pkgconfig/flexiblas_api.pc
  /opt/local/share/man/man1/flexiblas.1.gz
  /opt/local/share/man/man3/flexiblas_avail.3.gz
  /opt/local/share/man/man3/flexiblas_current_backend.3.gz
  /opt/local/share/man/man3/flexiblas_get_num_threads.3.gz
  /opt/local/share/man/man3/flexiblas_get_version.3.gz
  /opt/local/share/man/man3/flexiblas_list.3.gz
  /opt/local/share/man/man3/flexiblas_list_loaded.3.gz
  /opt/local/share/man/man3/flexiblas_load_backend.3.gz
  /opt/local/share/man/man3/flexiblas_load_backend_library.3.gz
  /opt/local/share/man/man3/flexiblas_print_avail_backends.3.gz
  /opt/local/share/man/man3/flexiblas_print_current_backend.3.gz
  /opt/local/share/man/man3/flexiblas_print_loaded_backends.3.gz
  /opt/local/share/man/man3/flexiblas_set_num_threads.3.gz
  /opt/local/share/man/man3/flexiblas_switch.3.gz
  /opt/local/share/man/man7/flexiblas-api.7.gz

vs

Port flexiblas @3.4.1_0+gfortran contains:
  /etc/opt/local/flexiblasrc
  /etc/opt/local/flexiblasrc.d/ATLAS.conf
  /etc/opt/local/flexiblasrc.d/Apple.conf
  /etc/opt/local/flexiblasrc.d/NETLIB.conf
  /etc/opt/local/flexiblasrc.d/OpenBLASPThread.conf
  /opt/local/bin/flexiblas
  /opt/local/bin/flexiblas-config
  /opt/local/include/flexiblas/blas_gnu.h
  /opt/local/include/flexiblas/blas_intel.h
  /opt/local/include/flexiblas/cblas.h
  /opt/local/include/flexiblas/flexiblas_api.h
  /opt/local/include/flexiblas/flexiblas_backend.h
  /opt/local/include/flexiblas/flexiblas_config.h
  /opt/local/include/flexiblas/flexiblas_dummy_cblas.h
  /opt/local/include/flexiblas/flexiblas_dummy_fortran.h
  /opt/local/include/flexiblas/flexiblas_fortran_mangle.h
  /opt/local/include/flexiblas/flexiblas_mgmt.h
  /opt/local/include/flexiblas/flexiblas_real_calls.h
  /opt/local/include/flexiblas/flexiblas_real_cblas_calls.h
  /opt/local/include/flexiblas/flexiblas_real_lapack.h
  /opt/local/include/flexiblas/lapack.h
  /opt/local/lib/flexiblas/libflexiblas_apple.dylib
  /opt/local/lib/flexiblas/libflexiblas_atlas.dylib
  /opt/local/lib/flexiblas/libflexiblas_fallback_lapack.dylib
  /opt/local/lib/flexiblas/libflexiblas_hook_dummy.dylib
  /opt/local/lib/flexiblas/libflexiblas_hook_profile.dylib
  /opt/local/lib/flexiblas/libflexiblas_netlib.dylib
  /opt/local/lib/flexiblas/libflexiblas_openblaspthread.dylib
  /opt/local/lib/libflexiblas.3.4.dylib
  /opt/local/lib/libflexiblas.3.dylib
  /opt/local/lib/libflexiblas.dylib
  /opt/local/lib/libflexiblas_api.3.4.dylib
  /opt/local/lib/libflexiblas_api.3.dylib
  /opt/local/lib/libflexiblas_api.dylib
  /opt/local/lib/libflexiblas_mgmt.3.4.dylib
  /opt/local/lib/libflexiblas_mgmt.3.dylib
  /opt/local/lib/libflexiblas_mgmt.dylib
  /opt/local/lib/pkgconfig/flexiblas.pc
  /opt/local/lib/pkgconfig/flexiblas_api.pc
  /opt/local/share/man/man1/flexiblas.1.gz
  /opt/local/share/man/man3/flexiblas_avail.3.gz
  /opt/local/share/man/man3/flexiblas_current_backend.3.gz
  /opt/local/share/man/man3/flexiblas_get_num_threads.3.gz
  /opt/local/share/man/man3/flexiblas_get_version.3.gz
  /opt/local/share/man/man3/flexiblas_list.3.gz
  /opt/local/share/man/man3/flexiblas_list_loaded.3.gz
  /opt/local/share/man/man3/flexiblas_load_backend.3.gz
  /opt/local/share/man/man3/flexiblas_load_backend_library.3.gz
  /opt/local/share/man/man3/flexiblas_print_avail_backends.3.gz
  /opt/local/share/man/man3/flexiblas_print_current_backend.3.gz
  /opt/local/share/man/man3/flexiblas_print_loaded_backends.3.gz
  /opt/local/share/man/man3/flexiblas_set_num_threads.3.gz
  /opt/local/share/man/man3/flexiblas_switch.3.gz
  /opt/local/share/man/man7/flexiblas-api.7.gz

FlexiBLAS update on our side was trivial, no added or dropped patches or configure arguments.

However, right now I reverted to FlexiBLAS 3.3.1, and it does not accept blis (neither 0.9 nor 1.0).

I would have suggested that it is my local issue on a PowerPC machine (which is not a standard MacPorts set-up), but I tried on macOS Sonoma with a standard MacPorts environment with Clang, and got the same outcome, blis is not found.

So it looks like it is not a problem of FlexiBLAS, of blis, of powerpc or my toolchain changes, or of updates to MacPorts ports for FlexiBLAS or blis. I even tried to reverting to an old version of CMake, removing legacysupport from portfile, reverting a change in compilers port group and switching to python310. Nothing helps. I am kinda out of ideas at this point.

Admittedly, I did not try every possible combo on two machines, but I tried to rule out deterministic breakages due to factors which changed in between a successful and unsuccessful builds. At the same time nothing seems to change with regard to finding OpenBLAS or atlas. Those work consistently, blis likewise fails. But it worked in December.

barracuda156 commented 1 month ago

For the reference, configure from Sonoma:

--->  Configuring flexiblas
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DABI=GNU -DBLAS_AUTO_DETECT=ON -DBUILD_SHARED_LIBS=ON -DDEV=OFF -DEXAMPLES=OFF -DLAPACK=ON -DLINK_OPENMP=ON -DMKL_BUILDER=OFF -DPythonInterp=/opt/local/bin/python3.11 -DTESTS=ON -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="14.0" -DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2 
-- The C compiler identification is Clang 16.0.6
-- The Fortran compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/local/bin/clang-mp-16 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /opt/local/bin/gfortran-mp-13 - skipped
-- Configuring FlexiBLAS 3.4.2
-- SYSCONFDIR: /etc/opt/local
-- LIBDIR:     /opt/local/lib
-- BINDIR:     /opt/local/bin
-- INCLUDEDIR: /opt/local/include
-- MANDIR:     /opt/local/share/man
-- Compiler_ID: Clang
-- FCompiler_ID: GNU
-- Fortran compiler supports -frecursive
-- Fortran compiler supports -fPIC
-- Fortran compiler supports -O3
-- Fortran compiler supports -Wimplicit-procedure
-- Fortran compiler supports -Wall
-- Fortran compiler supports -Wunused
-- Fortran compiler supports -Warray-temporaries
-- Fortran compiler supports -fbacktrace
-- Fortran compiler supports -Wshadow
-- Fortran compiler supports -O0
-- Performing Test C_W_PEDANTIC
-- Performing Test C_W_PEDANTIC - Success
-- Performing Test C_W_STRICT_PROTOTYPES
-- Performing Test C_W_STRICT_PROTOTYPES - Success
-- Performing Test C_W_CAST_QUAL
-- Performing Test C_W_CAST_QUAL - Success
-- Found OpenMP_C: -fopenmp=libomp (found version "5.0")
-- Found OpenMP_Fortran: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "5.0")
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
-- Verifying Fortran/C Compiler Compatibility
-- Verifying Fortran/C Compiler Compatibility - Success
-- Check for Thread Local Storage
-- Performing Test HAVE_THREAD_LOCAL
-- Performing Test HAVE_THREAD_LOCAL - Success
-- Performing Test HAVE__THREAD_LOCAL
-- Performing Test HAVE__THREAD_LOCAL - Success
-- Performing Test HAVE_GNU_THREAD_LOCAL
-- Performing Test HAVE_GNU_THREAD_LOCAL - Success
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - found
-- Looking for include file sys/sysmacro.h
-- Looking for include file sys/sysmacro.h - not found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for RTLD_GLOBAL
-- Looking for RTLD_GLOBAL - found
-- Looking for RTLD_DEEPBIND
-- Looking for RTLD_DEEPBIND - not found
-- Looking for RTLD_NOW
-- Looking for RTLD_NOW - found
-- Looking for RTLD_NODELETE
-- Looking for RTLD_NODELETE - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Check for __attribute__((constructor))
-- Looking for attribute:  constructor  - works
-- Check for __attribute__((alias("foo")))
-- Looking for attribute alias("foo") - not found
-- Check for __attribute__((visibility("hidden")))
-- Looking for attribute:  visibility("hidden")  - works
-- Check for __attribute__((visibility("default")))
-- Looking for attribute:  visibility("default")  - works
-- Check for __attribute__((unused))
-- Looking for attribute:  unused  - works
-- libcscutils in project build

-- LIBCSCUTILS Features
-- Enable module: inifile
-- Enable module: ds

-- Check Generic Functionality
-- Check for __attribute__((constructor))
-- Looking for attribute:  constructor  - works
-- Check for __attribute__((deprecated))
-- Looking for attribute:  deprecated  - works
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Looking for pthread_yield
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for pthread_yield - not found.
-- Looking for include file execinfo.h
-- Looking for include file execinfo.h - found
-- Looking for backtrace
-- Looking for backtrace - found
-- Looking for backtrace_symbols
-- Looking for backtrace_symbols - found
-- Enable csc_show_backtrace.
-- Looking for strnlen
-- Looking for strnlen
-- Looking for strnlen - found
-- Looking for strnlen - found (using _NONE_).
-- Looking for strndup
-- Looking for strndup
-- Looking for strndup - found
-- Looking for strndup - found (using _NONE_).
-- Looking for include file sys/ioctl.h
-- Looking for include file sys/ioctl.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for getline
-- Looking for getline
-- Looking for getline - found
-- Looking for getline - found (using _NONE_).
-- Looking for getdelim
-- Looking for getdelim
-- Looking for getdelim - found
-- Looking for getdelim - found (using _NONE_).

-- Features for CSC-INIFILE
-- Looking for realpath
-- Looking for realpath
-- Looking for realpath - found
-- Looking for realpath - found (using _NONE_).

-- External Libraries
-- Could NOT find CPUFREQ (missing: CPUFREQ_LIBRARIES CPUFREQ_INCLUDE_DIR) 
CPUFREQ not found. Either cpufreq.h or libcpupower.so is missing.
-- Looking for strdup
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strdup - found (using _NONE_).
-- Looking for realpath
-- Looking for realpath
-- Looking for realpath - found
-- Looking for realpath - found (using _NONE_).
-- Netlib BLAS uses the scaling/overflow/underflow improvements from LAPACK 3.10
-- Performing Test _frecursiveFlag
-- Performing Test _frecursiveFlag - Success
-- Reducing RELEASE optimization level to O2
-- Looking for Fortran NONE - found
-- Looking for Fortran INT_CPU_TIME - found
-- Looking for Fortran EXT_ETIME - not found
-- Looking for Fortran EXT_ETIME_ - not found
-- Looking for Fortran INT_ETIME - found
-- --> Will use second_INT_ETIME.f and dsecnd_INT_ETIME.f as timing function.
-- Found OpenMP_C: -fopenmp=libomp (found version "5.0")
-- Found OpenMP_Fortran: -fopenmp (found version "4.5")
-- OpenBLAS-Serial:  Candidate: /opt/local/lib/libopenblas.dylib
-- OpenBLAS-Serial:  /opt/local/lib/libopenblas.dylib does not contain the Serial version of OpenBLAS.
-- Could NOT find OpenBLASSerial (missing: OpenBLASSerial_LIBRARY) 
-- OpenBLASSerial not found.
-- OpenBLAS-PThread:  Candidate: /opt/local/lib/libopenblas.dylib
-- Found OpenBLASPThread: /opt/local/lib/libopenblas.dylib
-- Build BLAS interface: OpenBLASPThread
-- Libs: /opt/local/lib/libopenblas.dylib
-- Build additional BLAS interface: OpenBLASPThread
-- -- Libs: /opt/local/lib/libopenblas.dylib
-- -- Linker Flags: 
-- Performing Test ZDOTC_MKL
-- Performing Test ZDOTC_MKL - Failed
-- Looking for flexiblas_exit
-- Looking for flexiblas_exit - not found
-- Looking for Fortran DAXPY
-- Looking for Fortran DAXPY - found
-- Looking for cblas_daxpy
-- Looking for cblas_daxpy - found
-- Looking for MKL_Get_Version
-- Looking for MKL_Get_Version - not found
-- Add CBLAS in dummy library
-- OpenBLAS-OpenMP:  Candidate: /opt/local/lib/libopenblas.dylib
-- OpenBLAS-OpenMP:  /opt/local/lib/libopenblas.dylib does not contain the OpenMP version of OpenBLAS.
-- Could NOT find OpenBLASOpenMP (missing: OpenBLASOpenMP_LIBRARY) 
-- OpenBLASOpenMP not found.
-- Blis-Serial:  Candidate: /opt/local/lib/libblis.dylib
-- Blis-Serial:  /opt/local/lib/libblis.dylib does not contain the Serial version of Blis.
-- Could NOT find BlisSerial (missing: BlisSerial_LIBRARY) 
-- BlisSerial not found.
-- Blis-PThread:  Candidate: /opt/local/lib/libblisp.dylib
-- Blis-PThread:  /opt/local/lib/libblisp.dylib does not contain the PThread version of Blis.
-- Could NOT find BlisPThread (missing: BlisPThread_LIBRARY) 
-- BlisPThread not found.
-- Blis-OpenMP:  Candidate: /opt/local/lib/libblis.dylib
-- Blis-OpenMP:  /opt/local/lib/libblis.dylib does not contain the OpenMP version of Blis.
-- Could NOT find BlisOpenMP (missing: BlisOpenMP_LIBRARY) 
-- BlisOpenMP not found.
-- Search for MKL: mkl_gf_lp64 mkl_sequential mkl_core
-- MklSerial not found.
-- Search for MKL: mkl_gf_lp64 mkl_gnu_thread mkl_core
-- MklOpenMP not found.
-- PP: 
-- SP: 
-- MKL_TBB depends on TBB. Not Found.
-- MklTBB not found.
-- 
-- Search for ATLAS
-- A library with BLAS API not found. Please specify library location.
-- 
-- Search for Apple
-- Looking for Fortran dgemm
-- Looking for Fortran dgemm - found
-- BLAS Library Apple works with 64bit integers
-- Found BLAS: Apple (/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework)
-- Build extra BLAS interface: Apple
-- Libs: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework
-- Performing Test ZDOTC_MKL
-- Performing Test ZDOTC_MKL - Success
-- Looking for Fortran SCABS1
-- Looking for Fortran SCABS1 - not found
-- Looking for flexiblas_exit
-- Looking for flexiblas_exit - not found
-- Looking for Fortran DAXPY
-- Looking for Fortran DAXPY - found
-- Looking for Fortran MKL_DOMATCOPY
-- Looking for Fortran MKL_DOMATCOPY - not found
-- Looking for cblas_daxpy
-- Looking for cblas_daxpy - found
-- Apple uses Intel ZDOTC
-- Apple does not provide a scabs1 function
-- Add CBLAS in dummy library
-- Extra Linker Flags: 
-- Default BLAS  not found. Use NETLIB instead.
-- Found hook directory.
-- Build profile hook.
-- Found PythonInterp: /usr/bin/python3
-- Found Python (3.9.6): /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers
-- Enable Testing...
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/sblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/sblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/sblat3.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/dblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/dblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/dblat3.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/cblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/cblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/cblat3.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/zblat1.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/zblat2.in
-- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_flexiblas/flexiblas/work/flexiblas-3.4.2/test/blas/zblat3.in
-- Running Summary
-- Execute Test Summary after testing
-- ------------------------------------------------
--       Final Configuration Status 
-- ------------------------------------------------
-- Build 8 byte integer: OFF
-- Build CBLAS interface: ON
-- Install path: /opt/local
-- Extra BLAS search path: /opt/local/lib/flexiblas/
-- LAPACK Support: ON
-- LAPACK_API_VERSION: 3.12.0
-- ABI: GNU
-- Interface to Extra BLAS Libraries:
--  /opt/local/lib/libopenblas.dylib - OpenBLASPThread 
--  /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework - APPLE 
-- Default BLAS: NETLIB
-- 
-- Compiler Options:
--  CMAKE_C_FLAGS               = -pipe -Os -DNDEBUG -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -fPIC -D_FILE_OFFSET_BITS=64 
--  CMAKE_C_FLAGS_RELEASE       = -O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual
--  CMAKE_C_FLAGS_DEBUG         = -g -Wall -Wunused -g -Wextra -Wshadow -Wstrict-aliasing -Wundef -Wparentheses -Wcast-qual -O0 -Wpedantic -Wstrict-prototypes -Wcast-qual
--  CMAKE_Fortran_FLAGS         = -pipe -Os -m64 -frecursive -fPIC
--  CMAKE_Fortran_FLAGS_RELEASE = -O3 -O3
--  CMAKE_Fortran_FLAGS_DEBUG   = -g -Wimplicit-procedure -Wall -Wunused -Warray-temporaries -fbacktrace -Wshadow -O0
-- ------------------------------------------------
-- Configuring done (26.7s)
-- Generating done (1.1s)
barracuda156 commented 1 month ago

@szhorvat @catap Guys, maybe you could help here? I have no idea what got broken, but now our MacPorts FlexBLAS does not accept our blis (tried on 10.6 ppc and 14.5 arm64), while back in December it did.

grisuthedragon commented 1 month ago

Can you check if the following functions are available in your blis shared object?

If I compiler blis 1.0 under linux I get:

$ nm lib/haswell/libblis.so | grep bli_info_get_enable_
000000000016ad10 T bli_info_get_enable_blas
000000000016ad20 T bli_info_get_enable_cblas
000000000016ad80 T bli_info_get_enable_hpx
000000000016adf0 T bli_info_get_enable_hpx_as_default
000000000016ae40 T bli_info_get_enable_memkind
000000000016ad60 T bli_info_get_enable_openmp
000000000016add0 T bli_info_get_enable_openmp_as_default
000000000016ad40 T bli_info_get_enable_pba_pools
000000000016ad70 T bli_info_get_enable_pthreads
000000000016ade0 T bli_info_get_enable_pthreads_as_default
000000000016ae50 T bli_info_get_enable_sandbox
000000000016ad50 T bli_info_get_enable_sba_pools
000000000016ad90 T bli_info_get_enable_threading
000000000016ae30 T bli_info_get_enable_tls

and regarding your configure output, these are missing in your blis shared object.

barracuda156 commented 1 month ago

This is on 14.5 arm64:

% nm /opt/local/lib/libblis.4.dylib | grep bli_info_get_enable_
0000000000090200 T _bli_info_get_enable_blas
0000000000090208 T _bli_info_get_enable_cblas
0000000000090240 T _bli_info_get_enable_hpx
0000000000090258 T _bli_info_get_enable_hpx_as_default
0000000000090280 T _bli_info_get_enable_memkind
0000000000090230 T _bli_info_get_enable_openmp
0000000000090248 T _bli_info_get_enable_openmp_as_default
0000000000090218 T _bli_info_get_enable_pba_pools
0000000000090238 T _bli_info_get_enable_pthreads
0000000000090250 T _bli_info_get_enable_pthreads_as_default
0000000000090288 T _bli_info_get_enable_sandbox
0000000000090220 T _bli_info_get_enable_sba_pools
0000000000090228 T _bli_info_get_enable_threading
0000000000090278 T _bli_info_get_enable_tls

Something fails to take account of a leading underscore?

barracuda156 commented 1 month ago

This is on 10.6 ppc:

36-231% nm /opt/local/lib/libblis.4.dylib | grep bli_info_get_enable_
000851dc T _bli_info_get_enable_blas
000851e4 T _bli_info_get_enable_cblas
0008521c T _bli_info_get_enable_hpx
00085234 T _bli_info_get_enable_hpx_as_default
0008525c T _bli_info_get_enable_memkind
0008520c T _bli_info_get_enable_openmp
00085224 T _bli_info_get_enable_openmp_as_default
000851f4 T _bli_info_get_enable_pba_pools
00085214 T _bli_info_get_enable_pthreads
0008522c T _bli_info_get_enable_pthreads_as_default
00085264 T _bli_info_get_enable_sandbox
000851fc T _bli_info_get_enable_sba_pools
00085204 T _bli_info_get_enable_threading
00085254 T _bli_info_get_enable_tls
grisuthedragon commented 1 month ago

Something fails to take account of a leading underscore?

The leading underscores comes from the macOS ABI, thus this is fine and correctly translated as shown in your logs above.

The linker line says:

        /opt/local/bin/gcc-mp-13 -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -fstack-protector-strong -fstack-clash-protection -Wlto-type-mismatch -Wunused-parameter -Wunused-but-set-parameter -D_FILE_OFFSET_BITS=64   -O3 -DNDEBUG -O3 -Wpedantic -Wstrict-prototypes -Wcast-qual -arch ppc -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc  CMakeFiles/cmTC_ce0cb.dir/otest.c.o -o cmTC_ce0cb  /opt/local/lib/libblisp.dylib

So can you give me the output of nm /opt/local/lib/libblisp.dylib | grep bli_info_get_enable_ ?

barracuda156 commented 1 month ago

I do not think it installs such a library:

Port blis @1.0_0 contains:
  /opt/local/include/blis.h
  /opt/local/include/blis/blis.h
  /opt/local/lib/libblis.4.0.0.dylib
  /opt/local/lib/libblis.4.dylib
  /opt/local/lib/libblis.a
  /opt/local/lib/libblis.dylib
  /opt/local/share/blis/common.mk
  /opt/local/share/blis/config.mk
  /opt/local/share/blis/config/generic/make_defs.mk
  /opt/local/share/pkgconfig/blis.pc
Port blis @0.9.0_1 contains:
  /opt/local/include/blis/blis.h
  /opt/local/lib/libblis.4.0.0.dylib
  /opt/local/lib/libblis.4.dylib
  /opt/local/lib/libblis.a
  /opt/local/lib/libblis.dylib
  /opt/local/share/blis/common.mk
  /opt/local/share/blis/config.mk
  /opt/local/share/blis/config/generic/make_defs.mk
  /opt/local/share/pkgconfig/blis.pc
Port blis @0.9.0_0+python310 contains:
  /opt/local/include/blis/blis.h
  /opt/local/lib/libblis.4.0.0.dylib
  /opt/local/lib/libblis.4.dylib
  /opt/local/lib/libblis.a
  /opt/local/lib/libblis.dylib
  /opt/local/share/blis/common.mk
  /opt/local/share/blis/config.mk
  /opt/local/share/blis/config/generic/make_defs.mk
  /opt/local/share/pkgconfig/blis.pc
barracuda156 commented 1 month ago

By the way, two versions are not identical with these symbols. 9.0.0:

36-231% nm /opt/local/lib/libblis.4.dylib | grep bli_info_get_enable_
000b0e0c T _bli_info_get_enable_blas
000b0e14 T _bli_info_get_enable_cblas
000b0e5c T _bli_info_get_enable_memkind
000b0e3c T _bli_info_get_enable_openmp
000b0e24 T _bli_info_get_enable_pba_pools
000b0e44 T _bli_info_get_enable_pthreads
000b0e64 T _bli_info_get_enable_sandbox
000b0e2c T _bli_info_get_enable_sba_pools
000b0e34 T _bli_info_get_enable_threading

vs 1.0:

36-231% nm /opt/local/lib/libblis.4.dylib | grep bli_info_get_enable_
000851dc T _bli_info_get_enable_blas
000851e4 T _bli_info_get_enable_cblas
0008521c T _bli_info_get_enable_hpx
00085234 T _bli_info_get_enable_hpx_as_default
0008525c T _bli_info_get_enable_memkind
0008520c T _bli_info_get_enable_openmp
00085224 T _bli_info_get_enable_openmp_as_default
000851f4 T _bli_info_get_enable_pba_pools
00085214 T _bli_info_get_enable_pthreads
0008522c T _bli_info_get_enable_pthreads_as_default
00085264 T _bli_info_get_enable_sandbox
000851fc T _bli_info_get_enable_sba_pools
00085204 T _bli_info_get_enable_threading
00085254 T _bli_info_get_enable_tls

But this is perhaps orthogonal to the issue discussed, since the same 0.9.0 does not work now either on my machine.

grisuthedragon commented 1 month ago

The BLIS check only uses the "old" symbols. Thus the ones added in 1.0 do not have any influence on the check.

I checked the behavior with the 1.0 on Linux and threre everything works fine. I try to organize myself a mac to test reproduce the problem.

Can you compile and link the following program against BLIS

#include <stdio.h>
#include <blis.h>

int main(int argc, char *argv[])
{
    printf("enable_openmp() = %d\n", (int) bli_info_get_enable_openmp());
    printf("enable_pthread() = %d\n", (int) bli_info_get_enable_pthreads());
    printf("enable_threading() = %d\n",(int) bli_info_get_enable_threading());

    return 0;
}
barracuda156 commented 1 month ago

@grisuthedragon Looks like yes:

36-231% /opt/local/bin/gcc-mp-13 -arch ppc -I/opt/local/include -L/opt/local/lib -lblis ./test_blis.c -o test_blis
36-231% ./test_blis
enable_openmp() = 0
enable_pthread() = 1
enable_threading() = 1
grisuthedragon commented 1 month ago

@barracuda156 That looks good and the values should be sufficient to find BlisPthread.

barracuda156 commented 1 month ago

@barracuda156 That looks good and the values should be sufficient to find BlisPthread.

So what should we do to make configure work? :)

(Perhaps a silly fix of removing a check and forcing linking may do, but hopefully it can be fixed in a proper way.)