FAQ
# New Ticket Created by Father Chrysostomos
# Please include the string: [perl #128295]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=128295 >


I have tried installing perl 5.24.0 on an old PPC machine, with the configuration below, but it installed the perl binary and the scripts in /bin, even though I specified a prefix of /usr.

I don’t know exactly which option is responsible for the bug, but I do find it really strange.

This is what is *really* unhelpful:

$ which cpan5.24.0
/bin/cpan5.24.0
$ cpan5.24.0
-bash: /bin/cpan5.24.0: /usr/bin/perl5.24.0: bad interpreter: No such file or directory
$ head -3 `which cpan5.24.0`
#!/usr/bin/perl5.24.0
     eval 'exec /usr/bin/perl5.24.0 -S $0 ${1+"$@"}'
  if $running_under_some_shell;

So the #! line is correct in using /usr/bin/, which is what I asked for, but every got plopped in /bin instead, so nothing5.24.0 works. I have to use perl5.24.0 -S whatever5.24.0. Grrr!!!

More info follows. Also attached are config.sh and Policy.sh.

$ which perl5.24.0
/bin/perl5.24.0
$ perl5.24.0 -V
Summary of my perl5 (revision 5 version 24 subversion 0) configuration:

   Platform:
     osname=darwin, osvers=9.7.0, archname=darwin-2level
     uname='darwin treebeard.local 9.7.0 darwin kernel version 9.7.0: tue mar 31 22:54:29 pdt 2009; root:xnu-1228.12.14~1release_ppc power macintosh '
     config_args='-de -Dprefix=/usr -Doptimize=-O3 -Accflags=-DNO_MATHOMS -Dversiononly'
     hint=recommended, useposix=true, d_sigaction=define
     useithreads=undef, usemultiplicity=undef
     use64bitint=undef, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-fno-common -DPERL_DARWIN -DNO_MATHOMS -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV',
     optimize='-O3',
     cppflags='-fno-common -DPERL_DARWIN -DNO_MATHOMS -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
     ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321, doublekind=4
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=6
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib'
     libpth=/usr/local/lib /usr/lib
     libs=-lpthread -ldbm -ldl -lm -lutil -lc
     perllibs=-lpthread -ldl -lm -lutil -lc
     libc=, so=dylib, useshrplib=false, libperl=libperl.a
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl):
   Compile-time options: HAS_TIMES NO_MATHOMS PERLIO_LAYERS PERL_COPY_ON_WRITE
                         PERL_DONT_CREATE_GVSV
                         PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                         PERL_PRESERVE_IVUV PERL_USE_SAFE_PUTENV
                         USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                         USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
                         USE_PERLIO USE_PERL_ATOF
   Built under darwin
   Compiled at May 26 2016 13:38:00
   @INC:
     /Library/Perl/5.24.0/darwin-2level
     /Library/Perl/5.24.0
     /Network/Library/Perl/5.24.0/darwin-2level
     /Network/Library/Perl/5.24.0
     /System/Library/Perl/5.24.0/darwin-2level
     /System/Library/Perl/5.24.0
     /Library/Perl
     /Network/Library/Perl
     .


--

Father Chrysostomos

