classification
Title: ImportError: libffi.so.6
Type: compile error Stage: resolved
Components: ctypes Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: FFY00, YoSTEALTH, eric.araujo
Priority: normal Keywords:

Created on 2020-04-22 21:03 by YoSTEALTH, last changed 2020-05-23 20:10 by YoSTEALTH. This issue is now closed.

Messages (5)
msg367048 - (view) Author: (YoSTEALTH) * Date: 2020-04-22 21:03
>>> /opt/python/3.8.1/lib/python3 setup.py build_ext --inplace


Traceback (most recent call last):
  File "./setup.py", line 1, in <module>
    from setuptools import setup, find_packages
  File "/opt/python/3.8.1/lib/python3.8/site-packages/setuptools/__init__.py", line 19, in <module>
    from setuptools.dist import Distribution
  File "/opt/python/3.8.1/lib/python3.8/site-packages/setuptools/dist.py", line 34, in <module>
    from setuptools import windows_support
  File "/opt/python/3.8.1/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
    import ctypes
  File "/opt/python/3.8.1/lib/python3.8/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: libffi.so.6: cannot open shared object file: No such file or directory



"libffi 3.3-3" on "5.6.5-3-MANJARO" is installed as:

/usr/lib/libffi.so
/usr/lib/libffi.so.7
/usr/lib/libffi.so.7.1.0
...


Maybe `_ctypes` should try to find "libffi.so" vs "libffi.so.6" ?
msg367223 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2020-04-24 20:54
How did you get the Python installed in /opt/python/3.8.1?

Maybe it was compiled against libffi 6, then you updated the system to libffi 7, so that Python would need a rebuild.
msg367930 - (view) Author: Filipe Laíns (FFY00) * Date: 2020-05-02 13:35
Éric's assessment seems correct.

libffi-3.2 (which provided libffi.so.6) got dropped as a dependency from libffi a few weeks ago.

https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/libffi&id=edbab26c1cbebe62bb9a5ef55a5e0eaf3481a399

Add 2 weeks for the Manjaro repos to pull the change. The timing seems correct. You just need to rebuild your python installation in /opt/python/3.8.1 (although having an installation there seems very odd, does the default installation not worlK).

Please let me know if the issue still proceeds after rebuilding, otherwise this should be closed :)
msg367931 - (view) Author: Filipe Laíns (FFY00) * Date: 2020-05-02 13:36
typo: does the default installation not worlK
     *does the default installation not work?
msg369749 - (view) Author: (YoSTEALTH) * Date: 2020-05-23 20:10
How did you get the Python installed in /opt/python/3.8.1?
- I custom installed python.

Maybe it was compiled against libffi 6, then you updated the system to libffi 7, so that Python would need a rebuild.
- Yes, you are right about this.

So i did rebuild and no problems, Thanks :)
History
Date User Action Args
2020-05-23 20:10:55YoSTEALTHsetstatus: open -> closed

messages: + msg369749
stage: resolved
2020-05-02 13:36:00FFY00setmessages: + msg367931
2020-05-02 13:35:20FFY00setnosy: + FFY00
messages: + msg367930
2020-04-24 20:54:54eric.araujosetnosy: + eric.araujo
messages: + msg367223
2020-04-22 21:03:43YoSTEALTHcreate