Opened 9 years ago

Closed 4 years ago

#49895 closed defect (wontfix)

py27-scipy @0.16.1_0 +gcc5 +atlas completes install, but doesn't work: symbol not found

Reported by: mark.chilenski@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: Veence (Vincent), seanfarley (Sean Farley), michaelld (Michael Dickens), petrrr
Port: py-scipy atlas

Description

I have installed py27-scipy @0.16.1_0 +gcc5 +atlas and atlas @3.10.2_2 +gcc5. Both packages seem to have installed with no visible errors, but when I try to use scipy.linalg, the following exception occurs:

>>> import scipy.linalg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/__init__.py", line 172, in <module>
    from .misc import *
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/misc.py", line 6, in <module>
    from .lapack import get_lapack_funcs
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/lapack.py", line 356, in <module>
    from scipy.linalg import _flapack
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/_flapack.so, 2): Symbol not found: _cgegv_
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/_flapack.so
  Expected in: flat namespace
 in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/_flapack.so

Possibly relevant: _cgegv_ appears to be listed as Undefined in _flapack.so:

$ nm /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/_flapack.so | grep _cgegv_
                 U _cgegv_

Is it possible that there is a mis-match between the MacPorts versions of SciPy and ATLAS? Or is something messed up in the build/linking step that causes _cgegv_ to not be found?

For reference, I am running OS X 10.11.1 El Capitan and MacPorts 2.3.4. Thank you for your attention to this matter!

Change History (6)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: openmaintainer@… removed

comment:2 Changed 9 years ago by mark.chilenski@…

Upon further investigation, this issue appears to be from LAPACK being updated to lapackversion = 3.6.0 when building ATLAS. I made a local version of the portfile and dialed LAPACK back to 3.5.0 and SciPy appears to work now (though I'm waiting for the full test suite to complete).

The changelog here: http://www.netlib.org/lapack/lapack-3.6.0.html notes that CGEGV is deprecated as of LAPACK 3.6.0. I suspect this means that the bug is in SciPy itself (i.e., that they shouldn't be referencing a deprecated function). If the maintainers agree with this logic, this ticket can be closed and I will submit a bug report with the SciPy devs. (Though perhaps they could consider adding an option to choose the LAPACK version when building ATLAS?)

For users who find this ticket looking for a short-term solution to get their SciPy to work with ATLAS: I got it to the point that I can run "import scipy.linalg" by following the steps here: https://trac.macports.org/wiki/howto/InstallingOlderPort

I just used the most recent revision ("svn checkout https://svn.macports.org/repository/macports/trunk/dports/math/atlas"), and modified line 15 to be "set lapackversion 3.5.0" and set the checksums at line 48-50 to:

                    lapack-${lapackversion}.tgz \
                    rmd160  d803308ef28f3c6cffb051850823395e2cb29b6a \
                    sha256  9ad8f0d3f3fb5521db49f2dd716463b8fb2b6bc9dc386a9956b8c6144f726352

comment:3 Changed 9 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:4 Changed 5 years ago by michaelld (Michael Dickens)

A -lot- of changes have taken place since this issue was opened. I'm going to go ahead and close the issue. If it is still an issue, please post an update as to what's going on, with updated logs. Please make sure you're using the latest version of MacPorts and latest ports (e.g., as obtained via "sudo port selfupdate").

comment:5 Changed 5 years ago by mf2k (Frank Schima)

Port: py-scipy added; py27-scipy removed

comment:6 Changed 4 years ago by mf2k (Frank Schima)

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.