Re: pkg upgrade odity

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Tue, 30 Apr 2024 21:15:44 UTC
Le 30 avril 2024 23:05:49 GMT+02:00, Tatsuki Makino <tatsuki_makino@hotmail.com> a écrit :
>Baptiste Daroussin wrote on 2024/05/01 05:21:
>> Le 30 avril 2024 13:18:41 GMT+02:00, Alexander Leidinger <Alexander@Leidinger.net> a écrit :
>>> In my case it complains about missing shared libs for exactly those ports which it wants to deinstall, but they are present in the system...
>>> ---snip---
>>> # pkg check -da
>>> Checking all packages: 100%
>>> mosh is missing a required shared library: libabsl_time_zone.so.2301.0.0
>(omit)
>>> netdata is missing a required shared library: libabsl_time_zone.so.2301.0.0
>(omit)
>>> protobuf is missing a required shared library: libabsl_time_zone.so.2301.0.0
>(omit)
>>
>> Not at all! I need the output of pkg info -R --raw-format ucl abseil
>> This is a real issue on your system, which usually comes from local building, is it your case?
>
>In this case, the libraries usually have relative rpath.
>For example, $ORIGIN and ../ are included, but do not start with /.
>To find the library that is causing the problem, we can use the following command
>
>pkg info -b -q protobuf | xargs -J % -n 1 find /usr/local/lib/ -name % -print -exec readelf -d {} \; | grep -e ^/ -e RUNPATH
>
>This causes problems with the base library, which is Bugzilla 261550.
>This time it seems that the library cannot be found because the file was placed in a different location than the library path of the ldconfig.
>
>Regards.
>

pkg is not supposed to play with such case, provides/requires are only there for libraries on the regular path from ldconfig! Not to deal with runpath it would be fragile. For them we have bundle_libs=yes in ports to be set by the maintainer so they are not exposed.

Best regards,
Bapt