On 2025/06/30 21:35, Tomoaki AOKI wrote:
On Mon, 30 Jun 2025 14:59:02 +0300
Gleb Popov <arr...@freebsd.org> 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.
Templates/BSD.local.dist will try to delete this directory if it is empty :)

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.

Regards.


Reply via email to