my tildelog

a blog about tildes

Fixing ld-decode on Arch Linux (2023.04)

April 18, 2023 — ~rawktucc

Apparently, recent versions of python-numba do not support python-numpy 1.24 yet. This is specific for Arch and NixOS (and possibly other more up-to-date systems).

Since the ld-decode project only targets Ubuntu 22.04 (and obviously for stability/good reason), I’m on my own here.

I tried the PKGBUILD and patches in the Arch Linux bug for the numba package, but was not able to build them successfully.

Instead, I built python-numba-git and python-numpy-git from the AUR. At least this keeps things a bit more organized and easier for me to track.

python-numba-git, however, requires python-llvmlite >= 0.40.0. The AUR package commentary notes to build python-llvmlite-git, however despite this targeting the latest git for llvmlite, it still builds 0.39.1:

ImportError: Numba requires at least version 0.40.0 of llvmlite. Installed version is 0.39.1. Please update llvmlite.

So the solution here, per a comment found here, is to install a specific llvmlite target through pip;

pip install llvmlite==0.40.0rc1

This is… obviously messy, but it works.

TLDR

  1. sudo pacman -R python-numba python-numpy
  2. pip uninstall numba
  3. pip uninstall numpy
  4. pip uninstall llvmlite
  5. yay -S --aur python-numba-git python-numpy-git
  6. pip install llvmlite=0.40.0rc1

The pip uninstall commands may fail if you don’t have those packages installed, but we run them anyway to ensure we remove any possible conflicts.

The other solution to make it less messy, might be to install llvmlite to a virtualenv - you could also attempt this with numpy and numba as well; I need to test this.

tags: ld-decode, DomesdayDuplicator, git, linux