Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^6: Installing (lotsa) modules

by Corion (Pope)
on Jan 25, 2021 at 08:00 UTC ( #11127432=note: print w/replies, xml ) Need Help??


in reply to Re^5: Installing (lotsa) modules
in thread Installing (lotsa) modules

Yes, in general, 5.x.z will be compatible with 5.x.y. Changes that break this compatibility ("binary compatibility") should not get backported.

Of course, this only holds true for identical configuration options, either in the Win32/Makefile or via Configure. If you configure a Perl differently (with/without threads, different float sizes, ...), you won't get compatibility between Perl versions, or within the same Perl version even.

Now that I think/write about this, I don't think there is a real test between Perl versions at release time to ensure that compatibility test. I think the smoke testers will find out such a breaking change quickly, but a (manual) test step should be good there ...

Replies are listed 'Best First'.
Re^7: Installing (lotsa) modules
by Bod (Deacon) on Jan 25, 2021 at 10:57 UTC
    Of course, this only holds true for identical configuration options

    I thought this was too good to be true...
    So I won't be able to bundle compiled modules on a Windows 10 machine and make then available on an unidentified Linux virtual machine (shared web host) which doesn't have (access to) a complier.

      Well, it is possible, in theory, if you cross-compile the modules on Windows for the target Linux. But it is very unlikely, and a lot of work, compared to trying to build a Perl similar to the unidentified Linux machine in a VM.

      To do that, I would run perl -V (or perl -MConfig -MData::Dumper -e 'print Dumper \%Config', or the mod_perl equivalent), to get at the configure line (config_args), and then potentially look at the integer and float sizes (ivsize, nvsize).

      use 5.012; use Config; say $Config{config_args}; say $Config{nvsize}; say $Config{ivsize};

      Building a Perl with parameters identical to these (or even one where the whole of Config_heavy.pl matches the one on the unidentified Linux VM) is likely to yield compatible modules you can just upload.

      Ideally, I will be merely

      1. Download the appropriate Perl version as tarball in your VM
      2. Unpack the tarball in your VM:
        tar xjf perl-5.32.1.tar.xz
      3. Configure Perl. Maybe you can find a leftover Policy.sh or config.sh in the unnamed Linux server. Otherwise start with the output of perl -MConfig -e 'print $Config{config_args}' (from the unnamed Linux machine). Try different things until you get the generated Config_heavy.pl to match up with the one from tne unnamed Linux machine.
        sh Configure ...
      4. Test and install Perl:
        make test make install
      5. Compile your own, hopefully compatible modules for the remote side.

        Perl -V

        Update:

        config_args -des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexception +s -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-swi +tches -m64 -mtune=generic -Dccdlflags=-Wl,--enable-new-dtags -Dlddl +flags=-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions + -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-swit +ches -m64 -mtune=generic -Wl,-z,relro -DDEBUGGING=-g -Dversion=5.1 +6.3 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_b +y=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/l +ocal -Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib64/per +l5 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share/perl5/vendor_per +l -Darchlib=/usr/lib64/perl5 -Dvendorarch=/usr/lib64/perl5/vendor_per +l -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib +64 /usr/lib64 -Duseshrplib -Dusethreads -Duseithreads -Dusedtrace=/us +r/bin/dtrace -Duselargefiles -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdb +m -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl +=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_getho +stent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endpr +otoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_set +servent_r_proto -Dscriptdir=/usr/bin -Dusesitecustomize nvsize = 8 ivsize = 8

      You can't compile XS code on Windows and move it to Linux. As mentioned previously, run a VM locally the same OS and architecture as your target, that way you can compile in a fairly straight forward manner, and transfer to your host.

        This is why package management systems such as deb, RPM, ports, and so on were invented. The software could be built once and installed many times. There was even one available for Solaris!. For example, both Fedora and Ubuntu have over 3000 perl modules waiting to be installed.
        run a VM locally the same OS and architecture as your target

        Therein lies the difficulty...I have no idea of either the OS (other than Linux) or architecture of the target virtual machine.

        It is not something I am going to spend much time on.
        When it becomes mission critical, and when my Linux confidence improves, I will upgrade to VPS or dedicated server which will make the issue obsolete.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11127432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2021-07-28 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?