CC: | hvandersanden [...] venda.com |
Subject: | Possible fix for "unrecognized argument in LIBS ignored: 'ARRAY(0x9367030)'" |
Symptom:
'make dist' in an inc::Module::Install-based repository warns
"Unrecognized argument in LIBS ignored: 'ARRAY(0x9367030)'"
Cause:
The Makefile.PL for the distribution has "cc_lib_links('crypto');". The
implementation in Module::Install::Compiler has:
$self->makemaker_args(
LIBS => join ' ', $self->makemaker_args->{LIBS}, map { "-l$_" } @_
);
.. but Module::Install::Makefile declares LIBS as ARRAY.
Fix:
I don't understand this stuff, but this patch appears to fix it:
--- inc/Module/Install/Compiler.pm.old 2012-05-18 11:55:03.053342597 +0100
+++ inc/Module/Install/Compiler.pm 2012-05-18 11:55:10.013352154 +0100
@@ -50,7 +50,7 @@
sub cc_lib_links {
my $self = shift;
$self->makemaker_args(
- LIBS => join ' ', $self->makemaker_args->{LIBS}, map {
"-l$_" } @_
+ LIBS => join ' ', @{$self->makemaker_args->{LIBS}}, map
{ "-l$_" } @_
);
}
Detail:
This affects, for example, Crypt-OpenSSL-X509-1.800.2:
% zcat archive/Crypt-OpenSSL-X509-1.800.2.tar.gz | tar xf -
% cd ~/pkg/Crypt-OpenSSL-X509-1.800.2
% /opt/perl-5.14.1/bin/perl Makefile.PL
Checking if your kit is complete...
Looks good
Unrecognized argument in LIBS ignored: 'ARRAY(0x9bae458)'
Writing Makefile for Crypt::OpenSSL::X509
Writing MYMETA.yml
%