Skip to content

CI BLIS/FlexiBLAS jobs fail with numpy #259

Closed

Description

@virchan

Reference: https://github.com/joblib/threadpoolctl/actions/runs/36655295059

The BLIS/FlexiBLAS jobs failed:

  • pylatest_flexiblas (macOS)
  • pylatest_flexiblas (Linux)
  • pylatest_blis_no_threading
  • pylatest_blis_gcc_clang_openmp
  • pylatest_blis_clang_gcc_pthreads

On macOS, the job couldn't import numpy

607 + python -m threadpoolctl -i numpy scipy.linalg tests._openmp_test_helper.openmp_helpers_inner
608 WARNING: could not import numpy

because numpy couldn't find libflexiblas.3.dylib:

 Traceback (most recent call last):
  File "/Users/runner/miniconda3/envs/testenv/lib/python3.14/site-packages/numpy/_core/__init__.py", line 24, in <module>
    from . import multiarray
  File "/Users/runner/miniconda3/envs/testenv/lib/python3.14/site-packages/numpy/_core/multiarray.py", line 11, in <module>
    from . import _multiarray_umath, overrides
ImportError: dlopen(/Users/runner/miniconda3/envs/testenv/lib/python3.14/site-packages/numpy/_core/_multiarray_umath.cpython-314-darwin.so, 0x0002): Library not loaded: @rpath/libflexiblas.3.dylib
  Referenced from: <C12C1D96-F1D6-3EDD-860E-01B5CF6DB0C4> /Users/runner/miniconda3/envs/testenv/lib/python3.14/site-packages/numpy/_core/_multiarray_umath.cpython-314-darwin.so
  Reason: tried: '/Users/runner/miniconda3/envs/testenv/bin/../lib/libflexiblas.3.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/miniconda3/envs/testenv/bin/../lib/libflexiblas.3.dylib' (no such file), '/Users/runner/miniconda3/envs/testenv/bin/../lib/libflexiblas.3.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/miniconda3/envs/testenv/bin/../lib/libflexiblas.3.dylib' (no such file), '/Users/runner/miniconda3/envs/testenv/bin/../lib/libflexiblas.3.dylib' (no such file), '/Users/runner/miniconda3/envs/testenv/bin/../lib/libflexiblas.3.dylib' (no such file)

I checked install_flexiblas.sh and verified that the rpath is added, but only after numpy is built:

PKG_CONFIG_PATH=$ABS_PATH/numpy/ pip install . -v --no-build-isolation -Csetup-args=-Dblas=flexiblas -Csetup-args=-Dlapack=flexiblas
ccache -s || true
export CFLAGS=-I$ABS_PATH/flexiblas_install/include/flexiblas
export LDFLAGS="-L$FLEXIBLAS_LIB -Wl,-rpath,$FLEXIBLAS_LIB"

install_blis.sh does the same:

PKG_CONFIG_PATH=$ABS_PATH/numpy/ pip install . -v --no-build-isolation -Csetup-args=-Dblas=blis
export CFLAGS=-I$ABS_PATH/BLIS_install/include/blis
export LDFLAGS="-L$ABS_PATH/BLIS_install/lib -Wl,-rpath,$ABS_PATH/BLIS_install/lib"

Therefore, I think the problem is the rpath was added too late, and an effortless fix would be moving it before building numpy in both scripts.

Activity

  1. lesteve commented on Sep 30, 2026

    @lesteve
    Member

    So I guess this was fixed by #260

  2. DeaMariaLeon commented on Sep 30, 2026

    @DeaMariaLeon
    Contributor

    This issue was found during this PR #258 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions