Skip to content

Commit

Permalink
Detect perls not configured with a shared library
Browse files Browse the repository at this point in the history
Inline::Perl5 can only work if perl was configured with useshrplib; if
a perl without this configuration option is used, the user gets a host
of compiler errors that they may or may not understand.  Bailing out
early in the build process tells the user exactly what is going on,
and what they need to do to fix it.
  • Loading branch information
hoelzro committed Jul 22, 2015
1 parent a61cdc6 commit f7b4564
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Build.pm
Expand Up @@ -12,6 +12,9 @@ class Build is Panda::Builder {
shell('perl -MFilter::Simple -e ""')
or die "\nPlease install the Filter::Simple Perl 5 module!\n";

shell(q{perl -MConfig -e '$Config{config_args} =~ /-Duseshrplib/ || exit 1'})
or die "\nYour perl was not configured to build a shared library; unable to build\n";

my Str $blib = "$dir/blib";
rm_f("$dir/lib/Inline/p5helper.so");
rm_rf($blib);
Expand Down

0 comments on commit f7b4564

Please sign in to comment.