On Tue, 1 Jul 2025 06:27:05 +0900 Tatsuki Makino <[email protected]> wrote:
> On 2025/06/30 21:35, Tomoaki AOKI wrote: > > On Mon, 30 Jun 2025 14:59:02 +0300 > > Gleb Popov <[email protected]> wrote: > >> > >> I think it'd be enough to > >> > >> # cp libxml2.so /usr/local/lib/compat/ > >> > >> instead of dancing with libmap.conf > > Yes. It is usually enough. > This is the recommendation. > cp -L /usr/local/lib/libxml2.so.2 /usr/local/lib/compat/pkg/libxml2.so.2 > > > However, this time the change in the use of --version-script leads to the > difficulty of needing to use libmap.conf. > libxml2 is a useful library that has been around for a long time, so there > may be the following dependencies that arise while using the port update tool. > > [Some binary that has not completed the update.] > | | > v | > [Some library after the update is complete.] | > | | > v v > [libxml2.so.16] [libxml2.so.2] > > Trying to load two different libxml2.so libraries can cause the failure of > the startup. > > libmap prioritizes loading *.so.2 while there are old binaries that require > libxml2.so, but some tools used for constructing certain XML documents do not > work with it, so those tools are made to bypass libmap. > The topic is about how mapping to a library with the same name was usable > without causing strange recursion :) > > > > /usr/local/lib/compat/pkg/? > This directory is in a strange phantom world... :) > pkg attempts to create this directory. It would be because the directory was first introduced to preserve old libraries. If I'm not wrong, shared-opened shlibs can be deleted by root, but of course unsafe on reloads. So possibly to-be-deleted shared objects are moved to there (or somewhere else) temporarily and actually deleted once confirmed to be safe. Portupgrade preserves old shared objects to there by default maybe not to stop anything depending on it but not yet rebuilt, OTOH, portmaster doesn't preserve shared objects by default, maybe to be more secure. IIRC, OS/2 locked in-use DLL files, which makes it impossible to upgrade by service packs in-place. So it had mechanism to use a specific list of to-be-replaced files and also had device (filter) driver that handle the replacements on boot. But cannot find the records, as it was (IIRC) only temporarily added to config.sys on applying service pack (CSD) before reboot and removed on cleanup phase. So my old backup doesn't have any config.sys containing it. > Templates/BSD.local.dist will try to delete this directory if it is empty :) It would be sane way. ;-) > I don't think it's a problem that its priority is high when ldconfig is > executed. > I'm concerned that the files in /usr/local/libdata/ldconfig/ are sorted in > the order of sort :) > The libraries that are stored in compat/pkg are still being used, so their > atime gets updated. I look at that to delete old ones or to find out what is > still using them. But actually, it harms in some cases, like seen in Bug 268652 [1], as you should know. ;-) [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268652 > Regards. Regards. -- Tomoaki AOKI <[email protected]>
