duncs / clusterssh

Cluster SSH - Cluster Admin Via SSH
https://github.com/duncs/clusterssh/wiki
897 stars 79 forks source link

Master branch fails to build when not using system perl #18

Closed mperry2 closed 9 years ago

mperry2 commented 9 years ago

I tried and failed to build clusterssh from the master branch today. I use perlbrew to manage a perl installed into my home directory. I attempted to build clusterssh with that perl.

"perl Build.PL" completes successfully, but "./Build" fails and produces output that looks like it's using the system perl in /usr/bin/perl.

mperry2@devserver:~/dev/cssh/clusterssh-master$ perl Build.PL 
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'App-ClusterSSH' version '4.03_03'
mperry2@devserver:~/dev/cssh/clusterssh-master$ ./Build 
Building App-ClusterSSH
Generating: ccon
Can't locate Exception/Class.pm in @INC (@INC contains: /home/mperry2/dev/cssh/clusterssh-master/bin_PL/../lib/perl5 /home/mperry2/dev/cssh/clusterssh-master/bin_PL/../lib /home/mperry2/dev/cssh/clusterssh-master/_build/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /home/mperry2/dev/cssh/clusterssh-master/bin_PL/../lib/App/ClusterSSH/Base.pm line 17.
BEGIN failed--compilation aborted at /home/mperry2/dev/cssh/clusterssh-master/bin_PL/../lib/App/ClusterSSH/Base.pm line 17.
Compilation failed in require at (eval 6) line 3.
        ...propagated at /usr/share/perl5/base.pm line 94.
BEGIN failed--compilation aborted at /home/mperry2/dev/cssh/clusterssh-master/bin_PL/../lib/App/ClusterSSH.pm line 10.
Compilation failed in require at ./ccon line 8.
BEGIN failed--compilation aborted at ./ccon line 8.
Failed to generate pod at bin_PL/_build_docs line 36.
bin_PL/_build_docs failed at /home/mperry2/perl5/perlbrew/perls/perl-5.18.1-cssh/lib/5.18.1/Module/Build/Base.pm line 2963.

Exception::Class is installed.

mperry2@devserver:~/dev/cssh/clusterssh-master$ perl -MException::Class -E 'say "OK"'   
OK

Here's my @INC which doesn't match what ./Build is looking for.

mperry2@devserver:~/dev/cssh/clusterssh-master$ perl -e 'print join "\n", @INC'
/home/mperry2/perl5/perlbrew/perls/perl-5.18.1-cssh/lib/site_perl/5.18.1/x86_64-linux
/home/mperry2/perl5/perlbrew/perls/perl-5.18.1-cssh/lib/site_perl/5.18.1
/home/mperry2/perl5/perlbrew/perls/perl-5.18.1-cssh/lib/5.18.1/x86_64-linux
/home/mperry2/perl5/perlbrew/perls/perl-5.18.1-cssh/lib/5.18.1
cqexbesd commented 9 years ago

On 01 Nov 2014, at 06:30, Matt Perry notifications@github.com wrote:

mperry2@devserver:~/dev/cssh/clusterssh-master$ ./Build

I would guess that Build runs the system Perl rather than the one in your path and the system perl doesn’t have Exception::Class. It’s a pretty common problem in my experience when having multiple versions of Perl around. I don’t know if its the correct solution but a workaround is probably to edit Build to point it to the perl you have in your how directory.

HTH,

Andrew=

mperry2 commented 9 years ago

No guess about it. That's exactly what's happening. There are files in bin_PL that are explicitly using the system perl instead of using the perl in the default path as they should. This appears to be a recent change because I didn't encounter the problem six months ago when I last installed the module.

Duncan will need to fix this which is why I opened the bug report. I don't know enough about the the module build process to feel confident submitting a patch.

duncs commented 9 years ago

I'm in the process of setting up a new system to replicate this so I can prove it is fixed later

Duncs

duncs commented 9 years ago

I've pushed a code commit that fixes the problem on my (new) perlbrew install. Let me know if you have any further issues. I'll push it as a new release in a week or so when I have finished up a few other minor "tidy ups".

Duncs

duncs commented 9 years ago

4.03_04 with a fix in for perlbrew released.