[Bug 203638] math/py-numpy: Undefined symbol "cblas_sgemm"

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Oct 14 14:13:16 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203638

John Hein <z7dr6ut7gs at snkmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |z7dr6ut7gs at snkmail.com

--- Comment #4 from John Hein <z7dr6ut7gs at snkmail.com> ---
I can reproduce this by building math/suitesparse with NETLIB and math/py-numpy
with NETLIB.  Then "python -c 'import numpy'" gives the same undefined symbol
error as the OP.

/usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so:
        libblas.so.2 => /usr/local/lib/libblas.so.2 (0x801781000)
        libm.so.5 => /lib/libm.so.5 (0x8019d3000)
        libpython2.7.so.1 => /usr/local/lib/libpython2.7.so.1 (0x801bfc000)
        libc.so.7 => /lib/libc.so.7 (0x800821000)
        libgfortran.so.3 => /usr/local/lib/gcc48/libgfortran.so.3 (0x801fb7000)
        libgcc_s.so.1 => /usr/local/lib/gcc48/libgcc_s.so.1 (0x8022ce000)
        libquadmath.so.0 => /usr/local/lib/gcc48/libquadmath.so.0 (0x8024e4000)
        libthr.so.3 => /lib/libthr.so.3 (0x80271f000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x802943000)
        libutil.so.9 => /lib/libutil.so.9 (0x802b4e000)

numpy options in this case are:

OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=SUITESPARSE
OPTIONS_FILE_UNSET+=TESTS
OPTIONS_FILE_UNSET+=ATLAS
OPTIONS_FILE_SET+=NETLIB
OPTIONS_FILE_UNSET+=OPENBLAS

I also removed the openblas package before building both suitesparse and numpy
- I believe openblas is detected by numpy configure if it just exists.  And
that is enough to avoid the problem because the numpy configure explicitly
turns off HAVE_CBLAS if it detects openblas.

If I install openblas again (default options - all unset) and rebuild numpy
with the same options (NETLIB set, OPENBLAS unset) and no other changes from
the above failure case, I do NOT get the undefined symbol.

Here's the ldd output in that case:
% ldd /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so
/usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so:
        libopenblas.so => /usr/local/lib/libopenblas.so (0x801800000)
        libm.so.5 => /lib/libm.so.5 (0x802575000)
        libpython2.7.so.1 => /usr/local/lib/libpython2.7.so.1 (0x80279e000)
        libc.so.7 => /lib/libc.so.7 (0x800821000)
        libgfortran.so.3 => /usr/local/lib/gcc48/libgfortran.so.3 (0x802b59000)
        libquadmath.so.0 => /usr/local/lib/gcc48/libquadmath.so.0 (0x802e70000)
        libthr.so.3 => /lib/libthr.so.3 (0x8030ab000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x8032cf000)
        libutil.so.9 => /lib/libutil.so.9 (0x8034da000)
        libgcc_s.so.1 => /usr/local/lib/gcc48/libgcc_s.so.1 (0x8036ec000)


>From this, it seems math/py-numpy + blaslapack:netlib (without openblas
installed at numpy build time) do not currently play well together.

I don't have a suggested fix for this at the moment.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-python mailing list