Bug 1208248 - libopenblas-pthreads0 missing a file?
Summary: libopenblas-pthreads0 missing a file?
Status: RESOLVED FIXED
: 1208334 1208416 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: KDE Applications (show other bugs)
Version: Current
Hardware: 64bit openSUSE Tumbleweed
: P5 - None : Major with 10 votes (vote)
Target Milestone: ---
Assignee: Egbert Eich
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-14 15:08 UTC by Heikki Välisuo
Modified: 2023-03-31 11:35 UTC (History)
14 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heikki Välisuo 2023-02-14 15:08:48 UTC
digikam: error while loading shared libraries: libopenblas.so.0: cannot open shared object file: No such file or directory

------
Yes, it's a package problem. The package libopenblas-pthreads0 should contain
the file according to the package list, but it actually doesn't.


https://bugs.kde.org/show_bug.cgi?id=465680
Comment 1 Christophe Marin 2023-02-14 15:36:31 UTC
What does `rpm -qiv digikam` return?

Also attach the output of `zypper lr -d`
Comment 2 Christophe Marin 2023-02-14 15:50:50 UTC
That's an issue in the openblas package.

Despite being listed [1], libopenblas.so.0 is missing [1]

[1]
# rpm -ql libopenblas_pthreads0
/etc/alternatives/libblas.so.3_x86_64
/etc/alternatives/libcblas.so.3_x86_64
/etc/alternatives/liblapack.so.3_x86_64
/etc/alternatives/liblapacke.so.3_x86_64
/etc/alternatives/openblas-default_x86_64
/usr/lib64/libblas.so.3
/usr/lib64/libcblas.so.3
/usr/lib64/liblapack.so.3
/usr/lib64/liblapacke.so.3
/usr/lib64/libopenblas.so.0
/usr/lib64/openblas-default
/usr/lib64/openblas-pthreads
/usr/lib64/openblas-pthreads/libopenblas.so.0

[2]
# ls -l /usr/lib64/libopenblas.so.0
ls: cannot access '/usr/lib64/libopenblas.so.0': No such file or directory

# rpm -qi libopenblas_pthreads0
*Name        : libopenblas_pthreads0
Version     : 0.3.21
Release     : 3.1
Comment 3 Bit Juggler 2023-02-14 16:24:57 UTC
I can confirm the problem.

The package libopenblas_pthreads0-0.3.21-2.1.x86_64.rpm contained a symlink

/usr/lib64/libopenblas.so.0 -> usr/lib64/openblas-pthreads/libopenblas.so.0

The package libopenblas_pthreads0-0.3.21-3.1.x86_64.rpm misses that symlink.

I did

ln -s /usr/lib64/openblas-pthreads/libopenblas.so.0  /usr/lib64/libopenblas.so.0

and digikam is back to work.

My system:

Operating System: openSUSE Tumbleweed 20230213
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.10-1-default (64-bit)
Graphics Platform: X11
Graphics Processor: Mesa Intel® HD Graphics 630
Comment 4 Egbert Eich 2023-02-14 18:27:27 UTC
# zypper in digikam
... hours later
# ls /usr/lib64/libopenblas.so.0* -l
lrwxrwxrwx 1 root root 33 Feb 14 17:52 /usr/lib64/libopenblas.so.0 -> openblas-default/libopenblas.so.0
# file /usr/lib64/libopenblas.so.0* 
/usr/lib64/libopenblas.so.0: symbolic link to openblas-default/libopenblas.so.0
# file -L /usr/lib64/libopenblas.so.0* 
/usr/lib64/libopenblas.so.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=722a9adea5a73e98bfebbe0e1cd531794d40417f, stripped

I've even tried updating from an older version that had a slightly different link:
# ls -l /usr/lib64/libopenblas.so.0 
lrwxrwxrwx 1 root root 58 Feb 14 19:13 /usr/lib64/libopenblas.so.0 -> /etc/alternatives/openblas-default_x86_64/libopenblas.so.0

