8000 BUG: BLAS detection assumes Debian/Ubuntu specific changes with unknown symbol from cblas · Issue #25028 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
BUG: BLAS detection assumes Debian/Ubuntu specific changes with unknown symbol from cblas #25028
Closed
@s-t-e-v-e-n-k

Description

@s-t-e-v-e-n-k

Describe the issue:

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.

Reproduce the code example:

<None required>

Error message:

No response

Runtime information:

NumPy 1.26.1
openSUSE Tumbleweed 20231026

Context for the issue:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0