After upgrading to Fedora 42 I noticed that /usr/bin/llvm-config doesn't work. Looks like the 2025-04-15 llvm-devel upgrade went awry. I fixed things by hand via the command 'cd /etc/alternatives && ln -f llvm-config-20 llvm-config' as root. As a result of this by-hand fix I now see this: $ ls -l /etc/alternatives/llvm* lrwxrwxrwx. 2 root root 33 Apr 15 22:23 /etc/alternatives/llvm-config -> /usr/lib64/llvm20/bin/llvm-config lrwxrwxrwx. 2 root root 33 Apr 15 22:23 /etc/alternatives/llvm-config-20 -> /usr/lib64/llvm20/bin/llvm-config $ llvm-config --version 20.1.2 Reproducible: Always Steps to Reproduce: Run the shell command "llvm-config". Actual Results: bash: llvm-config: command not found Expected Results: The shell command "llvm-config" should run llvm-config. Additional Information: $ ls -l /usr/bin/llvm-config* lrwxrwxrwx. 1 root root 29 Mar 10 16:06 /usr/bin/llvm-config -> /etc/alternatives/llvm-config lrwxrwxrwx. 1 root root 32 Apr 15 22:23 /usr/bin/llvm-config-20 -> /etc/alternatives/llvm-config-20 $ ls -l /etc/alternatives/llvm-config* lrwxrwxrwx. 1 root root 23 Mar 10 16:06 /etc/alternatives/llvm-config -> /usr/bin/llvm-config-64 lrwxrwxrwx. 1 root root 33 Apr 15 22:23 /etc/alternatives/llvm-config-20 -> /usr/lib64/llvm20/bin/llvm-config $ ls -l /usr/bin/llvm-config-64 /usr/lib64/llvm20/bin/llvm-config ls: cannot access '/usr/bin/llvm-config-64': No such file or directory -rwxr-xr-x. 1 root root 565832 Apr 2 17:00 /usr/lib64/llvm20/bin/llvm-config $ rpm -qf /usr/lib64/llvm20/bin/llvm-config llvm-devel-20.1.2-3.fc42.x86_64
Upon updating a Fedora 42 system today, I observed the following logs from "Removing llvm-devel-0:20.1.2-3.fc42.x86_64": >>> Running post-uninstall scriptlet: llvm-devel-0:20.1.2-3.fc42.x86_64 >>> Non-critical error in post-uninstall scriptlet: llvm-devel-0:20.1.2-3.fc42.x86_64 >>> Scriptlet output: >>> /var/tmp/rpm-tmp.ErdTDh: line 10: /usr/bin/llvm-config: No such file or directory >>> /usr/lib64/llvm20/bin/llvm-config-64 has not been configured as an alternative for llvm-config-20 >>> >>> [RPM] %postun(llvm-devel-20.1.2-3.fc42.x86_64) scriptlet failed, exit status 2 That looks like another symptom of the same problem.
I think there are multiple problems here. The postun error about llvm-config-20 is because we're trying to remove the wrong binary from alternatives (which existed in older versions). This would be easy to fix, though possibly we shouldn't be removing alternatives there at all, because it's possible that it transfers to a compat package instead. llvm-config itself being broken a different issue that I don't fully understand. What does alternatives --display llvm-config print on a system that was upgraded from f41?
(In reply to Nikita Popov from comment #2) > llvm-config itself being broken a different issue that I don't fully > understand. What does alternatives --display llvm-config print on a system > that was upgraded from f41? On the system that produced the scriptlet error, which was upgraded from F41 (and previously, F40 and beyond), and on which I have never meddled with the alternatives for llvm: $ alternatives --display llvm-config llvm-config - status is auto. link currently points to /usr/bin/llvm-config-64 /usr/bin/llvm-config-64 - priority 64 /usr/lib64/llvm20/bin/llvm-config - priority 64 Current `best' version is /usr/bin/llvm-config-64. Here are the llvm packages that are installed: $ rpm -qa | grep -E '^llvm' | sort llvm11-libs-11.1.0-14.fc41.x86_64 llvm13-libs-13.0.1-8.fc41.x86_64 llvm14-libs-14.0.5-10.fc41.x86_64 llvm15-15.0.7-13.fc42.x86_64 llvm15-libs-15.0.7-13.fc42.x86_64 llvm17-17.0.6-9.fc41.x86_64 llvm17-devel-17.0.6-9.fc41.x86_64 llvm17-googletest-17.0.6-9.fc41.x86_64 llvm17-libs-17.0.6-9.fc41.x86_64 llvm17-static-17.0.6-9.fc41.x86_64 llvm17-test-17.0.6-9.fc41.x86_64 llvm18-18.1.8-6.fc42.x86_64 llvm18-devel-18.1.8-6.fc42.x86_64 llvm18-googletest-18.1.8-6.fc42.x86_64 llvm18-libs-18.1.8-6.fc42.x86_64 llvm18-static-18.1.8-6.fc42.x86_64 llvm18-test-18.1.8-6.fc42.x86_64 llvm19-filesystem-19.1.7-13.fc42.x86_64 llvm19-libs-19.1.7-13.fc42.x86_64 llvm-20.1.3-1.fc42.x86_64 llvm-devel-20.1.3-1.fc42.x86_64 llvm-filesystem-20.1.3-1.fc42.x86_64 llvm-googletest-20.1.3-1.fc42.x86_64 llvm-libs-20.1.3-1.fc42.x86_64 llvm-static-20.1.3-1.fc42.x86_64 llvm-test-20.1.3-1.fc42.x86_64
Thank you! Given that, I think either giving /usr/lib64/llvm20/bin/llvm-config a higher priority or making sure that the dangling /usr/bin/llvm-config-64 entry gets dropped would fix the issue.
Possible fix (currently untested) for these issues: https://src.fedoraproject.org/rpms/llvm/pull-request/417
After some further discussion, we're probably going to drop alternatives for llvm-config entirely instead: https://src.fedoraproject.org/rpms/llvm/pull-request/418
FEDORA-2025-4260585072 (llvm-20.1.4-6.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2025-4260585072
FEDORA-2025-fd2baf076a (llvm-20.1.6-10.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2025-fd2baf076a
FEDORA-2025-fd2baf076a (llvm-20.1.6-10.fc43) has been pushed to the Fedora 43 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2025-f70f64de39 (flang-20.1.7-1.fc42, libclc-20.1.7-1.fc42, and 2 more) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-f70f64de39
FEDORA-2025-f70f64de39 has been pushed to the Fedora 42 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-f70f64de39` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-f70f64de39 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-f70f64de39 (flang-20.1.7-1.fc42, libclc-20.1.7-1.fc42, and 2 more) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.