Perl 5.14 packaging underway

Niko Tyni ntyni at debian.org
Wed Apr 27 21:13:52 UTC 2011


On Wed, Apr 27, 2011 at 10:24:27PM +0300, Niko Tyni wrote:
> On Wed, Apr 27, 2011 at 01:18:41PM +0100, Dominic Hargreaves wrote:
> > On Wed, Apr 27, 2011 at 09:49:37AM +0300, Niko Tyni wrote:
> > > On Tue, Apr 26, 2011 at 10:28:09PM +0100, Dominic Hargreaves wrote:
> > 
> > > > At the moment I'm getting the following build failure on sid:
> > > 
> > > > Failed 4 tests out of 2037, 99.80% okay.
> > > >         ../cpan/Module-Build/t/xs.t
> > > >         ../dist/ExtUtils-ParseXS/t/basic.t
> > > >         ../dist/ExtUtils-ParseXS/t/more.t
> > > >         ../dist/ExtUtils-ParseXS/t/usage.t
> > > > 
> > > > But they all pass with flying colours when run from the same build tree
> > > > manual.

> Yes, I can reproduce it in an i386 chroot.
> 
> It only seems to happen through dpkg-buildpackage - calling 
>  ./debian/rules perl.static
> manually doesn't trigger it.

Got it. Summary: Building Perl 5.14.0-RC1 (but not 5.12.3) with CFLAGS
set makes the above tests fail on i386 because -D_FILE_OFFSET_BITS=64
is no longer passed to the preprocessor by ExtUtils::CBuilder.

In our case, it's dpkg-buildpackage setting CFLAGS to "-g -O2".

Without CFLAGS, it's

./perl harness -v ../dist/ExtUtils-ParseXS/t/basic.t
1..10
ok 1 - require ExtUtils::ParseXS;
ok 2 - Test that output contains some text
ok 3 - Create an output file
cc -I/home/niko/tmp/perl-5.14 -fPIC -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -o XSTest.o XSTest.c
ok 4
ok 5 - Make sure XSTest.o exists
cc -shared -O2 -g -L/usr/local/lib -fstack-protector -o XSTest.so XSTest.o
ok 6
ok 7 - Make sure XSTest.so exists
ok 8
ok 9
ok 10

With CFLAGS="-g -O2" as per dpkg-buildpackage, we see

1..10
ok 1 - require ExtUtils::ParseXS;
ok 2 - Test that output contains some text
ok 3 - Create an output file
cc -I/home/niko/tmp/perl-5.14 -fPIC -c -g -O2 -O2 -g -o XSTest.o XSTest.c
ok 4
ok 5 - Make sure XSTest.o exists
cc -shared -O2 -g -L/usr/local/lib -fstack-protector -o XSTest.so XSTest.o
ok 6
ok 7 - Make sure XSTest.so exists

#   Failed test at t/basic.t line 53.
not ok 8
#          got: 'Not a CODE reference at /home/niko/tmp/perl-5.14/dist/ExtUtils-ParseXS/../../lib/DynaLoader.pm line 213.
# END failed--call queue aborted at XSTest.pm line 213.
# Compilation failed in require at t/basic.t line 52.
# '
#     expected: ''
ok 9
ok 10

Bisecting shows the crucial thing is -D_FILE_OFFSET_BITS=64.
Don't know why.

It looks like this is a change in ExtUtils::CBuilder, probably
 https://github.com/dagolden/extutils-cbuilder/commit/e653d24a

Somewhat surprisingly, while the same loss of gcc options happens
with 5.12 and the separate libextutils-cbuilder-perl 0.280202-1
package, it doesn't cause test failures there.

I doubt this is a blocker for 5.14.0, but I'll report it upstream next
anyway. I'm able to reproduce it with a pristine upstream tarball and
 export CFLAGS="-g -O2"
 sh Configure -des -Dusethreads -Dprefix=/opt/p5.14  

I think we're going to have to patch ExtUtils::CBuilder for now.

> I think I was able to get it to happen manually once, but not anymore.
> As I recall, the error messages were about the .so plugins being built
> for a 64 bit target instead of a 32 bit one.

No, that was a red herring after all.
-- 
Niko




More information about the Perl-maintainers mailing list