On Mon, Jun 18, 2018 at 05:40:34PM +0200, gregor herrmann wrote:
> Source: libmath-gsl-perl
> Version: 0.39-1
> Severity: serious
> Tags: upstream buster sid
> Justification: fails to build from source (but built successfully in the past)
> Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=123306

>    dh_auto_build
>       perl Build
> Building Math-GSL
> VERSION MISMATCH: Let's hope for the best.
> Processing 2.2.1 XS files, GSL 2.5 (via gsl-config) at /usr
> [build warnings]
>    dh_auto_test
>       perl Build test --verbose 1
> VERSION MISMATCH: Let's hope for the best.
> Processing 2.2.1 XS files, GSL 2.5 (via gsl-config) at /usr
> […]
> #   Failed test 'use Math::GSL::Linalg;'
> #   at t/00-load.t line 11.
> #     Tried to use 'Math::GSL::Linalg'.
> #     Error:  Can't load 
> '/build/libmath-gsl-perl-0.39/blib/arch/auto/Math/GSL/Linalg/Linalg.so' for 
> module Math::GSL::Linalg: 
> /build/libmath-gsl-perl-0.39/blib/arch/auto/Math/GSL/Linalg/Linalg.so: 
> undefined symbol: gsl_linalg_hessenberg at 
> /usr/lib/x86_64-linux-gnu/perl/5.26/DynaLoader.pm line 187.
> #  at /build/libmath-gsl-perl-0.39/blib/lib/Math/GSL/Linalg.pm line 11.
> # Compilation failed in require at t/00-load.t line 11.
> # BEGIN failed--compilation aborted at t/00-load.t line 11.

There seem to be multiple problems here.

One issue is that libgsl23 broke its ABI in 2.5+dfsg-1. I've filed #902281
about that.

Another is that the code in xs/ should really be rebuilt from the
sources in swig/, but this is currently skipped; Build.PL has

 my $ver2func = do(catfile(qw/inc ver2func/));

which breaks silently now that cwd is not on @INC anymore.

I was able to cobble a working rebuild together with something like this:

 perl -I. Build.PL
 perl Build clean  # removes xs/*
 perl -I. Build.PL
 perl Build # regenerates xs/*
 perl Build test

and the attached two patches. The latter one may not turn out to be
necessary if the deprecated functions get reinstated with #902281.
-- 
Niko Tyni   nt...@debian.org
>From b93eda2b6edcbbcb999c4aa28ad728a46db9631d Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Sun, 24 Jun 2018 15:26:52 +0300
Subject: [PATCH 1/2] Fix a swig syntax error in Integration.i

This fixes

 swig/IEEEUtils.i:11: Warning 453: Can't apply (char const *format). No typemaps are defined.
 Creating xs/Integration_wrap.1.15.c
 /usr/include/gsl/gsl_integration.h:363: Error: Syntax error - possibly a missing semicolon.
 error : No such file or directory while building ( -I/usr/include ) xs/Integration_wrap.1.15.c in pm/Math/GSL from 'swig/Integration.i' at inc/GSLBuilder.pm line 244.

and is needed at least on libgsl 2.4 / 2.5 and SWIG 3.0.12.
---
 swig/Integration.i | 1 +
 1 file changed, 1 insertion(+)

diff --git a/swig/Integration.i b/swig/Integration.i
index 0272059..0933037 100644
--- a/swig/Integration.i
+++ b/swig/Integration.i
@@ -7,6 +7,7 @@
     #include "gsl/gsl_integration.h"
     #include "gsl/gsl_math.h"
 %}
+%include "gsl/gsl_types.h"
 %include "gsl/gsl_integration.h"
 %include "gsl/gsl_math.h"
 %include "../pod/Integration.pod"
-- 
2.17.1

>From fc9ab21c646f60878ab0bfb8eb568e049cb91655 Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Sun, 24 Jun 2018 15:32:08 +0300
Subject: [PATCH 2/2] Disable deprecated function usage in SF.i

A few sf_coupling related functions are being removed in gsl 2.5 or so,
see https://bugs.debian.org/902281
---
 swig/SF.i | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/swig/SF.i b/swig/SF.i
index 07bfa3c..068c73d 100644
--- a/swig/SF.i
+++ b/swig/SF.i
@@ -4,6 +4,8 @@
 %include "renames.i"
 %include "system.i"
 
+#define  GSL_DISABLE_DEPRECATED 1
+
 %apply double *OUTPUT { double * sn, double * cn, double * dn, double * sgn };
 
 %ignore gsl_sf_ellint_D_e;
-- 
2.17.1

Reply via email to