Skip to content

Ubuntu 20.04 missing libffi 6 causing bundled python 3 to fail on ctypes import #16

Open
@braingram

Description

I installed fomu-toolchain-linux_x86_64-v1.5.6 on Ubuntu 20.04 which lacks libffi 6 (7 is the only package in the repos). Working through the workshop I encountered an error building blink.py in the migen section. The same error can be seen when trying to import ctypes with the python3 included in the toolchain.

>>python3 -c "import ctypes"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/brett/Repositories/im-tomu/fomu-workshop/fomu-toolchain-linux_x86_64-v1.5.6/lib/python3.6/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

Some other system information:

>>lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

>>dpkg -l | grep libffi
ii  libffi-dev:amd64                           3.3-4                                   amd64        Foreign Function Interface library (development files)
ii  libffi7:amd64                              3.3-4                                   amd64        Foreign Function Interface library runtime

>>apt search libffi6
Sorting... Done
Full Text Search... Done

Also, I can successfully run the blink.py script with my system python.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions