Discussion:
[gentoo-user] Portage reports preserved libs, but won't rebuild
(too old to reply)
Matt Connell
2023-11-24 02:00:01 UTC
Permalink
First time I've seen this happen!

Any time I emerge anything, I get portage telling me I have the
following preserved libs:

---
package: app-arch/bzip2-1.0.8-r4
* - /usr/lib/libbz2.so.1
* - /usr/lib/libbz2.so.1.0.8
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
package: dev-libs/glib-2.76.4
* - /usr/lib/libglib-2.0.so.0
* - /usr/lib/libglib-2.0.so.0.7600.4
* used by /usr/lib/libharfbuzz.so.0 (preserved)
* used by /usr/lib/libharfbuzz.so.0.60801.0 (preserved)
package: dev-libs/libpcre2-10.42-r1
* - /usr/lib/libpcre2-8.so.0
* - /usr/lib/libpcre2-8.so.0.11.2
* used by /usr/lib/libglib-2.0.so.0 (preserved)
* used by /usr/lib/libglib-2.0.so.0.7600.4 (preserved)
package: media-gfx/graphite2-1.3.14_p20210810-r3
* - /usr/lib/libgraphite2.so.3
* - /usr/lib/libgraphite2.so.3.2.1
* used by /usr/lib/libharfbuzz.so.0 (preserved)
* used by /usr/lib/libharfbuzz.so.0.60801.0 (preserved)
package: media-libs/freetype-2.13.2
* - /usr/lib/libfreetype.so.6
* - /usr/lib/libfreetype.so.6.20.1
* used by /usr/lib/libharfbuzz.so.0 (preserved)
* used by /usr/lib/libharfbuzz.so.0.60801.0 (preserved)
package: media-libs/harfbuzz-8.2.0
* - /usr/lib/libharfbuzz.so.0
* - /usr/lib/libharfbuzz.so.0.60801.0
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
package: media-libs/libpng-1.6.40-r1
* - /usr/lib/libpng16.so.16
* - /usr/lib/libpng16.so.16.40.0
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
package: sys-libs/zlib-1.3-r1
* - /usr/lib/libz.so.1
* - /usr/lib/libz.so.1.2.13
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
* used by /usr/lib/libpng16.so.16 (preserved)
* used by /usr/lib/libpng16.so.16.40.0 (preserved)

---

But when I run emerge @preserved-rebuild as one should, all I get is:
"Nothing to merge; quitting."

Anyone else experienced this? How do I figure out what I need to do?

Thanks in advance.
Jack
2023-11-24 03:10:01 UTC
Permalink
May or may not help, but have you tried revdep-rebuild?
Post by Matt Connell
First time I've seen this happen!
Any time I emerge anything, I get portage telling me I have the
---
package: app-arch/bzip2-1.0.8-r4
* - /usr/lib/libbz2.so.1
* - /usr/lib/libbz2.so.1.0.8
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
package: dev-libs/glib-2.76.4
* - /usr/lib/libglib-2.0.so.0
* - /usr/lib/libglib-2.0.so.0.7600.4
* used by /usr/lib/libharfbuzz.so.0 (preserved)
* used by /usr/lib/libharfbuzz.so.0.60801.0 (preserved)
package: dev-libs/libpcre2-10.42-r1
* - /usr/lib/libpcre2-8.so.0
* - /usr/lib/libpcre2-8.so.0.11.2
* used by /usr/lib/libglib-2.0.so.0 (preserved)
* used by /usr/lib/libglib-2.0.so.0.7600.4 (preserved)
package: media-gfx/graphite2-1.3.14_p20210810-r3
* - /usr/lib/libgraphite2.so.3
* - /usr/lib/libgraphite2.so.3.2.1
* used by /usr/lib/libharfbuzz.so.0 (preserved)
* used by /usr/lib/libharfbuzz.so.0.60801.0 (preserved)
package: media-libs/freetype-2.13.2
* - /usr/lib/libfreetype.so.6
* - /usr/lib/libfreetype.so.6.20.1
* used by /usr/lib/libharfbuzz.so.0 (preserved)
* used by /usr/lib/libharfbuzz.so.0.60801.0 (preserved)
package: media-libs/harfbuzz-8.2.0
* - /usr/lib/libharfbuzz.so.0
* - /usr/lib/libharfbuzz.so.0.60801.0
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
package: media-libs/libpng-1.6.40-r1
* - /usr/lib/libpng16.so.16
* - /usr/lib/libpng16.so.16.40.0
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
package: sys-libs/zlib-1.3-r1
* - /usr/lib/libz.so.1
* - /usr/lib/libz.so.1.2.13
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
* used by /usr/lib/libpng16.so.16 (preserved)
* used by /usr/lib/libpng16.so.16.40.0 (preserved)
---
"Nothing to merge; quitting."
Anyone else experienced this? How do I figure out what I need to do?
Thanks in advance.
Arve Barsnes
2023-11-24 06:40:01 UTC
Permalink
Post by Jack
May or may not help, but have you tried revdep-rebuild?
Also, you can try just one-shotting the reported packages, such as
(for the last one in your list):

emerge -1 sys-libs/zlib

Regards,
Arve
Nuno Silva
2023-11-24 10:30:02 UTC
Permalink
Post by Arve Barsnes
Post by Jack
May or may not help, but have you tried revdep-rebuild?
Also, you can try just one-shotting the reported packages, such as
emerge -1 sys-libs/zlib
Regards,
Arve
Shouldn't it be the other way around? I mean, isn't it freetype,
harfbuzz, glib and libpng which need to be rebuilt so that these
libraries from sys-libs/zlib and bzip2, libpcre2, graphite2, ..., are
not needed and get removed?


(To Matt: when portage says "Nothing to merge; quitting." does it have
any other information? I'd suspect this to be caused by some upgrade
which cannot be currently done for some reason (such as a block).)
--
Nuno Silva
Wols Lists
2023-11-24 12:40:01 UTC
Permalink
Post by Nuno Silva
Post by Arve Barsnes
Post by Jack
May or may not help, but have you tried revdep-rebuild?
Also, you can try just one-shotting the reported packages, such as
emerge -1 sys-libs/zlib
Regards,
Arve
Shouldn't it be the other way around? I mean, isn't it freetype,
harfbuzz, glib and libpng which need to be rebuilt so that these
libraries from sys-libs/zlib and bzip2, libpcre2, graphite2, ..., are
not needed and get removed?
I regularly get "nothing to update".

I strongly suspect it's because libfreetype and harfbuzz are circular
dependencies.

When I've built a couple of systems I regularly get "unable to install
harfbuzz because it needs libfreetype which it can't install because it
needs harfbuzz ..." You need to force-build one, and then it's happy.

So that's probably messed up @revdep-rebuild.

Cheers,
Wol
Stefan Schmiedl
2023-11-24 13:40:03 UTC
Permalink
------ Original Message ------
From "Wols Lists" <***@youngman.org.uk>
To gentoo-***@lists.gentoo.org
Date 24.11.2023 13:35:39
Subject Re: [gentoo-user] Re: Portage reports preserved libs, but won't
rebuild
Post by Wols Lists
Post by Nuno Silva
Post by Arve Barsnes
Post by Jack
May or may not help, but have you tried revdep-rebuild?
Also, you can try just one-shotting the reported packages, such as
emerge -1 sys-libs/zlib
Regards,
Arve
Shouldn't it be the other way around? I mean, isn't it freetype,
harfbuzz, glib and libpng which need to be rebuilt so that these
libraries from sys-libs/zlib and bzip2, libpcre2, graphite2, ..., are
not needed and get removed?
I regularly get "nothing to update".
I strongly suspect it's because libfreetype and harfbuzz are circular dependencies.
When I've built a couple of systems I regularly get "unable to install harfbuzz because it needs libfreetype which it can't install because it needs harfbuzz ..." You need to force-build one, and then it's happy.
Cheers,
Wol
I too have a gentoo box with a similar problem but with no
obvious circular dependencies:

dev-libs/libsodium is preserved because vim depends on it,
but after emerging the preserved library is still found.

vim's ebuild RDEPENDs on dev-libs/libsodium:= due to USE +crypt

# emerge @preserved-rebuild
Calculating dependencies ... done!
Dependency resolution took 1.06 s.
Post by Wols Lists
Post by Nuno Silva
Post by Arve Barsnes
Verifying ebuild manifests
Emerging (1 of 1) app-editors/vim-9.0.1627::gentoo
Installing (1 of 1) app-editors/vim-9.0.1627::gentoo
Completed (1 of 1) app-editors/vim-9.0.1627::gentoo
Jobs: 1 of 1 complete Load avg: 1.37,
0.32, 0.11
Post by Wols Lists
Post by Nuno Silva
Post by Arve Barsnes
Auto-cleaning packages...
No outdated packages were found on your system.
* GNU info directory index is up-to-date.
Post by Wols Lists
Post by Nuno Silva
Post by Arve Barsnes
package: dev-libs/libsodium-1.0.19-r1
* - /usr/lib64/libsodium.so.23
* - /usr/lib64/libsodium.so.23.3.0
* used by /usr/bin/vim (app-editors/vim-9.0.1627)
Use emerge @preserved-rebuild to rebuild packages using these libraries

