Subject: | Executables installed by EU::MM not compatible with -Duserelocatableinc |
When I build perl with -Duserelocatableinc, and then move perl to
another directory, and then install cpanm (it successfully installs), I
am unable to run cpanm directly
./Configure \
-Dprefix=/opt \
-des \
-Duserelocatableinc
...
sudo mv /opt/perl-5.14.2 /opt/perl-somethingelse
sudo /opt/perl-somethingelse/bin/perl ./cpanm App::cpanminus
Fetching
http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.5003.tar.gz
... OK
Configuring App-cpanminus-1.5003 ... OK
Building and testing App-cpanminus-1.5003 for App::cpanminus ... OK
Successfully installed App-cpanminus-1.5003
head /opt/perl-somethingelse/bin/cpanm
#!/opt/perl-5.14.2/bin/perl
eval 'exec /opt/perl-5.14.2/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
...
sudo /opt/perl-somethingelse/bin/cpanm
sudo: unable to execute /opt/perl-somethingelse/bin/cpanm: No such
file or directory
ll /opt/perl-somethingelse/bin/cpanm
-r-xr-xr-x 1 root root 318K Nov 1 13:45
/opt/perl-somethingelse/bin/cpanm
sudo /opt/perl-somethingelse/bin/perl
/opt/perl-somethingelse/bin/cpanm Some::Module
(works OK)
Miyagawa suggests... - https://github.com/miyagawa/cpanminus/issues/126#
"
I believe it is MakeMaker that adds the shebang line like that and
is common for all the executables installed by MakeMaker, not just
cpanm.
"