Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 20.10: references to old Ubuntu packages #188

Closed
2 of 7 tasks
tobiasdiez opened this issue Feb 10, 2021 · 5 comments
Closed
2 of 7 tasks

Ubuntu 20.10: references to old Ubuntu packages #188

tobiasdiez opened this issue Feb 10, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@tobiasdiez
Copy link

Describe the bug
On Ubuntu 20.10 the Python installation is referencing some old Ubuntu packages that are missing. In more detail, if used with

container: 
      image: ubuntu:20.10

then one gets errors such as

     Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/setuptools/__init__.py", line 18, in <module>
        from setuptools.dist import Distribution
      File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/_virtualenv.py", line 89, in exec_module
        old(module)
      File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/setuptools/dist.py", line 32, in <module>
        from setuptools import windows_support
      File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/__t/Python/3.8.7/x64/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

or

import readline
ImportError: libreadline.so.7: cannot open shared object file: No such file or directory

These can be fixed by manually downloading the corresponding packages from the old Ubuntu distribution, e.g. bionic.

Which version of the action are you using?

  • v1
  • v2
  • Some other tag (such as v2.0.1 or master)

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac

If applicable, please specify if you're using a container: ubuntu:20.10

Python Versions
3.8 and 3.9, at least

To Reproduce
Steps to reproduce the behavior:

  1. Use setup-python in a ubuntu:20.10 container
  2. Import something from _ctypes or readline
  3. Get error

Run/Repo Url
https://github.com/sagemath/sagetrac-mirror/runs/1870813916?check_suite_focus=true
and
https://github.com/sagemath/sagetrac-mirror/runs/1862181456?check_suite_focus=true

@tobiasdiez tobiasdiez added the bug Something isn't working label Feb 10, 2021
@avihaybar
Copy link

ImportError: libffi.so.6: cannot open shared object file: No such file or directory

This happens to me on Ubuntu 20.04 LTS too with Python 3.8.
I did notice that the cached Python version for 3.8 is 3.8.11 which probably disregard the platform version.
Pinning down the version to 3.8.12 is downloading the correct python-3.8.12-linux-20.04-x64.tar.gz .
Ubuntu 20.04 and later uses the updated libffi.so.7 while the cached Python version is looking for libffi.so.6.
see more info here

@dsame
Copy link
Contributor

dsame commented Jun 27, 2022

Hello @avihaybar,

The solution suggested by @illia-v is to be discussed and it can take a lot of time. Meanwhile, i suggest you to install the required library manually, will it work for you? Do you need our help to install those libraries within your pipeline?

@avihaybar
Copy link

thanks for the reply, @dsame.
We have since upgraded internally to Python 3.9.x where the issue is resolved.

@dsame
Copy link
Contributor

dsame commented Jun 27, 2022

Thanks @avihaybar for your note. i am going to close this. Feel free to open new issue or reopen this one in case of any problem

@dsame dsame closed this as completed Jun 27, 2022
@dsame
Copy link
Contributor

dsame commented Jun 27, 2022

the same root cause leads to the SEGAULT #442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants