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

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Oct 14 17:06:24 UTC 2015


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

--- Comment #6 from John Hein <z7dr6ut7gs at snkmail.com> ---
If I make this change to the numpy Makefile:

Index: Makefile
===================================================================
--- Makefile    (revision 399233)
+++ Makefile    (working copy)
@@ -71,7 +71,7 @@
 pre-configure-NETLIB-on:
        @${REINPLACE_CMD} -e "s|%%BLASNAME%%|atlas|" \
                -e "s|%%LIBRARIES%%|atlas_libs|" \
-               -e "s|%%BLASLIBS%%|blas|" \
+               -e "s|%%BLASLIBS%%|blas, cblas|" \
                -e "s|%%LAPACKLIBS%%|lapack|" \
                        ${WRKSRC}/site.cfg


(pardon the inline rather than attached patch, but it's simple enough)

And then I install math/cblas before building math/py-numpy with NETLIB, then
the import does not trigger the undefined symbol problem (and ldd(1) shows
multiarray.so linked with libcblas).

Also, if I leave the same change in the Makefile and uninstall cblas, then the
multiarray.so that is built is not link with either libblas or libcblas.  How
useful it is, I don't know (maybe just doesn't perform as well???).  That is a
totally untested guess.

But it seems to me that if we specify that it should use blas & cblas libs and
can't find one or both, it should fail to build.  But it seems numpy quietly
builds itself without support for the libs specified in the configuration.

Hmm... well, maybe not completely quiet (but certainly not fatal to the build):

/usr/ports/math/py-numpy/work/numpy-1.10.0/numpy/distutils/system_info.py:1651:
UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)


If the above Makefile change is used, it should also probably add math/cblas 
to LIB_DEPENDS.

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


More information about the freebsd-python mailing list