My colleague complained, that the CA perl module in the Base package is not working. The problem is, that libCap5.so is not found by CA.pm. This can easily be tested e.g. on Debian 13 with perl -e 'use CA;'. The current install location on Debian 13 is /usr/lib/x86_64-linux-gnu/perl5/5.40/auto/libCap5.so. Unfortunately, the Debian-policy and the referenced perl-policy have little to no helpful information about perlxs libraries and this install location.
In the Perl documentation (perldoc DynaLoader) I found this:
@dl_resolve_using
A list of additional libraries or other shared objects which can be
used to resolve any undefined symbols that might be generated by a
later call to load_file().
This is only required on some platforms which do not handle
dependent libraries automatically. For example the Socket Perl
extension library (auto/Socket/Socket.so) contains references to
many socket functions which need to be resolved when it's loaded.
Most platforms will automatically know where to find the 'dependent'
library (e.g., /usr/lib/libsocket.so). A few platforms need to be
told the location of the dependent library explicitly. Use
@dl_resolve_using for this.
Following this I see 2 possible solutions:
- Move the lib to
/usr/lib/x86_64-linux-gnu/perl5/5.40/auto/Cap5/Cap5.so.
- Move the lib to
/usr/lib/x86_64-linux-gnu/libCap5.so
The perldoc implies, that we should use the proper install location Debian offers for shared objects. On the other hand, multiple packages seem to install their libraries into the auto directory and Michael explicitly moved the lib out of the standard directory (see commit dd6c00c37a1d5ff37b35146d26df93cecce71851). Any thoughts about that?
My colleague complained, that the CA perl module in the Base package is not working. The problem is, that
libCap5.sois not found byCA.pm. This can easily be tested e.g. on Debian 13 withperl -e 'use CA;'. The current install location on Debian 13 is/usr/lib/x86_64-linux-gnu/perl5/5.40/auto/libCap5.so. Unfortunately, the Debian-policy and the referenced perl-policy have little to no helpful information about perlxs libraries and this install location.In the Perl documentation (
perldoc DynaLoader) I found this:Following this I see 2 possible solutions:
/usr/lib/x86_64-linux-gnu/perl5/5.40/auto/Cap5/Cap5.so./usr/lib/x86_64-linux-gnu/libCap5.soThe perldoc implies, that we should use the proper install location Debian offers for shared objects. On the other hand, multiple packages seem to install their libraries into the auto directory and Michael explicitly moved the lib out of the standard directory (see commit
dd6c00c37a1d5ff37b35146d26df93cecce71851). Any thoughts about that?