This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Explicitly build the shared Perl library in Solaris and variants.
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 16 Dec 2015 21:35:44 +0000 (16:35 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 16 Dec 2015 23:07:13 +0000 (18:07 -0500)
commit68bcb860c817a4691f45504f9563923c5ab2f6da
treedde1c235bf7612243244e4135625b2b5648b97ff
parent817141f86f1dbef361684d7f42ab71cb4b9efe75
Explicitly build the shared Perl library in Solaris and variants.

Symptom of failure: in openindiana "make" fails:

...
./perl -Ilib -f pod/buildtoc -q
Can't load 'lib/auto/re/re.so' for module re: ld.so.1: perl: fatal:
relocation error: file lib/auto/re/re.so: symbol PL_localizing:
referenced symbol not found at lib/XSLoader.pm line 71.
  at lib/re.pm line 88.
...

Running the above command with 'env LD_DEBUG=files ...' shows that
there are many other symbol lookup failures, the one above is just
the last one before bailing.

If configured explicitly with -Duseshrplib, openindiana build succeeds.

Curiously, while the hints/solaris_2.sh (which openindiana uses) does
not specify useshrplib, Oracle/Sun builds/has been building their perl
with useshrplib since Perl 5.6.1 or thereabouts (source: Alan Burlison).
Using shared libraries is strongly recommended in Solaris in general
(source: the same).

Tested in:
- Solaris 5.10/i386 with solstudio 12.2 and gcc 4.8.0
- Solaris 5.10/sparc with solarisstudio 12.3 and gcc 4.9.2
- OpenIndiana 5.11/i386 with solarisstudio 12.3 and gcc 4.5.0
hints/solaris_2.sh