Package: liblasso-perl Version: 2.5.0-1 Severity: grave Tags: patch X-Debbugs-Cc: pkg-perl-maintain...@lists.alioth.debian.org, Xavier <x.guim...@free.fr>
On Sun, Jan 03, 2016 at 04:42:56PM +0200, Niko Tyni wrote: > On Sun, Jan 03, 2016 at 01:44:25PM +0100, Frederic Peters wrote: > > Xavier wrote: > > > > reproductible.debian.org reports an FTBFS problem on lemonldap-ng which > > > seems to point a Lasso problem: > > > > > > Lasso.c: loadable library and perl binaries are mismatched (got > > > handshake key 0x9200080, needed 0x9400080) > > Interesting. I can reproduce this on harris.debian.org and > liblasso-perl 2.5.0-1+b1 with just 'perl -e "use Lasso"'. It also happens on i386. I expect it's broken on all 32-bit architectures. > I think it must be something with the compiler/linker flags Lasso.so gets > built with, but the automake terseness gets in the way by stripping that > from the logs. I'm looking into it, but harris is really slow atm so it > will take a while. Indeed, it's invoking the compiler with arm-linux-gnueabihf-gcc [...] '-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' [...] and the quoting breaks the definitions. Patch attached. I've tested this as far as producing a usable Lasso.so on harris. -- Niko Tyni nt...@debian.org
>From 7abd488e135d540db2c4fc8ec903940a0d46570e Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Sun, 3 Jan 2016 19:51:33 +0200 Subject: [PATCH] Fix quoting of Perl ccflags perl -V::cflags: outputs a quoted string (like '-DTHIS -DTHAT'), which never got unquoted, but instead passed as-is to cc as cc '-DTHIS -DTHAT' which somewhat surprisingly defines just one preprocessor symbol "THIS" to an unintended value "-DTHAT 1" while leaving "THAT" undefined. % echo THIS and THAT | cpp '-DTHIS -DTHAT' # 1 "<stdin>" # 1 "<built-in>" # 1 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 1 "<command-line>" 2 # 1 "<stdin>" -DTHAT 1 and THAT This broke the binary interface between Perl and the built Lasso.so extension, resulting in the failure Lasso.c: loadable library and perl binaries are mismatched (got handshake key 0x9200080, needed 0x9400080) on at least the armhf and i386 architectures, probably on all 32-bit architectures. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7a1a6ce..c07f623 100644 --- a/configure.ac +++ b/configure.ac @@ -531,7 +531,7 @@ AC_ARG_ENABLE(perl, [ --disable-perl disable the Perl binding],, if test "X$PERL" != "X"; then PERLINSTALLSITEARCH=`$PERL -MConfig -e 'print $Config{installsitearch};'` PERLMAN3DIR=`$PERL -MConfig -e 'print $Config{man3dir};'` - PERL_CFLAGS=$($PERL -V::ccflags:) + PERL_CFLAGS=`$PERL -MConfig -e 'print $Config{ccflags};'` else PERLINSTALLSITEARCH=none PERLMAN3DIR=none -- 2.6.4