Skip to content

Loading… 's sub Inline does not respect $Config{ccflags} causing crashes on some systems. #258

shlomif opened this Issue · 0 comments

1 participant

PerlGameDev member


in 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

Testing with 
 perl -MInline=NOISY
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/ 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

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.


-- 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.