Bug#730549: perl: Script with Inline fails. OK with perlbrew perl, or on Mageia Cauldron i586

Niko Tyni ntyni at debian.org
Tue Nov 26 16:58:09 UTC 2013


reassign 730549 libsdl-perl 2.540-3
retitle 730549 libsdl-perl: Inline hints override $Config{ccflags}
severity 730549 important
found 730549 2.540-1
thanks

On Tue, Nov 26, 2013 at 03:16:24PM +0200, Shlomi Fish wrote:
> Package: perl
> Version: 5.18.1-4
> Severity: normal
 
> Running this script -
> https://github.com/PerlGameDev/SDL_Manual/blob/master/code_listings/xs_effects.pl
> (after installing the requirements such as libperl-dev, gcc, libSDL-dev,
> libinline-perl, etc.) causes this error to display:
> 
> https://github.com/PerlGameDev/SDL_Manual/issues/15

> varnie at localhost: ./xs_effects.pl
> Had problems bootstrapping Inline module 'xs_pl_4067'
> 
> Not a CODE reference at /usr/lib/perl/5.14/DynaLoader.pm line 207.
> END failed--call queue aborted at (eval 50) line 207.
> 
> at ./xs_effects.pl line 16

This is a symptom of running XS code built without $Config{ccflags},
-D_FILE_OFFSET_BITS=64 in particular IIRC. I think it's visible only in
the Debian family because we're configuring perl with -Duse64bitint.
You should be able to reproduce it with a 32 bit perlbrew build using
that.

Testing with 
 perl -MInline=NOISY xs_effects.pl
confirms the compiler options from $Config{ccflags} is missing.

Plain 'use Inline C' code doesn't have this problem, It only happens with 
 use Inline with => 'SDL';

The problem seems to be in libsdl-perl; lib/SDL.pm has

        my $cflags = Alien::SDL->config('cflags');
    [...]
    return {
        LIBS => $libs,
        CCFLAGS => $cflags,
        TYPEMAPS => $path,
        AUTO_INCLUDE => '#include <SDL.h>'
    };
 
which apparently makes Inline overwrite $Config{ccflags} altogether.
Reading the Inline::C manual page, CCFLAGSEX would probably be a better
choice.

Indeed, patching CCFLAGSEX in makes the build succeed here. (The actual
effects didn't seem to work for me, but somebody actually familiar with
the SDL bindings should probably test that. In any case, that seems even
less like a problem in the Perl core.)

Reassigning. Once there's a tested fix, I think it should be considered
for a stable update.
-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list