Bug#648955: libcrypt-dh-gmp-perl: mishandles non-empty LDFLAGS

Colin Watson cjwatson at ubuntu.com
Wed Nov 16 11:48:44 UTC 2011


Package: libcrypt-dh-gmp-perl
Version: 0.00009-4
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch precise

Makefile.PL mishandles CCFLAGS and LDFLAGS, splitting them up character
by character rather than into words.  This means that if you have a
non-empty LDFLAGS (as is the default on Ubuntu) then you end up with the
build system trying to treat every individual character in it as a
possible library name, producing an amusing failure:

  https://launchpadlibrarian.net/85203452/buildlog_ubuntu-precise-i386.libcrypt-dh-gmp-perl_0.00009-4build1_FAILEDTOBUILD.txt.gz

The following patch fixes this.

  * Fix splitting of CCFLAGS and LDFLAGS in Makefile.PL; these need to be
    split into words, not characters.

diff -Nru libcrypt-dh-gmp-perl-0.00009/debian/patches/series libcrypt-dh-gmp-perl-0.00009/debian/patches/series
--- libcrypt-dh-gmp-perl-0.00009/debian/patches/series	2011-07-30 19:02:56.000000000 +0100
+++ libcrypt-dh-gmp-perl-0.00009/debian/patches/series	2011-11-16 11:32:56.000000000 +0000
@@ -1 +1,2 @@
 spelling.patch
+split-flags.patch
diff -Nru libcrypt-dh-gmp-perl-0.00009/debian/patches/split-flags.patch libcrypt-dh-gmp-perl-0.00009/debian/patches/split-flags.patch
--- libcrypt-dh-gmp-perl-0.00009/debian/patches/split-flags.patch	1970-01-01 01:00:00.000000000 +0100
+++ libcrypt-dh-gmp-perl-0.00009/debian/patches/split-flags.patch	2011-11-16 11:34:18.000000000 +0000
@@ -0,0 +1,21 @@
+Description: Fix splitting of CCFLAGS and LDFLAGS
+ These need to be split into words, not characters.
+Author: Colin Watson <cjwatson at ubuntu.com>
+Forwarded: no
+Last-Update: 2011-11-16
+
+Index: b/Makefile.PL
+===================================================================
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -5,8 +5,8 @@
+     push @DEFINES, '-DVERY_VERBOSE';
+ }
+ 
+-my @CCFLAGS = split(//, $ENV{CCFLAGS} || '');
+-my @LDFLAGS = split(//, $ENV{LDFLAGS} || '');
++my @CCFLAGS = split(' ', $ENV{CCFLAGS} || '');
++my @LDFLAGS = split(' ', $ENV{LDFLAGS} || '');
+ my @INCLUDES;
+ my @LIBPATHS;
+ 

Thanks,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]





More information about the pkg-perl-maintainers mailing list