Bug 1286349 - scipy/linalg/_flapack.so: undefined symbol: sgegv_
scipy/linalg/_flapack.so: undefined symbol: sgegv_
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: lapack (Show other bugs)
rawhide
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks: python-nibabel
  Show dependency treegraph
 
Reported: 2015-11-28 07:22 EST by Igor Gnatenko
Modified: 2015-11-29 19:00 EST (History)
13 users (show)

See Also:
Fixed In Version: atlas-3.10.2-11.fc24, lapack-3.6.0-3.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-29 19:00:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
[PATCH] build deprecated functions also (RHBZ #1286349) (3.89 KB, patch)
2015-11-28 07:39 EST, Igor Gnatenko
no flags Details | Diff
[PATCH] build deprecated functions also (RHBZ #1286349) (3.89 KB, patch)
2015-11-28 10:03 EST, Igor Gnatenko
no flags Details | Diff

  None (edit)
Description Igor Gnatenko 2015-11-28 07:22:17 EST
Version: 0.16.1-6.fc24

Tests and real programs failing there:
======================================================================
ERROR: Failure: ImportError (/home/brain/rpmbuild/BUILDROOT/scipy-0.16.1-6.fc24.x86_64/usr/lib64/python2.7/site-packages/scipy/linalg/_flapack.so: undefined symbol: sgegv_)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/brain/rpmbuild/BUILDROOT/scipy-0.16.1-6.fc24.x86_64/usr/lib64/python2.7/site-packages/scipy/spatial/__init__.py", line 94, in <module>
    from ._procrustes import procrustes
  File "/home/brain/rpmbuild/BUILDROOT/scipy-0.16.1-6.fc24.x86_64/usr/lib64/python2.7/site-packages/scipy/spatial/_procrustes.py", line 11, in <module>
    from scipy.linalg import orthogonal_procrustes
  File "/home/brain/rpmbuild/BUILDROOT/scipy-0.16.1-6.fc24.x86_64/usr/lib64/python2.7/site-packages/scipy/linalg/__init__.py", line 172, in <module>
    from .misc import *
  File "/home/brain/rpmbuild/BUILDROOT/scipy-0.16.1-6.fc24.x86_64/usr/lib64/python2.7/site-packages/scipy/linalg/misc.py", line 6, in <module>
    from .lapack import get_lapack_funcs
  File "/home/brain/rpmbuild/BUILDROOT/scipy-0.16.1-6.fc24.x86_64/usr/lib64/python2.7/site-packages/scipy/linalg/lapack.py", line 356, in <module>
    from scipy.linalg import _flapack
ImportError: /home/brain/rpmbuild/BUILDROOT/scipy-0.16.1-6.fc24.x86_64/usr/lib64/python2.7/site-packages/scipy/linalg/_flapack.so: undefined symbol: sgegv_


The same for py3. I tried to rebuild scipy, got the same results.
Comment 1 Igor Gnatenko 2015-11-28 07:39 EST
Created attachment 1099888 [details]
[PATCH] build deprecated functions also (RHBZ #1286349)
Comment 2 Igor Gnatenko 2015-11-28 08:04:05 EST
/usr/bin/strip:/home/brain/rpmbuild/BUILDROOT/lapack-3.6.0-3.fc24.x86_64/usr/lib64/liblapack_pic.a(sgegv.f): Unable to recognise the format of file: File format not recognized

I have no idea.
Comment 3 Igor Gnatenko 2015-11-28 10:03 EST
Created attachment 1099922 [details]
[PATCH] build deprecated functions also (RHBZ #1286349)
Comment 4 Igor Gnatenko 2015-11-28 10:08:06 EST
Lat patch fixes problem.
Comment 5 Zbigniew Jędrzejewski-Szmek 2015-11-28 19:48:37 EST
I can confirm that applying this patch to lapack, rebuilding lapack, and rebuilding atlas with the new lapack, fixes the problem with scipy.

I have no idea whether this is the right solution, and who is at fault: scipy for using deprecated routines, or lapack for removing them. I couldn't find any docs about the deprecation.
Comment 6 Igor Gnatenko 2015-11-28 19:51:00 EST
(In reply to Zbigniew Jędrzejewski-Szmek from comment #5)
> I can confirm that applying this patch to lapack, rebuilding lapack, and
> rebuilding atlas with the new lapack, fixes the problem with scipy.
> 
> I have no idea whether this is the right solution, and who is at fault:
> scipy for using deprecated routines, or lapack for removing them. I couldn't
> find any docs about the deprecation.

http://www.netlib.org/lapack/lapack-3.6.0.html



    [Philippe Theveny, UC Denver] Deprecated routines

    CGEGS   CGEGV   CGELSX  CGEQPF  CGGSVD
    CGGSVP  CLAHRD  CLATZM  CTZRQF
    DGEGS   DGEGV   DGELSX  DGEQPF  DGGSVD
    DGGSVP  DLAHRD  DLATZM  DTZRQF
    SGEGS   SGEGV   SGELSX  SGEQPF  SGGSVD
    SGGSVP  SLAHRD  SLATZM  STZRQF
    ZGEGS   ZGEGV   ZGELSX  ZGEQPF  ZGGSVD
    ZGGSVP  ZLAHRD  ZLATZM  ZTZRQF

    matrix_order → matrix_layout in the LAPACKE C Interface.


But in upstream's CMakeLists.txt I can see them as if(BUILD_DEPRECATED)
Comment 7 Zbigniew Jędrzejewski-Szmek 2015-11-28 19:52:13 EST
scipy has a bug open: https://github.com/scipy/scipy/issues/5266.
Comment 8 Igor Gnatenko 2015-11-28 19:55:07 EST
from my POV now we should build deprecated funcitons and in the future we will see what will happen in scipy.
Comment 9 Zbigniew Jędrzejewski-Szmek 2015-11-28 19:59:30 EST
So, scipy is slated to remove the wrappers for the deprecated functions in the next release. In the light of this, I think we should build lapack and atlas with the deprecated routines, to allow scipy to be unchanged. After scipy is released, drop the routines from lapack and atlas. If there are any other users in the distro, also wait a bit until they are adjusted.
Comment 10 Zbigniew Jędrzejewski-Szmek 2015-11-28 20:00:52 EST
next scipy release → scipy-0.17.0 to be precise.
Comment 11 Igor Gnatenko 2015-11-28 20:01:44 EST
(In reply to Zbigniew Jędrzejewski-Szmek from comment #9)
> So, scipy is slated to remove the wrappers for the deprecated functions in
> the next release. In the light of this, I think we should build lapack and
> atlas with the deprecated routines, to allow scipy to be unchanged. After
> scipy is released, drop the routines from lapack and atlas. If there are any
> other users in the distro, also wait a bit until they are adjusted.

Fully agree, but scipy needs rebuild anyway. But in this case we will not change its code.
Comment 12 Igor Gnatenko 2015-11-28 20:02:23 EST
can you do this? I dont have commit ACLs to lapack/scipy
Comment 13 Zbigniew Jędrzejewski-Szmek 2015-11-28 20:03:28 EST
Yes. I'll rebuild them in a few hours if nobody objects. Too many things depend on scipy, it would be really annoying to have it broken.
Comment 14 Igor Gnatenko 2015-11-28 21:04:17 EST
(In reply to Zbigniew Jędrzejewski-Szmek from comment #13)
> Yes. I'll rebuild them in a few hours if nobody objects. Too many things
> depend on scipy, it would be really annoying to have it broken.

(02:53:05 AM) spot: ignatenkobrain: there is a semantic issue with your patch, but its harmless. go ahead and have zbyszek rebuild it. I'd do it, but I'm rather sick at the moment.
Comment 15 Paulo Andrade 2015-11-29 18:37:10 EST
/me too

Just getting ready, (but one version behind, as 6.9 is already
release for some time, and may still take some time) to update
sagemath to a newer version, as it is quite outdated now...

Fails during documentation rebuild:

[matroids ] /home/pcpa/rpmbuild/BUILD/sage-6.8/src/doc/en/reference/matroids/sage/matroids/matroids_plot_helpers.rst:11: WARNING: autodoc can't import/find module 'sage.matroids.matroids_plot_helpers', it reported error: "/usr/lib64/python2.7/site-packages/scipy/linalg/_flapack.so: undefined symbol: sgegv_", please check your spelling and sys.path
Comment 16 Zbigniew Jędrzejewski-Szmek 2015-11-29 19:00:58 EST
This was rebuilt today, the build for atlas finished at 6:47 UTC. Just make sure that you have that version.

I'll close this, because it should be fixed for now. When new scipy comes out, this patch should probably reverted.

Note You need to log in before you can comment on or make changes to this bug.