Bug 2248872

Summary: symlink error
Product: [Fedora] Fedora Reporter: Steve <skrochen>
Component: llvm16Assignee: Tulio Magno Quites Machado Filho <tuliom>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 39CC: fedora-llvm-team, skrochen, tuliom
Target Milestone: ---Keywords: Upgrades
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-13 18:28:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve 2023-11-09 12:41:11 UTC
expected LLVM 16.x but found 17.0.3 using /usr/bin/llvm-config-16

Reproducible: Always

Steps to Reproduce:
1. /usr/bin/llvm-config-16 --version
2.
3.
Actual Results:  
17.0.3

Expected Results:  
16.x

Comment 1 Tulio Magno Quites Machado Filho 2023-11-09 13:28:01 UTC
I can't reproduce this issue.

$ rpm -q llvm16-devel
llvm16-devel-16.0.6-5.fc39.x86_64
$ /usr/bin/llvm-config-16 --version
16.0.6
$ alternatives --list | grep llvm-config
llvm-config-16          auto    /usr/lib64/llvm16/bin/llvm-config-16-64
llvm-config             auto    /usr/bin/llvm-config-64
llvm-config-17          auto    /usr/bin/llvm-config-64

@skrochen , could you provide the same output of your system, please?

Comment 2 Steve 2023-11-09 18:29:12 UTC
Sorry, I did the following: before I saw your question.

sudo ln -sf /usr/lib64/llvm16/bin/llvm-config /etc/alternatives/llvm-config-16


[pappy@dave-the-dog ~]$ rpm -q llvm16-devel
llvm16-devel-16.0.6-5.fc39.x86_64
[pappy@dave-the-dog ~]$ /usr/bin/llvm-config-16 --version
16.0.6
[pappy@dave-the-dog ~]$ alternatives --list | grep llvm-config
failed to read link /usr/lib64/libOpenCL.so: No such file or directory

... not so sure what's going on here

Comment 3 Steve 2023-11-09 18:29:52 UTC
I can remove and reinstall llvm16 if required

Comment 4 Steve 2023-11-09 18:55:59 UTC
[pappy@dave-the-dog ~]$ alternatives --list | grep llvm-config
llvm-config-17      	auto  	/usr/bin/llvm-config-64
llvm-config         	auto  	/usr/bin/llvm-config-64
llvm-config-16      	manual	/usr/lib64/llvm16/bin/llvm-config

Comment 5 Tulio Magno Quites Machado Filho 2023-11-09 19:09:19 UTC
I managed to reproduce it.

Before the upgrade:

$ update-alternatives --list | grep llvm-config
llvm-config             auto    /usr/bin/llvm-config-64
llvm-config-16          auto    /usr/bin/llvm-config-64

After the upgrade:

$ update-alternatives --list | grep llvm-config
llvm-config-16          auto    /usr/bin/llvm-config-64     <= This is wrong.
llvm-config             auto    /usr/bin/llvm-config-64
llvm-config-17          auto    /usr/bin/llvm-config-64
$ update-alternatives --display llvm-config-16
llvm-config-16 - status is auto.
 link currently points to /usr/bin/llvm-config-64
/usr/bin/llvm-config-64 - priority 64
/usr/lib64/llvm16/bin/llvm-config-16-64 - priority 64
Current `best' version is /usr/bin/llvm-config-64.

The %postun is not behaving well.

Comment 6 Steve 2023-11-09 20:09:17 UTC
"llvm-config-16          auto    /usr/bin/llvm-config-64     <= This is wrong." <== Yes, this is where the symlink pointed to for me as well before I edited it ...

Comment 7 Tulio Magno Quites Machado Filho 2023-11-13 17:36:30 UTC
I proposed a fix at https://src.fedoraproject.org/rpms/llvm/pull-request/188

Comment 8 Tulio Magno Quites Machado Filho 2023-12-16 11:44:50 UTC
The fix is now available in Rawhide: https://bodhi.fedoraproject.org/updates/FEDORA-2023-300c4820ee

Let's test it there first before we integrate it into a stable release.

Comment 9 Fedora Update System 2023-12-27 14:59:32 UTC
FEDORA-2023-3bd19e87a3 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-3bd19e87a3

Comment 10 Fedora Update System 2023-12-28 02:12:57 UTC
FEDORA-2023-3bd19e87a3 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-3bd19e87a3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-3bd19e87a3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2024-01-13 18:28:42 UTC
FEDORA-2023-3bd19e87a3 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.