Build failing on Linux (Ubuntu) after latest update

I was building Anki from source, but with some recent changes on the main branch I am running into some new errors.
Here’s the error I’m getting when running ./run:

failed: pyenv
Collecting jinja2==3.1.5 (from -r /tmp/tmp_zj3efg3 (line 1))
  Using cached jinja2-3.1.5-py3-none-any.whl (134 kB)
Collecting pip==24.2 (from -r /tmp/tmp_zj3efg3 (line 4))
  Using cached pip-24.2-py3-none-any.whl (1.8 MB)
Collecting pyqt6==6.8.0 (from -r /tmp/tmp_zj3efg3 (line 7))
  Using cached PyQt6-6.8.0.tar.gz (1.1 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      pip_system_certs: ERROR: could not register module: No module named 'wrapt'

When I run pip install wrapt I get a message saying “requirements already satisfied”
I would appreciate some help on this issue>

1 Like

What CPU architecture and Ubuntu version are you using?

1 Like

I’m on x86 (AMD) and Ubuntu 20.04.

The main branch uses Qt 6.8 which requires a newer glibc:

Hmm, I see. Is there any work around that would allow me to stay on the same Linux version? Could I force it to use an older PyQt version?

Maybe a bit overkill but you could create a folder somewhere (e.g. ~/anki_build) and then chroot into this folder. You could even apt install things in there and they won’t touch your actual OS.

Or you look into containerization. Or VMs.

This might work but will likely introduce problems.

The link I posted explains how to use a system Qt.