Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#77205 - [lxd] Missing shared lib after upgrading to raft 0.17.1

Attached to Project: Community Packages
Opened by Gregory (rollenwiese) - Saturday, 21 January 2023, 17:17 GMT
Last edited by Toolybird (Toolybird) - Monday, 23 January 2023, 06:42 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To George Rawlinson (rawlinsong)
Morten Linderud (Foxboron)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

/usr/bin/lxd: error while loading shared libraries: libraft.so.2: cannot open shared object file: No such file or directory

tried downgrading and recieve:

/usr/bin/lxd: error while loading shared libraries: libraft.so.3: cannot open shared object file: No such file or directory
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 23 January 2023, 06:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  lxd 5.10-2
Comment by Gregory (rollenwiese) - Saturday, 21 January 2023, 17:46 GMT
The error is generated by lxd binary
Comment by Toolybird (Toolybird) - Sunday, 22 January 2023, 00:11 GMT
lxd is clearly missing a dep on "raft". find-libdeps, namcap etc expose the problem.

Dupe:  FS#77223 

Comment by Doug Newgard (Scimmia) - Sunday, 22 January 2023, 00:18 GMT
Na, it's got the dep through dqlite, it just didn't get rebuilt.
Comment by Toolybird (Toolybird) - Sunday, 22 January 2023, 00:48 GMT
Yeah, but that's a transitive dependency which is frowned upon these days [1]. Listing direct deps is much less error prone IMHO.

[1] https://wiki.archlinux.org/title/Arch_package_guidelines#Package_dependencies
Comment by Matt Berry (mwberry) - Sunday, 22 January 2023, 00:55 GMT
As a workaround, I extracted raft 2 from the old package archive and that was enough to satisfy lxd for the moment.


```
$ (cd / && 7z e -so /var/cache/pacman/pkg/raft-0.16.0-1-x86_64.pkg.tar.zst | sudo tar x usr/lib/libraft.so.2.0.0)
$ (cd / && 7z e -so /var/cache/pacman/pkg/raft-0.16.0-1-x86_64.pkg.tar.zst | sudo tar x usr/lib/libraft.so.2)
$ ldd $(which lxd) | grep raft
libraft.so.2 => /usr/lib/libraft.so.2 (0x00007efc16670000)
libraft.so.3 => /usr/lib/libraft.so.3 (0x00007efc12c73000)
````
Comment by Gregory (rollenwiese) - Sunday, 22 January 2023, 01:00 GMT
Hey thanks for that workaround @mwberry!
Comment by Matt Berry (mwberry) - Sunday, 22 January 2023, 01:08 GMT
I spoke too soon, it segfaults when starting (lxd 5.10-1, raft 0.17.1-1, plus extracted libraft.so.2 from raft 0.16.1-1, dqlite 1.14.0-1).

I ended up rolling back to the following (old lxd, dqlite, new raft) plus keeping the extracted libraft.so.2. Although with the old copy of dqlite the newer libraft should not be needed.

```
$ pacman -Qi lxd dqlite raft | grep -E '^(Name|Version)'
Name : lxd
Version : 5.9-1
Name : dqlite
Version : 1.13.0-1
Name : raft
Version : 0.17.1-1
$ ldd $(which lxd) | grep -E 'lib(raft|dqlite)'
libraft.so.2 => /usr/lib/libraft.so.2 (0x00007f180ad19000)
libdqlite.so.0 => /usr/lib/libdqlite.so.0 (0x00007f180ac95000)

```
Comment by George Rawlinson (rawlinsong) - Sunday, 22 January 2023, 08:09 GMT
Just rebuilt lxd against the most recent raft package & tested it.

Can these affected please take the new version for a spin and report back? (5.10-2)
Comment by Matt Berry (mwberry) - Monday, 23 January 2023, 00:16 GMT
I've updated to lxd 5.10-2 and dlqite 1.14.0-1 and removed the manually-added `libraft.so.2{,.0.0}` and can confirm it now shows as linking only to libraft.so.3 and is working correctly.

Loading...