Search Discussions

  • James E Keenan via RT at May 30, 2016 at 11:27 pm

    On Mon May 30 14:30:17 2016, sprout wrote:
    I have tried installing perl 5.24.0 on an old PPC machine, with the
    configuration below, but it installed the perl binary and the scripts
    in /bin, even though I specified a prefix of /usr.

    I don’t know exactly which option is responsible for the bug, but I do
    find it really strange.

    This is what is *really* unhelpful:

    $ which cpan5.24.0
    /bin/cpan5.24.0
    $ cpan5.24.0
    -bash: /bin/cpan5.24.0: /usr/bin/perl5.24.0: bad interpreter: No such
    file or directory
    $ head -3 `which cpan5.24.0`
    #!/usr/bin/perl5.24.0
    eval 'exec /usr/bin/perl5.24.0 -S $0 ${1+"$@"}'
    if $running_under_some_shell;

    So the #! line is correct in using /usr/bin/, which is what I asked
    for, but every got plopped in /bin instead, so nothing5.24.0 works. I
    have to use perl5.24.0 -S whatever5.24.0. Grrr!!!

    More info follows. Also attached are config.sh and Policy.sh.

    $ which perl5.24.0
    /bin/perl5.24.0
    $ perl5.24.0 -V
    Summary of my perl5 (revision 5 version 24 subversion 0)
    configuration:

    Platform:
    osname=darwin, osvers=9.7.0, archname=darwin-2level
    uname='darwin treebeard.local 9.7.0 darwin kernel version 9.7.0: tue
    mar 31 22:54:29 pdt 2009; root:xnu-1228.12.14~1release_ppc power
    macintosh '
    config_args='-de -Dprefix=/usr -Doptimize=-O3 -Accflags=-DNO_MATHOMS
    -Dversiononly'
    In Porting/Glossary, I find:

    #####
    versiononly (versiononly.U):
         If set, this symbol indicates that only the version-specific
         components of a perl installation should be installed.
         This may be useful for making a test installation of a new
         version without disturbing the existing installation.
         Setting versiononly is equivalent to setting installperl's -v option.
         In particular, the non-versioned scripts and programs such as
         a2p, c2ph, h2xs, pod2*, and perldoc are not installed
         (see INSTALL for a more complete list). Nor are the man
         pages installed.
         Usually, this is undef.
    #####

    If you reconfigure without '-Dversiononly', do you get better results?

    That being said, when I configured perl-5.24.0 on an even older Darwin/PPC with the exact same arguments as you, I got entries in config.sh like:

    #####
    installbin='//bin'
    ...
    installman1dir='//share/man/man1'
    ...
    installprefix='/'
    ...
    installscript=''/bin'
    ...
    installsitebin='//local/bin'
    etc.
    #####

    All of which is similar to your undesired results.

    Thank you very much.



    --
    James E Keenan (jkeenan@cpan.org)

    ---
    via perlbug: queue: perl5 status: new
    https://rt.perl.org/Ticket/Display.html?id=128295
  • James E Keenan via RT at May 30, 2016 at 11:32 pm

    On Mon May 30 16:27:34 2016, jkeenan wrote:
    On Mon May 30 14:30:17 2016, sprout wrote:
    config_args='-de -Dprefix=/usr -Doptimize=-O3 -Accflags=-
    DNO_MATHOMS
    -Dversiononly'
    In Porting/Glossary, I find:

    #####
    versiononly (versiononly.U):
    If set, this symbol indicates that only the version-specific
    components of a perl installation should be installed.
    This may be useful for making a test installation of a new
    version without disturbing the existing installation.
    Setting versiononly is equivalent to setting installperl's -v
    option.

    And, in installperl, I see that the '-v' option is described thus:

    #####
       -v Only install perl as a binary with the version number in the name.
                 (Override whatever config.sh says)
    #####


    --
    James E Keenan (jkeenan@cpan.org)

    ---
    via perlbug: queue: perl5 status: open
    https://rt.perl.org/Ticket/Display.html?id=128295
  • James E Keenan via RT at May 30, 2016 at 11:59 pm

    On Mon May 30 16:32:47 2016, jkeenan wrote:
    On Mon May 30 16:27:34 2016, jkeenan wrote:
    On Mon May 30 14:30:17 2016, sprout wrote:
    config_args='-de -Dprefix=/usr -Doptimize=-O3 -Accflags=-
    DNO_MATHOMS
    -Dversiononly'
    In Porting/Glossary, I find:

    #####
    versiononly (versiononly.U):
    If set, this symbol indicates that only the version-specific
    components of a perl installation should be installed.
    This may be useful for making a test installation of a new
    version without disturbing the existing installation.
    Setting versiononly is equivalent to setting installperl's -v
    option.

    And, in installperl, I see that the '-v' option is described thus:

    #####
    -v Only install perl as a binary with the version number in the
    name.
    (Override whatever config.sh says)
    #####
    But, on still *more* investigation, it seems that if I configure *with* '-Dprefix=/usr' but *without* '-Dversionly', I reproduce the same puzzling values in the '^install*' section of config.sh as you got. See attachment.
    --
    James E Keenan (jkeenan@cpan.org)

    ---
    via perlbug: queue: perl5 status: open
    https://rt.perl.org/Ticket/Display.html?id=128295
  • Tony Cook via RT at May 31, 2016 at 12:19 am

    On Mon May 30 14:30:17 2016, sprout wrote:
    I have tried installing perl 5.24.0 on an old PPC machine, with the
    configuration below, but it installed the perl binary and the scripts
    in /bin, even though I specified a prefix of /usr.

    I don’t know exactly which option is responsible for the bug, but I do
    find it really strange.
    I think it's caused by the hints on darwin, from hints/darwin.sh:

    case "$prefix" in
    ...
    '/usr') # We are building/replacing the built-in perl
      prefix='/';
      installprefix='/'; # used to set installbin
      bin='/usr/bin';
      siteprefix='/usr/local';
    ...

    That said, replacing your system perl is probably dangerous (OS X 10.11 doesn't allow it AFAIK.)

    Tony

    ---
    via perlbug: queue: perl5 status: open
    https://rt.perl.org/Ticket/Display.html?id=128295
  • Father Chrysostomos via RT at May 31, 2016 at 1:01 am

    On Mon May 30 17:19:13 2016, tonyc wrote:
    On Mon May 30 14:30:17 2016, sprout wrote:
    I have tried installing perl 5.24.0 on an old PPC machine, with the
    configuration below, but it installed the perl binary and the scripts
    in /bin, even though I specified a prefix of /usr.

    I don’t know exactly which option is responsible for the bug, but I
    do
    find it really strange.
    I think it's caused by the hints on darwin, from hints/darwin.sh:

    case "$prefix" in
    ...
    '/usr') # We are building/replacing the built-in perl
    prefix='/';
    installprefix='/'; # used to set installbin
    bin='/usr/bin';
    siteprefix='/usr/local';
    ...

    That said, replacing your system perl is probably dangerous
    People always say that, though I’ve done it numerous times with impunity.

    In any case, I’m *not* trying to replace the system perl here (-Dversiononly), and I’ve used this incantation before.

    A bisect points to v5.23.4-46-g41d7307:

    $ ../perl.git/porting/bisect.pl -Dprefix=/usr --target config.sh --end v5.24.0 --match installbin=\'/usr config.sh
    ...
    41d73075f0801c26794dadb1ff690f305d7e53a7 is the first bad commit
    commit 41d73075f0801c26794dadb1ff690f305d7e53a7
    Author: Ivan Pozdeev <vano@mail.mipt.ru>
    Date: Wed Aug 12 20:33:12 2015 +0300

         Make -O behaviour the default

    I can’t see how that commit causes that.

    --

    Father Chrysostomos


    ---
    via perlbug: queue: perl5 status: open
    https://rt.perl.org/Ticket/Display.html?id=128295
  • Aaron Crane at May 31, 2016 at 8:05 pm

    Father Chrysostomos via RT wrote:
    On Mon May 30 17:19:13 2016, tonyc wrote:
    On Mon May 30 14:30:17 2016, sprout wrote:
    I have tried installing perl 5.24.0 on an old PPC machine, with the
    configuration below, but it installed the perl binary and the scripts
    in /bin, even though I specified a prefix of /usr.

    I don’t know exactly which option is responsible for the bug, but I
    do
    find it really strange.
    I think it's caused by the hints on darwin, from hints/darwin.sh:

    case "$prefix" in
    ...
    '/usr') # We are building/replacing the built-in perl
    prefix='/';
    installprefix='/'; # used to set installbin
    bin='/usr/bin';
    siteprefix='/usr/local';
    ...
    This looks like a Very Bad Idea, imho.

    AFAICT, hints/darwin.sh has overridden the user's configured paths
    "forever", modulo some back-and-forth in summer 2003. But the
    impression I get from the Git history is that this has been done to
    make life easier for Apple building the perl installation that they
    actually supply as part of Mac OS. This strikes me as the epitome of a
    special-purpose requirement; we should not make all users building a
    Perl explicitly unpick path mangling that's needed only by Apple
    engineers.
    In any case, I’m *not* trying to replace the system perl here (-Dversiononly), and I’ve used this incantation before.
    At the very least, hints/darwin.sh must avoid overriding the user's
    chosen prefix under -Dversiononly.

    But I honestly can't see a good argument against simply jettisoning
    the path mangling in the "/usr" case in hints/darwin.sh. And I think
    this is a good time to do it: we've got a large fraction of a year to
    shake out any Mac OS build problems before the 5.26 freeze.

    If I don't hear a counterargument, I'll make that change in the next few days.
    $ ../perl.git/porting/bisect.pl -Dprefix=/usr --target config.sh --end v5.24.0 --match installbin=\'/usr config.sh
    ...
    41d73075f0801c26794dadb1ff690f305d7e53a7 is the first bad commit
    commit 41d73075f0801c26794dadb1ff690f305d7e53a7
    Author: Ivan Pozdeev <vano@mail.mipt.ru>
    Date: Wed Aug 12 20:33:12 2015 +0300

    Make -O behaviour the default

    I can’t see how that commit causes that.
    I share your puzzlement; I see signs of the same brokenness under
    5.22, even when running Configure with the -O option. Though
    admittedly this is based on looking at the config.sh generated by
    Configure, rather than by building and installing.

    --
    Aaron Crane ** http://aaroncrane.co.uk/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedMay 30, '16 at 9:30p
activeMay 31, '16 at 8:05p
posts7
users2
websiteperl.org

People

Translate

site design / logo © 2018 Grokbase