Update problem on llvm15

Hi,
I use yast to make updates on a Leap 15.5 system of mine to make an update and I get and error of conflicting files:

File /usr/bin/clang-cpp
  from install of
     clang15-15.0.7-150500.4.9.6.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)
  conflicts with file from package
     clang13-13.0.1-bp155.6.38.x86_64 (@System)

Does anyone else have this issue and is there a solution for this ?
Thanks.

Decide which version you need and remove another one.

If instead of YaST to do updates you use zypper up, you’ll be presented with a list of choices how to proceed in this odd kind of situation that happens when version numbers are mixed in with package names. As inferred by the previous response, chose the upgrade path of removing the old.

No, you won’t. It is not a dependency problem.

/usr/bin/clang is used for update-alternatives:

opensuse155:/home/stephan # ls -al /usr/bin/clang
lrwxrwxrwx 1 root root 23 22. Mai 2023  /usr/bin/clang -> /etc/alternatives/clang
opensuse155:/home/stephan # ls -al /etc/alternatives/clang
lrwxrwxrwx 1 root root 21 16. Jul 10:28 /etc/alternatives/clang -> /usr/bin/clang-13.0.1

After installing clang15 and using yes to solve the conflict:

opensuse155:/home/stephan # ls -al /usr/bin/clang
lrwxrwxrwx 1 root root 23  3. Jul 15:06 /usr/bin/clang -> /etc/alternatives/clang
opensuse155:/home/stephan # ls -al /etc/alternatives/clang
lrwxrwxrwx 1 root root 21 16. Jul 10:30 /etc/alternatives/clang -> /usr/bin/clang-15.0.7
opensuse155:/home/stephan #

You can use update-alternatives to switch between the Versions:

opensuse155:/home/stephan # update-alternatives --config clang 
There are 2 choices for the alternative clang (providing /usr/bin/clang).

  Selection    Path                   Priority   Status
------------------------------------------------------------
* 0            /usr/bin/clang-15.0.7   1507      auto mode
  1            /usr/bin/clang-13.0.1   1301      manual mode
  2            /usr/bin/clang-15.0.7   1507      manual mode

Press <enter> to keep the current choice[*], or type selection number: 

So as @arvidjaar said, no dependency problem.

Huh? The conflict is with /usr/bin/clang-cpp.

Yes you are right.

I have not looked in details, but if part of package is using alternatives already, may be it is worth bug report.

As Suggested by @Sauerland I proceeded with the install (on yast) but before that I looked into the update-alternatives issue.

bash:/home/user55> ls -al /usr/bin/clang
lrwxrwxrwx 1 root root 23 Feb 21 16:40 /usr/bin/clang -> /etc/alternatives/clang
bash:/home/user55> ls -al /etc/alternatives/clang
ls: cannot access '/etc/alternatives/clang': No such file or directory

And indeed there was no /etc/alternatives/clang directory.

After this I made the update and issue the same commands:
result was …the same …

bash:~/home/user55> ls -al /usr/bin/clang
lrwxrwxrwx 1 root root 23 Jul  3 14:06 /usr/bin/clang -> /etc/alternatives/clang
bash:~/home/user55> ls -al /etc/alternatives/clang
ls: cannot access '/etc/alternatives/clang': No such file or directory`

I also tried to check just to see if indeed the update-alternatives command would work …

 sudo update-alternatives --config clang
update-alternatives: error: no alternatives for clang

On yast both packages clang13 and clang15 are present and installed.
yet there is no update-alternatives for clang …

But furthermore:
On Yast I get 3 Different clang packages installed.

  • clang version 15.0.7-bp155.1.7
  • clang13 version 13.0.1-bp155.6.38
  • clang15 version 15.0.7-150500.4.9.6

this is getting stranger by the day …

Any clue on this one?

Odds are you can get by with just 15:

# cat /usr/local/bin/zypsei
#!/bin/bash
zypper --no-refresh se -s -i $*  | grep -Ev 'debug|devel|srcp|openSUSE-20' | grep -E 'x86|noarch'| sort
# ll /etc/alternatives/*cla* /etc/alternatives/*cpp*
ls: cannot access '/etc/alternatives/*cla*': No such file or directory
ls: cannot access '/etc/alternatives/*cpp*': No such file or directory
# zypsei lang-c
i | libclang-cpp15 | package | 15.0.7-150500.4.6.2 | x86_64 | UpdateSLE
#

https://bugzilla.suse.com/show_bug.cgi?id=1221183

I have done exactly that update and still the results are the ones I have shown.
There is no update-alternate.
And there are three versions of clang on my system:

  • clang version 15.0.7-bp155.1.7
  • clang13 version 13.0.1-bp155.6.38
  • clang15 version 15.0.7-150500.4.9.6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.