# zypper update libopenblas_pthreads0'
...
# ls -l /usr/lib64/libopenblas.so.0 
lrwxrwxrwx 1 root root 33 Feb 14 19:19 /usr/lib64/libopenblas.so.0 -> openblas-default/libopenblas.so.0

The link is created in the %post script. So unless you are installing with --noscript for some reason, you should have this link.
Comment 5 Christophe Marin 2023-02-14 18:34:58 UTC
If I try to force a reinstall using zypper, here's the output:

# zypper in -f libopenblas_pthreads0
The following package is going to be reinstalled:
  libopenblas_pthreads0

1 package to reinstall.
Overall download size: 5.0 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving: libopenblas_pthreads0-0.3.21-3.1.x86_64 (openSUSE-Tumbleweed-Oss)                                                                                                                                                 (1/1),   5.0 MiB    
Retrieving: libopenblas_pthreads0-0.3.21-3.1.x86_64.rpm ........................................................................................................................................................................[done (5.0 MiB/s)]
Verifying ..................................................................................................................................................................................................................................[done]
Preparing ..................................................................................................................................................................................................................................[done]
(1/1) Installing: libopenblas_pthreads0-0.3.21-3.1.x86_64 ..................................................................................................................................................................................[done]
update-alternatives: error: alternative link /usr/lib64/openblas-default is already managed by openblas-default
update-alternatives: error: alternative link /usr/lib64/libblas.so.3 is already managed by libblas.so.3
update-alternatives: error: alternative link /usr/lib64/libcblas.so.3 is already managed by libcblas.so.3
update-alternatives: error: alternative link /usr/lib64/liblapack.so.3 is already managed by liblapack.so.3
update-alternatives: error: alternative link /usr/lib64/liblapacke.so.3 is already managed by liblapacke.so.3
(1/1) Executing postin script for: libopenblas_pthreads0-0.3.21-3.1.x86_64 .................................................................................................................................................................[done]
(1/1) Cleaning up: libopenblas_pthreads0-0.3.21-3.1.x86_64 .................................................................................................................................................................................[done]
(1/1) Executing postun script for: libopenblas_pthreads0-0.3.21-3.1.x86_64 .................................................................................................................................................................[done]
(1/1) Executing posttrans script for: libopenblas_pthreads0-0.3.21-3.1.x86_64 ..............................................................................................................................................................[done]

# ls -l /usr/lib64/libopenblas.so.0
ls: cannot access '/usr/lib64/libopenblas.so.0': No such file or directory
Comment 6 Christophe Marin 2023-02-14 18:39:23 UTC
Also note the rpmlint errors for openblas:pthreads

[ 1679s] libopenblas_pthreads0.x86_64: E: alternative-link-missing /etc/alternatives/openblas-default
[ 1679s] libopenblas_pthreads0.x86_64: E: alternative-link-missing /etc/alternatives/${lib}
[ 1679s] The file %{_sysconfdir}/alternatives/$(basename generic-name) is missing in
[ 1679s] the file list. Mark it as %ghost and add it to the file list.
[ 1679s] 
[ 1679s] libopenblas_pthreads0.x86_64: E: alternative-generic-name-not-symlink /usr/lib64/openblas-default
[ 1679s] The update-alternative generic-name is not a symlink pointing to
[ 1679s] %{_sysconfdir}/alternatives/$(basename generic-name).
[ 1679s] 
[ 1679s] libopenblas_pthreads0.x86_64: E: alternative-generic-name-missing /usr/lib64/${lib}
[ 1679s] The update-alternatives generic name is not in the filelist. Create it as a
[ 1679s] symlink to %{_sysconfdir}/alternatives/$(basename generic-name) and add it to
[ 1679s] the file list.
Comment 7 Egbert Eich 2023-02-14 19:33:14 UTC
The messages are generated as the check script is not able to correctly parse the post-install script.

