Incompatibility with -Duserelocatableinc #126

zjt opened this Issue Nov 1, 2011 · 2 comments

2 participants

zjt commented Nov 1, 2011

This isn't a major bug because it's easy enough to work around, but I think that it is worth reporting.

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 \


sudo mv /opt/perl-5.14.2 /opt/perl-somethingelse

sudo /opt/perl-somethingelse/bin/perl ./cpanm App::cpanminus
Fetching ... 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

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)


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. I think as the name suggests, what is relocatable is INC, not all the binaries - they still have to be installed again. I'd be happy to know if there's any workaround.

zjt commented Nov 1, 2011

I opened an issue over at EU::MM's bug tracker

@miyagawa miyagawa closed this Nov 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment