-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Problems building numpy with BLIS #14180
Copy link
Copy link
Closed
spack/spack
#12869Labels
Description
I'm trying to build numpy from source with BLIS as my BLAS library. Although it compiles fine, it fails its unit tests because it can't load the library.
Reproducing code example:
BLIS is built using the following flags:
$ ./configure --prefix=/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/blis-0.6.0-6hdvnljq54jw5cwmcucrmyfhv5u6ybj2 --enable-threading=none --disable-cblas --enable-blas --enable-shared --enable-static autoThen, I build numpy using the following site.cfg:
[blis]
libraries = blis
library_dirs = /Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/blis-0.6.0-6hdvnljq54jw5cwmcucrmyfhv5u6ybj2/lib
rpath = /Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/blis-0.6.0-6hdvnljq54jw5cwmcucrmyfhv5u6ybj2/lib
include_dirs = /Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/blis-0.6.0-6hdvnljq54jw5cwmcucrmyfhv5u6ybj2/include
and the following commands:
$ export NPY_BLAS_ORDER=blis
$ export NPY_LAPACK_ORDER=''
$ python -s setup.py --no-user-cfg build
$ python -s setup.py --no-user-cfg install --prefix=/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/py-numpy-1.17.0-37xrxjmnbitsruc7alrutzpvdil2xhhy --single-version-externally-managed --root=/Error message:
I see the following error message when I try to run the unit tests:
Traceback (most recent call last):
File "/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/py-numpy-1.17.0-37xrxjmnbitsruc7alrutzpvdil2xhhy/lib/python3.7/site-packages/numpy/core/__init__.py", line 17, in <module>
from . import multiarray
File "/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/py-numpy-1.17.0-37xrxjmnbitsruc7alrutzpvdil2xhhy/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in <module>
from . import overrides
File "/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/py-numpy-1.17.0-37xrxjmnbitsruc7alrutzpvdil2xhhy/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: dlopen(/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/py-numpy-1.17.0-37xrxjmnbitsruc7alrutzpvdil2xhhy/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Library not loaded: libblis.2.dylib
Referenced from: /Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/py-numpy-1.17.0-37xrxjmnbitsruc7alrutzpvdil2xhhy/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so
Reason: image not found
There were no obvious problems during building. Here are the build logs and build environment:
It seems to me like RPATH isn't working correctly.
Numpy/Python version information:
I'm using:
- macOS 10.14.5
- Clang 10.0.1
- Python 3.7.4
- Numpy 1.17.0
- Setuptools 41.0.1
- BLIS 0.6.0
Reactions are currently unavailable