Skip to content

Building Python-3.14.0a2 with --enable-bolt fails with library not found error: /usr/lib/libbolt_rt_instr.a #127047

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

Closed
leon-matthews opened this issue Nov 20, 2024 · 6 comments
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@leon-matthews
Copy link

leon-matthews commented Nov 20, 2024

Bug report

Bug description:

I downloaded the source package from Python.org today and encountered an error when enabling BOLT optimisation:

$ sudo apt install llvm-bolt llvm-bolt-dev libbolt-dev
$ ./configure --enable-optimizations --enable-experimental-jit=yes --enable-bolt
...
BOLT-ERROR: library not found: /usr/lib/libbolt_rt_instr.a

The library file in question was installed by libbolt-dev, but into /usr/lib/llvm-19/lib/libbolt_rt_instr.a. Creating a symlink allowed the build to work, beautifully.

$ sudo ln -s /usr/lib/llvm-19/lib/libbolt_rt_instr.a /usr/lib/libbolt_rt_instr.a
$ ./configure --enable-optimizations --enable-experimental-jit=yes --enable-bolt
Success!...

I'm just running Ubuntu 24.10 on an AMD Ryzen 9 7950X3D and have installed LLVM et. al from its default repos.

CPython versions tested on:

3.14

Operating systems tested on:

Linux

@leon-matthews leon-matthews added the type-bug An unexpected behavior, bug, or error label Nov 20, 2024
@AlexWaygood AlexWaygood added the build The build process and cross-build label Nov 20, 2024
@zanieb
Copy link
Contributor

zanieb commented Feb 9, 2025

This error looks like it comes from BOLT and (as far as I can tell) we just invoke the BOLT binary. Could you share more logs?

I'm not sure there's an obvious way to resolve this here. I'm surprised the bolt binary would not correctly discovery its own libraries.

Does this reproduce today? My best guess is this was a problem with the system package for llvm-bolt.

@stratakis
Copy link
Contributor

I'm doing some testing myself on the latest Fedora development version and while with the upstream sources I got no issues on my machine running stable Fedora, the rpm build errors out with the same issue.

Starting seeing this lately as I've been testing this config for a bit, so I suspect it could be due to some package update throughout the toolchain, as the bolt version remains the same (19.1.7).

It errors out as BOLT-ERROR: library not found: /usr/lib/libbolt_rt_instr.a but the package structure places this file in /usr/lib64

@stratakis
Copy link
Contributor

This looks as a packaging issue on Fedora side, possibly on Ubuntu as well. Filled a bug: https://bugzilla.redhat.com/show_bug.cgi?id=2344830

@stratakis
Copy link
Contributor

Actually it's an upstream issue. PR: llvm/llvm-project#126698

@zanieb
Copy link
Contributor

zanieb commented Feb 11, 2025

Thank you for chasing that down!

@zanieb zanieb closed this as completed Feb 11, 2025
@leon-matthews
Copy link
Author

Nice work, thank you all very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants