cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

ImportError: libsymmetrica.so.2.0: cannot open shared object file: No such file or directory #570

Closed WGH- closed 4 years ago

WGH- commented 4 years ago

Not sure what happened, but sage-9.0 crashes with ImportError for me.

Relevant traceback parts:

/usr/lib64/python3.6/site-packages/sage/libs/symmetrica/all.py in <module>()
      1 from __future__ import absolute_import
      2 #from symmetrica import *
      3 
----> 4 from .symmetrica import start, end
        global symmetrica = undefined
        global start = undefined
        global end = undefined
      5 
      6 #kostka
      7 from .symmetrica import kostka_number_symmetrica as kostka_number
      8 from .symmetrica import kostka_tab_symmetrica as kostka_tab
      9 from .symmetrica import kostka_tafel_symmetrica as kostka_tafel
     10 
     11 
     12 #sab
     13 from .symmetrica import dimension_symmetrization_symmetrica as dimension_symmetrization
     14 from .symmetrica import bdg_symmetrica as bdg
     15 from .symmetrica import sdg_symmetrica as sdg
     16 from .symmetrica import odg_symmetrica as odg
     17 from .symmetrica import specht_dg_symmetrica as specht_dg
     18 from .symmetrica import ndg_symmetrica as ndg
     19 #from symmetrica import glmndg_symmetrica as glmndg
     20 
     21 
     22 #sc
     23 from .symmetrica import chartafel_symmetrica as chartafel
     24 from .symmetrica import charvalue_symmetrica as charvalue
     25 from .symmetrica import kranztafel_symmetrica as kranztafel
     26 #from symmetrica import c_ijk_sn_symmetrica  as c_ijk_sn
     27 
     28 #part
     29 from .symmetrica import strict_to_odd_part_symmetrica as strict_to_odd_part
     30 from .symmetrica import odd_to_strict_part_symmetrica as odd_to_strict
     31 from .symmetrica import q_core_symmetrica as q_core

ImportError: libsymmetrica.so.2.0: cannot open shared object file: No such file or directory

Indeed,

$ ldd /usr/lib64/python3.6/site-packages/sage/libs/symmetrica/symmetrica.cpython-36m-x86_64-linux-gnu.so | grep libsymmetrica
    libsymmetrica.so.2.0 => not found
$ ls -alh /usr/lib/libsymmetrica* 
-rw-r--r-- 1 root root 21M Jan 27 20:05 /usr/lib/libsymmetrica.a
lrwxrwxrwx 1 root root  22 Jan 27 20:05 /usr/lib/libsymmetrica.so -> libsymmetrica.so.2.0.0
lrwxrwxrwx 1 root root  22 Jan 27 20:05 /usr/lib/libsymmetrica.so.2 -> libsymmetrica.so.2.0.0
-rwxr-xr-x 1 root root 11M Jan 27 20:05 /usr/lib/libsymmetrica.so.2.0.0

I have created the missing symlink manually (ln -s libsymmetrica.so.2.0.0 libsymmetrica.so.2.0), and it solved the problem. But I think that wasn't supposed to happen.

kiwifb commented 4 years ago

Have you rebuilt sage after upgrading symmetrica to 3.0? Looks like a change in the packaging between the hack symmetrica-2.0 that was in the overlay and the revamped upstream package now in the main tree.

After checking that soname was definitely in the overlay version. You need to rebuild.

WGH- commented 4 years ago

Have you rebuilt sage after upgrading symmetrica to 3.0?

Judging by emerge.log, it seems I did not.

I rebuilt sage, and the symmetrica Python extension module now points to the correct soname.

Thank you!

kiwifb commented 4 years ago

That kind of stuff should be caught by the preserved library mechanism. Because it was always a hack and this is a python module it may have escaped.