Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

https://github.com/PerlGameDev/SDL/blob/master/lib/SDL.pm 's sub Inline does not respect $Config{ccflags} causing crashes on some systems. #258

Open
shlomif opened this Issue · 0 comments

1 participant

@shlomif

Hi,

in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=730549 it was diagnosed that:

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.

Please fix it in the next release.

Regards,

-- Shlomi Fish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.