Do you have /usr/lib64/openblas-default - and if so, is it a link? What does it point to?
Comment 8 Christophe Marin 2023-02-14 19:50:32 UTC
(In reply to Egbert Eich from comment #7)

> Do you have /usr/lib64/openblas-default - and if so, is it a link? What does
> it point to?

No such file.

/usr/lib64/openblas-pthreads/libopenblas.so.0 is the only file that exists.

The other ones listed in comment #2 are all missing
Comment 9 Bit Juggler 2023-02-14 20:06:23 UTC
(In reply to Egbert Eich from comment #4)
> The link is created in the %post script. So unless you are installing with
> --noscript for some reason, you should have this link.

Yes, but that script changed.

in libopenblas_pthreads0-0.3.21-2.1.x86_64.rpm:

postinstall scriptlet (using /bin/sh):
/usr/sbin/update-alternatives --install \
   /usr/lib64/openblas-default openblas-default /usr/lib64/openblas-pthreads 50
for lib in libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do
    /usr/sbin/update-alternatives --install \
     /usr/lib64/${lib} ${lib} /usr/lib64/libopenblas.so.0  20
done
/sbin/ldconfig


in libopenblas_pthreads0-0.3.21-3.1.x86_64.rpm:

postinstall scriptlet (using /bin/sh):
/usr/sbin/update-alternatives --install \
   /usr/lib64/openblas-default openblas-default_x86_64 /usr/lib64/openblas-pthreads 50
# Cannot package this link - brp-25-symlink doesn't recognize links created by update-alternatives

ln -sf openblas-default/libopenblas.so.0 /usr/lib64/libopenblas.so.0

for lib in libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do
    /usr/sbin/update-alternatives --install \
     /usr/lib64/${lib} ${lib}_x86_64 /usr/lib64/openblas-pthreads/libopenblas.so.0  20
done
/sbin/ldconfig


I'm no expert in this but all over those scripts complete path names are used except for the line

ln -sf openblas-default/libopenblas.so.0 /usr/lib64/libopenblas.so.0


May be this should be

ln -sf /usr/lib64/openblas-pthreads/libopenblas.so.0 /usr/lib64/libopenblas.so.0

Or it is enough to use "openblas-pthreads" instead of "openblas-default".
Comment 10 Egbert Eich 2023-02-14 20:23:24 UTC
(In reply to Bit Juggler from comment #9)
> 
> I'm no expert in this but all over those scripts complete path names are
> used except for the line
> 
> ln -sf openblas-default/libopenblas.so.0 /usr/lib64/libopenblas.so.0
> 

That's fine. That's a relative link - relative to the location of the link.

> May be this should be
> 
> ln -sf /usr/lib64/openblas-pthreads/libopenblas.so.0
> /usr/lib64/libopenblas.so.0

This would create an absolute link.

> Or it is enough to use "openblas-pthreads" instead of "openblas-default".

Yes.

@Christophe, Bitjuggler - could you do the following (in that order):
get me the output of:
ls -l /etc/alternatives/openblas-default*
then try the following:
for i in openblas-default libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do
update-alternatives  --remove-all $i
done
Then force-install the script again?
Comment 11 Bit Juggler 2023-02-14 20:59:11 UTC
(In reply to Egbert Eich from comment #10)
> @Christophe, Bitjuggler - could you do the following (in that order):
> get me the output of:
> ls -l /etc/alternatives/openblas-default*

# ls -l /etc/alternatives/openblas-default*
ls: cannot access '/etc/alternatives/openblas-default*': No such file or directory
#

> then try the following:
> for i in openblas-default libblas.so.3 libcblas.so.3 liblapack.so.3
> liblapacke.so.3; do
> update-alternatives  --remove-all $i
> done

# for i in openblas-default libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do
> update-alternatives  --remove-all $i
> done
update-alternatives: warning: alternative /usr/lib64/libopenblas_pthreads.so.0 (part of link group libblas.so.3) doesn't exist; removing from list of alternatives
update-alternatives: warning: alternative /usr/lib64/libopenblas_pthreads.so.0 (part of link group libcblas.so.3) doesn't exist; removing from list of alternatives
update-alternatives: warning: alternative /usr/lib64/libopenblas_pthreads.so.0 (part of link group liblapack.so.3) doesn't exist; removing from list of alternatives

> Then force-install the script again?

I'm not quite sure what you want me to do here. Should I

zypper in -f libopenblas_pthreads0-0.3.21-3.1.x86_64.rpm
Comment 12 Christophe Marin 2023-02-14 21:02:57 UTC
Same result. After another forced installation, the symlinks are there.
Comment 13 Bit Juggler 2023-02-14 21:17:47 UTC
(In reply to Christophe Marin from comment #12)
> After another forced installation, the symlinks are there.

Same here.
Comment 14 Egbert Eich 2023-02-14 22:19:10 UTC
Right. Meanwhile I found it. The old (non-arch) update alternatives need to we wiped before new (arch-dependent) links can be set up for the same path. This cases the link that's created by 
ln -sf openblas-default/libopenblas.so.0 /usr/lib64/libopenblas.so.0
to be dangling.
The ldconfig at the end of the script takes care of this and wipes it.

I'm presently preparing fix. I will test it before submitting.
I've set up everything so I can test if this works.

Thanks for your help!
Comment 15 hui 2023-02-15 21:39:24 UTC
*** Bug 1208334 has been marked as a duplicate of this bug. ***
Comment 16 OBSbugzilla Bot 2023-02-16 18:15:07 UTC
This is an autogenerated message for OBS integration:
This bug (1208248) was mentioned in
https://build.opensuse.org/request/show/1066237 Factory / openblas
Comment 17 Christophe Marin 2023-02-17 09:59:15 UTC
*** Bug 1208416 has been marked as a duplicate of this bug. ***
Comment 18 Paul Tannington 2023-02-18 10:53:54 UTC
I may be mistaken, but the changelog a appears to indicate a fix:

  - Fix a fallout of making alternatives directory arch dependent.
  - Remove unneeded links that will be created by update-alternatives.
    Create remaining links %post scripts properly %ghost-ing the files.

However, this still appears to be an issue, zypper dup to 20230216 throws these errors:

# 2023-02-18 09:01:28 libopenblas_pthreads0-0.3.21-3.1.x86_64.rpm installed ok
# Additional rpm output:
# update-alternatives: error: alternative link /usr/lib64/openblas-default is already managed by openblas-default
# update-alternatives: error: alternative link /usr/lib64/libblas.so.3 is already managed by libblas.so.3
# update-alternatives: error: alternative link /usr/lib64/libcblas.so.3 is already managed by libcblas.so.3
# update-alternatives: error: alternative link /usr/lib64/liblapack.so.3 is already managed by liblapack.so.3
# update-alternatives: error: alternative link /usr/lib64/liblapacke.so.3 is already managed by liblapacke.so.3
#

and digikam still fails to load:

digikam: error while loading shared libraries: libopenblas.so.0: cannot open shared object file: No such file or directory
Comment 19 Christophe Marin 2023-02-18 11:26:39 UTC
(In reply to Paul Tannington from comment #18)
> I may be mistaken, but the changelog a appears to indicate a fix:
> 
> 
> However, this still appears to be an issue, zypper dup to 20230216 throws
> these errors:
> 

The request wasn't accepted yet: https://build.opensuse.org/request/show/1066237
Comment 20 Paul Tannington 2023-02-18 11:56:58 UTC
(In reply to Christophe Marin from comment #19)
> (In reply to Paul Tannington from comment #18)
> 
> The request wasn't accepted yet:
> https://build.opensuse.org/request/show/1066237

Ah... OK, my bad, apologies.
Comment 21 OBSbugzilla Bot 2023-02-20 09:45:02 UTC
This is an autogenerated message for OBS integration:
This bug (1208248) was mentioned in
https://build.opensuse.org/request/show/1066744 Factory / openblas
Comment 23 Stephan van den Akker 2023-02-21 20:27:21 UTC
I am having the same problem with digikam. 

Missing links in /usr/lib64 prevent digikam (and qgis) from running.

This problem extends to libblas, libcblas, libopenblas and liblapack.

Manually creating links to libraries present in 
/usr/lib64/blas 
/usr/lib64/lapack
/usr/lib64/openblas-pthreads

seems to solve the problem.
Comment 25 Egbert Eich 2023-03-31 11:35:48 UTC
This has been fixed meanwhile.