Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Oct 2015 17:06:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        python@FreeBSD.org
Subject:   [Bug 203638] math/py-numpy: Undefined symbol "cblas_sgemm"
Message-ID:  <bug-203638-21822-2T0AGW8gvn@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-203638-21822@https.bugs.freebsd.org/bugzilla/>
References:  <bug-203638-21822@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203638

--- Comment #6 from John Hein <z7dr6ut7gs@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-203638-21822-2T0AGW8gvn>