perl-SDL failed to build from source in Fedora rawhide/f42 https://koji.fedoraproject.org/koji/taskinfo?taskID=128051243 For details on the mass rebuild see: https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild Please fix perl-SDL at your earliest convenience and set the bug's status to ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks, perl-SDL will be orphaned. Before branching of Fedora 43, perl-SDL will be retired, if it still fails to build. For more details on the FTBFS policy, please visit: https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
Created attachment 2071639 [details] build.log file build.log too big, will only attach last 32768 bytes
Created attachment 2071640 [details] root.log file root.log too big, will only attach last 32768 bytes
Created attachment 2071641 [details] state.log
From a build log: gcc -Isrc -I/usr/lib64/perl5/CORE '-DVERSION="2.548"' '-DXS_VERSION="2.548"' -fPIC -DNOSIGCATCH -O2 -I/usr/include/SDL '-D_GNU_SOURCE=1' -D_REENTRANT -I/usr/include/smpeg -I/usr/include -I/usr/include -I/usr/local/include -DHAVE_SDL -DUSE_THREADS -fPIC -c -D_REENTRANT -D_GNU_SOURCE -O2 '-flto=auto' -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang '-Werror=format-security' '-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3' -Wp,-D_GLIBCXX_ASSERTIONS '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' -fstack-protector-strong '-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1' -m64 '-march=x86-64' '-mtune=generic' -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection '-mtls-dialect=gnu2' -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE '-D_FILE_OFFSET_BITS=64' -g -o lib/SDL_perl.o lib/SDL_perl.c [...] In file included from lib/SDL_perl.xs:32: lib/SDL_perl.c:654:13: error: conflicting types for ‘boot_SDL’; have ‘void(PerlInterpreter *, CV *)’ {aka ‘void(struct interpreter *, struct cv *)’} 654 | XS_EXTERNAL(boot_SDL); /* prototype to pass -Wmissing-prototypes */ | ^~~~~~~~ /usr/lib64/perl5/CORE/XSUB.h:149:34: note: in definition of macro ‘XS_EXTERNAL’ 149 | # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) | ^~~~ lib/SDL_perl.xs:147:6: note: previous declaration of ‘boot_SDL’ with type ‘void(void)’ 147 | void boot_SDL(); | ^~~~~~~~ lib/SDL_perl.c:655:13: error: conflicting types for ‘boot_SDL’; have ‘void(PerlInterpreter *, CV *)’ {aka ‘void(struct interpreter *, struct cv *)’} 655 | XS_EXTERNAL(boot_SDL) | ^~~~~~~~ /usr/lib64/perl5/CORE/XSUB.h:149:34: note: in definition of macro ‘XS_EXTERNAL’ 149 | # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) | ^~~~ lib/SDL_perl.xs:147:6: note: previous declaration of ‘boot_SDL’ with type ‘void(void)’ 147 | void boot_SDL(); | ^~~~~~~~
I pushed a fix dist-git. But a t/sdlx_surface.t test crashes on on a division by zero: Program received signal SIGFPE, Arithmetic exception. 0x00007ffff6bd6e54 in _calc_offset (surface=surface@entry=0x555556333a60, x=0, y=<optimized out>) at lib/SDLx/Surface.xs:22 22 offset = (surface->pitch * y) / surface->format->BytesPerPixel; The crash is triggered by replacing SDL2-2.30.11-1.fc42 with sdl2-compat-0:2.32.50-2.fc43.
Minimized reproducer: With SDL2: $ SDL_VIDEODRIVER=dummy perl -Iblib/{lib,arch} -e 'use SDLx::Surface; print SDLx::Surface->new(width=>1, height=>1, greenmask => 0xFF000000)->[0][0]' 0 With SDL3: $ SDL_VIDEODRIVER=dummy perl -Iblib/{lib,arch} -e 'use SDLx::Surface; print SDLx::Surface->new(width=>1, height=>1, greenmask => 0xFF000000)->[0][0]' Floating point exception (core dumped) The important trigger is setting greenmask => 0xFF000000 when creating the SDLx surface. It seems surface format is not fully initialized: SLD3: p *surface->format $1 = {palette = 0x0, BitsPerPixel = 0 '\000', BytesPerPixel = 0 '\000', Rloss = 8 '\b', Gloss = 8 '\b', Bloss = 8 '\b', Aloss = 8 '\b', Rshift = 0 '\000', Gshift = 0 '\000', Bshift = 0 '\000', Ashift = 0 '\000', Rmask = 0, Gmask = 0, Bmask = 0, Amask = 0, colorkey = 0, alpha = 255 '\377'} SDL2: (gdb) p *surface->format $1 = {palette = 0x0, BitsPerPixel = 0 '\000', BytesPerPixel = 0 '\000', Rloss = 8 '\b', Gloss = 8 '\b', Bloss = 8 '\b', Aloss = 8 '\b', Rshift = 0 '\000', Gshift = 0 '\000', Bshift = 0 '\000', Ashift = 0 '\000', Rmask = 0, Gmask = 0, Bmask = 0, Amask = 0, colorkey = 0, alpha = 255 '\377'}
And a t/core_surface.t subtest fails with SDL3: ok 12 - An object of class 'SDL::PixelFormat' isa 'SDL::PixelFormat' not ok 13 - BitsPerPixel # Failed test ' BitsPerPixel' # at t/core_surface.t line 54. # got: '4' # expected: '8'