[Info-vax] Perl (for OpenSSL) v. me

richard at levitte.org richard at levitte.org
Tue Feb 9 03:40:35 EST 2016


Den söndag 7 februari 2016 kl. 08:58:58 UTC+1 skrev Steven Schweda:
> >    I'll give that a try (and report back).
> 
>    Manually installing the Text::Template kit worked well enough.
> 
>    The new OpenSSL configuration process failed pretty miserably,
> however.  Apparently, abs2rel() isn't doing anything useful on VMS. 
> Below is a reduced script which shows some absolute paths and some
> relative paths derived from the absolute paths.  Compare the results on
> a handy Mac with the same thing on VMS:
> 
> mba$ perl --version
> 
> This is perl 5, version 18, subversion 2 (v5.18.2) built for
>  darwin-thread-multi-2level
> [...]
> 
> alp $ perl --version
> 
> This is perl 5, version 22, subversion 1 (v5.22.1) built for VMS_AXP
> [...]
> 
> mba$ cat ../os.pl
> use strict;
> use File::Basename;
> use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs catpath splitpath/;
> use Cwd qw/:DEFAULT realpath/;
> 
> my $srcdir = catdir(realpath(dirname($0)));
> my $blddir = catdir(realpath("."));
> my $dofile = abs2rel(catfile($srcdir, "util/dofile.pl"));
> 
> my $srcdir_rel = abs2rel($srcdir);
> my $blddir_rel = abs2rel($blddir);
> my $dofile_rel = abs2rel($dofile);
> 
> print "srcdir: $srcdir\n";
> print "blddir: $blddir\n";
> print "dofile: $dofile\n";
> 
> print "srcdir_rel: $srcdir_rel\n";
> print "blddir_rel: $blddir_rel\n";
> print "dofile_rel: $dofile_rel\n";
> mba$ 
> 
>    Results:
> 
> mba$ perl ../os.pl
> srcdir: /Users/sms
> blddir: /Users/sms/itrc
> dofile: ../util/dofile.pl
> srcdir_rel: ..
> blddir_rel: .
> dofile_rel: ../util/dofile.pl
> 
> alp $ perl ../os.pl             ! ("[-]os.pl" works the same.)
> srcdir: DISK$VMS083ALP:[SMS]
> blddir: DISK$VMS083ALP:[SMS.itrc]
> dofile: DISK$VMS083ALP:[SMS.util]dofile.pl
> srcdir_rel: DISK$VMS083ALP:[SMS]
> blddir_rel: DISK$VMS083ALP:[SMS.itrc]
> dofile_rel: DISK$VMS083ALP:[SMS.util]dofile.pl

A quick experience with changing 'realpath' to 'rel2abs' (which is essentially a no-op on an absolute directory spec) gave much better results when I tried:

    $ def/trans=(conc,term) foo dsa20:
    $ perl ../os.pl
    srcdir: USER:[LEVITTE]
    blddir: USER:[LEVITTE.TMP]
    dofile: USER:[LEVITTE.util]dofile.pl
    srcdir_rel: USER:[LEVITTE]
    blddir_rel: USER:[LEVITTE.TMP]
    dofile_rel: USER:[LEVITTE.util]dofile.pl
    $ edit [-]os.pl  ! Here's where I change 'realpath' to 'rel2abs'
    $ perl ../os.pl
    srcdir: FOO:[LEVITTE]
    blddir: FOO:[LEVITTE.TMP]
    dofile: [-.util]dofile.pl
    srcdir_rel: [-]
    blddir_rel: []
    dofile_rel: [-.util]dofile.pl

Quite telling.

realpath() is more for the benefit of Unix, to clean out things like /../ in paths like 'foo/../bar' while making sure it doesn't trip over symlinks and the like.  Quite obviously unnecessary on other VMS, down to outright wrong.

I'll fix Configure.



More information about the Info-vax mailing list