compiler-explorer / infra

Infrastructure to set up the public Compiler Explorer instances and compilers

Home Page:https://godbolt.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Poetry error on make ce

partouf opened this issue · comments

This is for a reasonably fresh Ubuntu 24 installation:

$ make ce
curl -sSL https://install.python-poetry.org | /bin/python3.12 -
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/opt/compiler-explorer/infra/.poetry/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.8.2): Creating environment
Traceback (most recent call last):
  File "<stdin>", line 314, in make
ModuleNotFoundError: No module named 'ensurepip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 945, in <module>
  File "<stdin>", line 923, in main
  File "<stdin>", line 560, in run
  File "<stdin>", line 581, in install
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "<stdin>", line 653, in make_env
  File "<stdin>", line 639, in make_env
  File "<stdin>", line 340, in make
  File "/usr/lib/python3.12/urllib/request.py", line 215, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 521, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 630, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 559, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 639, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 228, in partial_apport_excepthook
    return apport_excepthook(binary, exc_type, exc_obj, exc_tb)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 114, in apport_excepthook
    report["ExecutableTimestamp"] = str(int(os.stat(binary).st_mtime))
                                            ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/opt/compiler-explorer/infra/-'

Original exception was:
Traceback (most recent call last):
  File "<stdin>", line 314, in make
ModuleNotFoundError: No module named 'ensurepip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 945, in <module>
  File "<stdin>", line 923, in main
  File "<stdin>", line 560, in run
  File "<stdin>", line 581, in install
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "<stdin>", line 653, in make_env
  File "<stdin>", line 639, in make_env
  File "<stdin>", line 340, in make
  File "/usr/lib/python3.12/urllib/request.py", line 215, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 521, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 630, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 559, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 639, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
make: *** [Makefile:76: /opt/compiler-explorer/infra/.poetry/bin/poetry] Error 1

Perhaps the same issue as https://askubuntu.com/questions/1469080/ubuntu-23-04-python3-no-module-named-ensurepip

I did sudo apt install python3.12-venv and that fixed this particular error...

Next error is some lib trying to be built:

  frozenlist/_frozenlist.c:16:10: fatal error: Python.h: No such file or directory
     16 | #include "Python.h"
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

sudo apt install python3-dev

Issues fixed