in reply to Relocatable Perl 5.10.0 on Solaris
FWIW, I can confirm that $^X isn't working properly on Solaris.
It seems that - on Linux - the path to the executable is determined via /proc/self/exe1. At least that's the impression I get from a quick look at the source, as well as the strace output of perl -e 'print "$^X\n"'. Unfortunately, Solaris doesn't seem to have /proc/self/exe.
A little digging shows that - on Solaris (10) - something like
$ perl -e 'printf "%s\n", readlink "/proc/self/path/a.out"' /usr/local/perl-5.8.4/bin/perl
may have a better chance to provide the info that the symlink /proc/self/exe holds on Linux... (on this Solaris box, I currently don't have Perl-5.10, so I tested with an older version — the $^X mechanism doesn't seem to have changed much since, anyway).
(might do some more thorough digging later... as time permits — in which case I'll update the node)
___
1 in case you want to look at the respective code fragments yourself, grep for one of S_set_caret_X, S_procself_val, PROCSELFEXE_PATH, HAS_PROCSELFEXE.
___
Update: (Note to the OP) In case the /proc/self/path/a.out symlink is working for you, too, you could try to extend the Configure script here (line 15563):
procselfexe='' val="$undef" case "$d_readlink" in "$define") if $issymlink /proc/self/exe ; then $ls -l /proc/self/exe > reflect if $contains /`basename $ls` reflect >/dev/null 2>&1; then echo "You have Linux-like /proc/self/exe." procselfexe='"/proc/self/exe"' val="$define" fi fi ...
and see if it works then...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Relocatable Perl 5.10.0 on Solaris
by Anonymous Monk on May 16, 2008 at 15:51 UTC | |
by almut (Canon) on May 16, 2008 at 19:11 UTC | |
by shadowkat (Initiate) on May 19, 2008 at 08:57 UTC | |
|
Re^2: Relocatable Perl 5.10.0 on Solaris
by rmcgowan (Sexton) on Dec 06, 2010 at 22:32 UTC |