Subject: | Using prove in src/Makefile is problematic |
On some smoke machines I see the following while running "./Build test":
...
prove -e ""
/usr/bin/perl: symbol lookup error: /home/cpansand/.cpan/build/2016031018/Time-HiRes-1.9728-cRhyOH/blib/arch/auto/Time/HiRes/HiRes.so: undefined symbol: Perl_xs_handshake
make: *** [test] Error 127
Unable to make - No such file or directory at inc/Alien/make/Module/Build.pm line 108.
...
So what's the problem here? src/Makefile uses the prove from $PATH. In my case I don't add the current perl's bin directory to $PATH, so prove is the system's /usr/bin/prove. During testing PERL5LIB is potentially set, and in this case it contains the path to a freshly built Time::HiRes, built for the _current_ perl. And apparently this Time::HiRes build is incompatible with the system's perl.
I can think of the following workarounds, but none of them being really good:
* unset PERL5LIB in src/Makefile
* make sure that the current perl's prove is used (in Makefile.PL INSTALLBIN is available, which could be put into the PATH or something like $INSTALLBIN/prove be used)
* rewrite ACTION_test to not use the Makefile's test
...
Regards,
Slaven