Subject: | build failure with latest Module::Build versions |
Module::Build has changed, and doesn't use %Config anymore. As a result,
Device::Cdio doesn't build:
Creating new 'Build' script for 'Device-Cdio' version '0.2.4'
+ ./Build 'CFLAGS=-O2 -g -pipe -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586
-mtune=generic -fasynchronous-unwind-tables'
Use of uninitialized value in concatenation (.) or string at
/home/guillomovitch/cooker/perl-Device-Cdio/BUILD/Device-Cdio-v0.2.4/_build/lib/MyModuleBuilder.pm
line 134.
Use of uninitialized value $_[0] in join or string at
/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/File/Spec/Unix.pm
line 86.
Copying lib/perlcdio.pm -> blib/lib/perlcdio.pm
Copying lib/Device/Cdio/Util.pm -> blib/lib/Device/Cdio/Util.pm
Copying lib/Device/Cdio.pm -> blib/lib/Device/Cdio.pm
Copying lib/perliso9660.pm -> blib/lib/perliso9660.pm
Copying lib/Device/Cdio/ISO9660.pm -> blib/lib/Device/Cdio/ISO9660.pm
Copying lib/perlmmc.pm -> blib/lib/perlmmc.pm
Copying lib/Device/Cdio/ISO9660/FS.pm -> blib/lib/Device/Cdio/ISO9660/FS.pm
Copying lib/Device/Cdio/Track.pm -> blib/lib/Device/Cdio/Track.pm
Copying lib/Device/Cdio/Device.pm -> blib/lib/Device/Cdio/Device.pm
Copying lib/Device/Cdio/ISO9660/IFS.pm ->
blib/lib/Device/Cdio/ISO9660/IFS.pm
-I/CORE -c -Wno-strict-aliasing -Wno-unused-function -Wno-unused-value
-Wno-unused-function -Wno-unused-variable -o perlcdio_wrap perlcdio_wrap.c
Can't exec "-I/CORE": Aucun fichier ou dossier de ce type at
/usr/lib/perl5/vendor_perl/5.10.0/Module/Build/Base.pm line 4386.
Use of uninitialized value in concatenation (.) or string at
/home/guillomovitch/cooker/perl-Device-Cdio/BUILD/Device-Cdio-v0.2.4/_build/lib/MyModuleBuilder.pm
line 157.
error building file from 'perlcdio_wrap.c' at
/home/guillomovitch/cooker/perl-Device-Cdio/BUILD/Device-Cdio-v0.2.4/_build/lib/MyModuleBuilder.pm
line 157.
Attached patch, from Debian package maintainers, fix the issue.
Subject: | 06_module_build.patch |
Author: <gregor+debian@comodo.priv.at>
Description: Fix Build.PL to work with newer Module::Build which doesn't use
%Config automatically anymore.
--- a/Build.PL
+++ b/Build.PL
@@ -40,7 +40,7 @@ sub process_swig_files {
sub process_swig {
my ($self, $main_swig_file, $deps_ref) = @_;
- my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
+ my ($cf, $p) = ($self->{config}->{values}, $self->{properties}); # For convenience
# File name. e.g, perlcdio.swg -> perlcdio_wrap.c
(my $file_base = $main_swig_file) =~ s/\.[^.]+$//;
@@ -82,7 +82,7 @@ sub process_swig {
# Invoke swig with -perl -outdir and other options.
sub compile_swig {
my ($self, $file, $c_file) = @_;
- my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
+ my ($cf, $p) = ($self->{config}->{values}, $self->{properties}); # For convenience
# File name, minus the suffix
(my $file_base = $file) =~ s/\.[^.]+$//;
@@ -124,7 +124,7 @@ sub compile_swig {
# Also we modified the die to report the full file name.
sub link_c {
my ($self, $to, $file_base, $obj_file) = @_;
- my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
+ my ($cf, $p) = ($self->{config}->{values}, $self->{properties}); # For convenience
my $lib_file = File::Spec->catfile($to, File::Basename::basename("$file_base.$cf->{dlext}"));
@@ -149,7 +149,7 @@ sub link_c {
sub compile_c {
my ($self, $file) = @_;
- my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
+ my ($cf, $p) = ($self->{config}->{values}, $self->{properties}); # For convenience
# File name, minus the suffix
(my $file_base = $file) =~ s/\.[^.]+$//;
@@ -356,4 +356,19 @@ my $builder = $class->new(
);
$builder->add_build_element('swig');
+my @confvars = (
+ "dlext",
+ "lddlflags",
+ "shrpenv",
+ "ld",
+ "obj_ext",
+ "installarchlib",
+ "cccdlflags",
+ "ccflags",
+ "optimize",
+ "cc",
+);
+foreach my $confvar(@confvars) {
+ $builder->config($confvar, $Config{$confvar});
+}
$builder->create_build_script();