You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: BLAS detection assumes Debian/Ubuntu specific changes with unknown symbol from cblas #25028
Building NumPy 1.26.1 on openSUSE results in a module that builds fine, but when importing it results in an unknown symbol:
[ 234s] ImportError:
[ 234s]
[ 234s] IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
[ 234s]
[ 234s] Importing the numpy C-extensions failed. This error can happen for
[ 234s] many reasons, often due to issues with your setup or how NumPy was
[ 234s] installed.
[ 234s]
[ 234s] We have compiled some common reasons and troubleshooting tips at:
[ 234s]
[ 234s] https://numpy.org/devdocs/user/troubleshooting-importerror.html
[ 234s]
[ 234s] Please note and check the following:
[ 234s]
[ 234s] * The Python version is: Python3.9 from "/usr/bin/python3.9"
[ 234s] * The NumPy version is: "1.26.1"
[ 234s]
[ 234s] and make sure that they are the versions you expect.
[ 234s] Please carefully study the documentation linked above for further help.
[ 234s]
[ 234s] Original error was: /home/abuild/rpmbuild/BUILDROOT/python-numpy-1.26.1-0.x86_64/usr/lib64/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so: undefined symbol: cblas_sgemm
I think this is because of a Debian-specific change, in /usr/share/doc/libblas-dev/README.if-you-look-for-libcblas.so.3:
Debian science team maintainers have merged the CBLAS ABI into
the libblas.so shared object. Everything you need from libcblas.so
can be found in libblas.so . Please link your program against it
instead.
Due to that change, linking against -lblas is absolutely fine, and works -- it's currently passing in your CI. However, other distributions are likely not doing the same. I can probably work around this by using blas-order=cblas, but I also thought I'd make you aware of that distribution-specific change as well.
Thank you for the report @s-t-e-v-e-n-k. You are completely correct, I was unaware that Debian did this and hence relied on a CI job to test Netlib BLAS that didn't cover the split libblas/libcblas situation. We'll get this fixed soon and backported for 1.26.2.
@s-t-e-v-e-n-k I'm building a CI job based on the opensuse/tumbleweed Docker container, and it looks like for BLAS there isn't a pkg-config file installed - is that right?
Activity
rgommers commentedon Oct 31, 2023
Thank you for the report @s-t-e-v-e-n-k. You are completely correct, I was unaware that Debian did this and hence relied on a CI job to test Netlib BLAS that didn't cover the split libblas/libcblas situation. We'll get this fixed soon and backported for 1.26.2.
rgommers commentedon Oct 31, 2023
@s-t-e-v-e-n-k I'm building a CI job based on the
opensuse/tumbleweedDocker container, and it looks like for BLAS there isn't a pkg-config file installed - is that right?I used this to install the system dependencies:
s-t-e-v-e-n-k commentedon Oct 31, 2023
Sadly, yes. It's being worked on. You'll need
lapack-develas well, but the lack of.pcfiles is known.