Project

General

Profile

Actions

Bug #14953

open

Infer perl parameters from $(PERL)

Added by Marcel Telka over 1 year ago. Updated 5 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The illumos-gate now contains hardcoded several perl related values tightly bound to perl we want to build our perl modules for - see usr/src/Makefile.master and usr/src/tools/env/illumos.sh.

There are several problems with this approach:

  • these values are almost always outdated - see #14950,
  • a developer (or distribution) needs carefully set various perl related variables in the env file so they are valid, correct, up-to-date and consistent - for example OpenIndiana now needs to set four perl related vars for the illumos-gate build.

This aims to replace such error prone approach by automatic detection of all parameters. With this, the only perl related parameter that would be possibly needed to be set in the env file is PERL. And this would be needed only in a rare case when developer (or distribution) needs to build perl modules for different perl version than the one installed as /usr/perl5/bin/perl (which is mediated symlink at OpenIndiana via system-perl mediator).


Related issues

Related to illumos gate - Bug #14950: illumos.sh should specify a realistic perl versionNew

Actions
Related to illumos gate - Bug #15900: _LARGEFILE_SOURCE64 does not existNew

Actions
Blocked by illumos gate - Bug #15765: perl shouldn't be run from ADJUNCT_PROTONew

Actions
Actions #1

Updated by Marcel Telka over 1 year ago

  • Related to Bug #14950: illumos.sh should specify a realistic perl version added
Actions #2

Updated by Marcel Telka over 1 year ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk over 1 year ago

  • Gerrit CR set to 2336
Actions #4

Updated by Marcel Telka over 1 year ago

Testing

This is after build on recent OpenIndiana where /usr/perl5/bin/perl is perl-5.36, without any perl related setting in the env file:

$ find proto/root_i386/usr/perl5/ -type f | xargs file
proto/root_i386/usr/perl5/5.36/lib/Sun/Solaris/Pg.pm:   executable /usr/perl5/bin/perl script
proto/root_i386/usr/perl5/5.36/lib/Sun/Solaris/BSM/_BSMparse.pm:        ascii text
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/auto/Sun/Solaris/Kstat/Kstat.so:       ELF 64-bit LSB dynamic lib AMD64 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/auto/Sun/Solaris/Utils/Utils.so:       ELF 64-bit LSB dynamic lib AMD64 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/auto/Sun/Solaris/Lgrp/Lgrp.so: ELF 64-bit LSB dynamic lib AMD64 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/auto/Sun/Solaris/Project/Project.so:   ELF 64-bit LSB dynamic lib AMD64 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/auto/Sun/Solaris/Intrs/Intrs.so:       ELF 64-bit LSB dynamic lib AMD64 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/auto/Sun/Solaris/Task/Task.so: ELF 64-bit LSB dynamic lib AMD64 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/Sun/Solaris/Intrs.pm:  ascii text
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/Sun/Solaris/Project.pm:        ascii text
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/Sun/Solaris/Kstat.pm:  ascii text
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/Sun/Solaris/Utils.pm:  ascii text
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/Sun/Solaris/Task.pm:   ascii text
proto/root_i386/usr/perl5/5.36/lib/i86pc-solaris-thread-multi-64/Sun/Solaris/Lgrp.pm:   ascii text
$

This is after build on recent OpenIndiana where /usr/perl5/bin/perl is perl-5.36, with (currently obsoleted, but still available in the pkg repo) perl-5.22 installed and export PERL="/usr/perl5/5.22/bin/perl" added to the env file; to confirm the bitness is properly detected and used:

$ find proto/root_i386/usr/perl5/ -type f | xargs file
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/Sun/Solaris/Intrs.pm:    ascii text
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/Sun/Solaris/Project.pm:  ascii text
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/Sun/Solaris/Task.pm:     ascii text
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/Sun/Solaris/Lgrp.pm:     ascii text
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/Sun/Solaris/Utils.pm:    ascii text
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/Sun/Solaris/Kstat.pm:    ascii text
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/auto/Sun/Solaris/Task/Task.so:   ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/auto/Sun/Solaris/Intrs/Intrs.so: ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/auto/Sun/Solaris/Kstat/Kstat.so: ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/auto/Sun/Solaris/Utils/Utils.so: ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/auto/Sun/Solaris/Lgrp/Lgrp.so:   ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.22/lib/i86pc-solaris-64int/auto/Sun/Solaris/Project/Project.so:     ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped, no debugging information available
proto/root_i386/usr/perl5/5.22/lib/Sun/Solaris/BSM/_BSMparse.pm:        ascii text
proto/root_i386/usr/perl5/5.22/lib/Sun/Solaris/Pg.pm:   executable /usr/perl5/bin/perl script
$

In addition, the nightly/onu/boot cycle passed.

Actions #5

Updated by Marcel Telka 8 months ago

As a part of this fix the compiler macro _LARGEFILE_SOURCE64 was replaced by _LARGEFILE64_SOURCE for 64-bit build. This was apparent typo in the usr/src/cmd/perl/Makefile.perl file.
Edit: see #15900

Actions #6

Updated by Marcel Telka 8 months ago

  • Status changed from In Progress to Pending RTI
Actions #7

Updated by Marcel Telka 8 months ago

  • Blocked by Bug #15765: perl shouldn't be run from ADJUNCT_PROTO added
Actions #8

Updated by Marcel Telka 8 months ago

  • Status changed from Pending RTI to In Progress

The work on this bug so far was based on assumption that it is safe to run perl from ADJUNCT_PROTO, but it is not the case and the current behavior is buggy. See #15765. The further work on this will be postponed until #15765 is resolved.

Actions #9

Updated by Marcel Telka 5 months ago

  • Related to Bug #15900: _LARGEFILE_SOURCE64 does not exist added
Actions

Also available in: Atom PDF