Looking at the available versions it seems that libsodium went
from (0/23) to (0/26) a few weeks ago and for some reason vim
does not see or want that.

# eix libsodium
[I] dev-libs/libsodium
Available versions: 1.0.18_p20220618(0/23) 1.0.19-r1(0/26) {+asm
minimal static-libs +urandom verify-sig ABI_MIPS="n32 n64 o32"
ABI_S390="32 64" ABI_X86="32 64 x32" CPU_FLAGS_X86="aes sse4_1"}
Installed versions: 1.0.19-r1(0/26)(15:08:34 10/27/23)(asm urandom
-minimal -static-libs -verify-sig ABI_MIPS="-n32 -n64 -o32"
ABI_S390="-32 -64" ABI_X86="64 -32 -x32" CPU_FLAGS_X86="-aes -sse4_1")


I'm not sure why I don't have that on all my gentoo boxes, but I don't
have
the time right now to really dive into this.

s.
Bryan Gardiner
2023-11-24 22:20:01 UTC
Permalink
On Thu, 23 Nov 2023 16:51:37 -0500
Post by Matt Connell
First time I've seen this happen!
Any time I emerge anything, I get portage telling me I have the
---
package: app-arch/bzip2-1.0.8-r4
* - /usr/lib/libbz2.so.1
* - /usr/lib/libbz2.so.1.0.8
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
package: dev-libs/glib-2.76.4
* - /usr/lib/libglib-2.0.so.0
* - /usr/lib/libglib-2.0.so.0.7600.4
* used by /usr/lib/libharfbuzz.so.0 (preserved)
* used by /usr/lib/libharfbuzz.so.0.60801.0 (preserved)
<snip>
"Nothing to merge; quitting."
Anyone else experienced this? How do I figure out what I need to do?
Assuming you're on amd64... These are 32-bit libraries. You probably
had abi_x86_32 set on these packages before, and it's not any more.
Normally Portage will remove these if no other (32-bit) package
requires them, but nowadays there is the

freetype[harfbuzz] -> harfbuzz -> freetype

dependency cycle, so you need to explicitly break the cycle *while
temporarily reenabling 32-bit* to get Portage to remove the libs
cleanly. Something like, temporarily put this in package.use:

app-arch/bzip2 abi_x86_32
dev-libs/glib abi_x86_32
dev-libs/libpcre2 abi_x86_32
media-gfx/graphite2 abi_x86_32
media-libs/freetype abi_x86_32 -harfbuzz # Break the cycle.
media-libs/harfbuzz abi_x86_32
media-libs/libpng abi_x86_32
sys-libs/zlib abi_x86_32

and reemerge these packages. Then when you remove these USE flags and
emerge again, the 32-bit libraries will disappear.

Cheers,
Bryan
Dale
2023-11-25 01:40:01 UTC
Permalink
Post by Bryan Gardiner
On Thu, 23 Nov 2023 16:51:37 -0500
Post by Matt Connell
First time I've seen this happen!
Any time I emerge anything, I get portage telling me I have the
---
package: app-arch/bzip2-1.0.8-r4
* - /usr/lib/libbz2.so.1
* - /usr/lib/libbz2.so.1.0.8
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
package: dev-libs/glib-2.76.4
* - /usr/lib/libglib-2.0.so.0
* - /usr/lib/libglib-2.0.so.0.7600.4
* used by /usr/lib/libharfbuzz.so.0 (preserved)
* used by /usr/lib/libharfbuzz.so.0.60801.0 (preserved)
<snip>
"Nothing to merge; quitting."
Anyone else experienced this? How do I figure out what I need to do?
Assuming you're on amd64... These are 32-bit libraries. You probably
had abi_x86_32 set on these packages before, and it's not any more.
Normally Portage will remove these if no other (32-bit) package
requires them, but nowadays there is the
freetype[harfbuzz] -> harfbuzz -> freetype
dependency cycle, so you need to explicitly break the cycle *while
temporarily reenabling 32-bit* to get Portage to remove the libs
app-arch/bzip2 abi_x86_32
dev-libs/glib abi_x86_32
dev-libs/libpcre2 abi_x86_32
media-gfx/graphite2 abi_x86_32
media-libs/freetype abi_x86_32 -harfbuzz # Break the cycle.
media-libs/harfbuzz abi_x86_32
media-libs/libpng abi_x86_32
sys-libs/zlib abi_x86_32
and reemerge these packages. Then when you remove these USE flags and
emerge again, the 32-bit libraries will disappear.
Cheers,
Bryan
Somewhat related.  I had a lot of entries in a package.use file for the
abi 32 version.  Those entries were pretty old.  They were likely from
back when some packages hadn't changed to 64 yet but have since then.  I
made a copy of the entries and removed the file.  I then did a emerge
-auDN world and it is changing to 64 version for all of them without
complaint.  I mention this for this reason, anyone reading this may want
to check any entries they may have but forgot about and see if they can
be removed on their system as well.  This may take care of any future
problems like this or other problems, such as no 32 version available
anymore. 

