No such thing as a small change | |
PerlMonks |
Re: Dealing with perl upgrade and local XS modulesby no longer just digit (Beadle) |
on Apr 01, 2021 at 07:39 UTC ( [id://11130661]=note: print w/replies, xml ) | Need Help?? |
Because last time I had to carry out such an upgrade, I found myself in a strange (better say nightmare) situation in which a local installation of Scalar::Util (if I remember well) was one of the XS modules blocking practically the execution of 70% of the library , including the standard cpan(1) script from executing (which resulted in practically re-installing the whole library), I thought better ask this time and plan for the worst: is there any recommended/battle-tested way to proceed with XS modules rebuilding after an upgrade? Scalar::Util is a dual-life module which is in the Perl core as well as on CPAN. It should be installed together with Perl. I always install Perl from the source code, and I always install it into my user space. I'm not sure what kind of problems you might be having, but when I install Perl I don't allow it to use the old versions of libraries, that is when the configure script asks if it is OK to use the old libraries I say "no" (the default is to use the old libraries). That means I have to update every module from CPAN which I'm using, but it seems to work better that way. If the CPAN script stops working you can always download the tarfile from metacpan and then go into the directory and do "perl Makefile.PL;make;make test;make install" to install it yourself. I did look at finding a way to reliably find all and only the XS modules in my local lib but I hadn't any luck. Any suggestions? Yes, I have a suggestion since I frequently have to update just the XS modules on a web host when they change the version of Perl. To find the XS modules you have installed, go to your local library directory where Perl modules are installed, and run the following command: find . -name "*.so" That will produce a list of modules, for example like this:
Now here is a function which sorts out the output of that, as if the above text is all in $so. You will need to edit it to suit your situation:
The above Perl code will not run "as-is" but should be a fairly useful basis for getting started.
In Section
Seekers of Perl Wisdom
|
|