Bug#628522: perl: ExtUtils::MakeMaker overriding CCFLAGS when passed to WriteMakefile

Dominic Hargreaves dom at earth.li
Thu Jun 2 17:23:25 UTC 2011


On Mon, May 30, 2011 at 11:05:43PM +0300, Niko Tyni wrote:
> On Sun, May 29, 2011 at 07:46:06PM +0100, Dominic Hargreaves wrote:
> > Package: perl-modules
> > Version: 5.14.0-1
> > Severity: important
> > 
> > This is a similar issue to that in
> > <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624460>
> > where Extutils::CBuilder was fixed to not overwrite
> > $Config{ccflags} with $ENV{CFLAGS}.
> 
> > Again, this isn't a new problem, but it's only with 5.14 that it's fatal.
> 
> It's a bit hard to say whether this is a bug in EU::MM or the modules
> overriding CCFLAGS. The documentation doesn't specify one way or the other,
> but at least libdbd-oracle-perl seems to get it right with
> 
>   $opts{CCFLAGS} = "-P $Config{ccflags}" if $Config{cc} eq 'bcc32';  # force C++
> 
> Also, the last test in cpan/ExtUtils-MakeMaker/t/MM_Unix.t actually
> checks that CCFLAGS overrides anything else, so this seems to be the
> intended behaviour.
> 
> However, I can't think of a case where overriding $Config{ccflags} is
> the correct thing to do.
> 
> The attached naive patch appends CCFLAGS to $Config{ccflags}. Could you
> please try and see if it fixes things for you? Ideally, it would also
> be useful to see if it breaks anything that used to work without it.
> (The patch is with -p1 from the EU::MM repository so it won't apply to the
> perl sources with just 'git am').

I applied this patch to a test build of perl 5.14.0 and rebuilt the
XS modules in sid with it.

All the packages that failed because of this before now built okay (eg:

cc -c  -I../lib -I../lib -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -O2 -g   -DVERSION=\"1.2.7\" -DXS_VERSION=\"1.2.7\" -fPIC "-I/usr/lib/perl/5.14/CORE"   Hivex.c

and I couldn't spot any new breakage that can be attributed to this
change.
 
> Once that's confirmed, I think the issue needs to be discussed upstream
> before applying this for the Debian packages.

Okay; would you be able to do this now that we have validated the patch
as working?

Thanks,
Dominic.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)






More information about the Perl-maintainers mailing list