Reading this post is what reminded me that I had those entries.  I'd
forgot about it since they are in a separate file from other package.use
entries.  I may not be alone in this.

Dale

:-)  :-) 
Dale
2023-11-25 08:30:01 UTC
Permalink
Post by Dale
Post by Bryan Gardiner
On Thu, 23 Nov 2023 16:51:37 -0500
Post by Matt Connell
First time I've seen this happen!
Any time I emerge anything, I get portage telling me I have the
---
package: app-arch/bzip2-1.0.8-r4
* - /usr/lib/libbz2.so.1
* - /usr/lib/libbz2.so.1.0.8
* used by /usr/lib/libfreetype.so.6 (preserved)
* used by /usr/lib/libfreetype.so.6.20.1 (preserved)
package: dev-libs/glib-2.76.4
* - /usr/lib/libglib-2.0.so.0
* - /usr/lib/libglib-2.0.so.0.7600.4
* used by /usr/lib/libharfbuzz.so.0 (preserved)
* used by /usr/lib/libharfbuzz.so.0.60801.0 (preserved)
<snip>
"Nothing to merge; quitting."
Anyone else experienced this? How do I figure out what I need to do?
Assuming you're on amd64... These are 32-bit libraries. You probably
had abi_x86_32 set on these packages before, and it's not any more.
Normally Portage will remove these if no other (32-bit) package
requires them, but nowadays there is the
freetype[harfbuzz] -> harfbuzz -> freetype
dependency cycle, so you need to explicitly break the cycle *while
temporarily reenabling 32-bit* to get Portage to remove the libs
app-arch/bzip2 abi_x86_32
dev-libs/glib abi_x86_32
dev-libs/libpcre2 abi_x86_32
media-gfx/graphite2 abi_x86_32
media-libs/freetype abi_x86_32 -harfbuzz # Break the cycle.
media-libs/harfbuzz abi_x86_32
media-libs/libpng abi_x86_32
sys-libs/zlib abi_x86_32
and reemerge these packages. Then when you remove these USE flags and
emerge again, the 32-bit libraries will disappear.
Cheers,
Bryan
Somewhat related.  I had a lot of entries in a package.use file for the
abi 32 version.  Those entries were pretty old.  They were likely from
back when some packages hadn't changed to 64 yet but have since then.  I
made a copy of the entries and removed the file.  I then did a emerge
-auDN world and it is changing to 64 version for all of them without
complaint.  I mention this for this reason, anyone reading this may want
to check any entries they may have but forgot about and see if they can
be removed on their system as well.  This may take care of any future
problems like this or other problems, such as no 32 version available
anymore. 
Reading this post is what reminded me that I had those entries.  I'd
forgot about it since they are in a separate file from other package.use
entries.  I may not be alone in this.
Dale
:-)  :-) 
This ended up doing that circularharfbuzz and freetype thing.  I removed
a couple packages that I have that others may not.  I ended up doing
this to get around it and it doesn't require any file editing. 


USE="-harfbuzz abi_x86_32" emerge -1va app-arch/bzip2 dev-libs/glib
media-libs/freetype dev-libs/libpcre media-gfx/graphite2
media-libs/harfbuzz media-libs/libpng sys-libs/zlib


And then:


emerge -avuDN --with-bdeps=y @world


I post that just in case someone can't get around the problem with the
info from Bryan.  I'm not sure why Bryan's didn't work tho. 

Dale

:-)  :-) 

Loading...