[Ohrrpgce] Broken Linux build

Ralph Versteegen teeemcee at gmail.com
Wed Nov 25 19:03:07 PST 2020


Yes, it's because the linux VMs have an old FB version with out of date
headers. More recent FB have (still out of date) headers for SDL 2.0.6.

SDL_GameControllerFromInstanceID was added in SDL 2.0.4 and
SDL_JoystickGetDeviceInstanceID in 2.0.6. I can do without those
Now, what I had forgotten was that gfx_sdl2.bas doesn't require SDL 2.0.5,
it uses ifdefs to support older versions. Our .debs (since a few days ago)
currently list sdl 2.0.5 as a dependency, although it turns out it's
actually some earlier version.

I can easily avoid SDL_JoystickGetDeviceInstanceID to keep the requirement
at 2.0.5 or below.
SDL 2.0.5 was released Oct 2016 and SDL2.0.6 was released Sept 2017. Three
years ago is too recent for my taste, even four years is, when we otherwise
support ~9 year old Linux systems. Ideally I'd like to do runtime linking
to either SDL 1.2 or SDL 2 so we can put gfx/music_sdl and gfx/music_sdl2
in the same build. I already started on it.

2.0.5 added SDL_SetWindowResizable. Many nice things in 2.0.6, notably
non-power-of-two audio resampling (so eg 48kHz oggs will play correctly).

On Tue, 24 Nov 2020 at 10:30, James Paige <Bob at hamsterrepublic.com> wrote:

> Looks like recent changes to the gamepad support broke compiling in Linux.
>
> Seems to have started with commit:
>
> gfx_sdl2: Use SDL's GameController API to read fixed-meaning buttons/axes
> if possible
>
> (svn revision 12079)
>
> gfx_sdl2.bas(985) error 41: Variable not declared,
> SDL_JoystickGetDeviceInstanceID in
> 'SDL_JoystickGetDeviceInstanceID(evnt.jdevice.which) & " " &
> SDL_JoystickNameForIndex(evnt.jdevice.which)'
> /home/james/src/nightly/ohrrpgce-build/wip/gfx_sdl_common.bas(239) error
> 41: Variable not declared, SDL_GameControllerFromInstanceID in 'DIM
> controller as SDL_GameController ptr =
> SDL_GameControllerFromInstanceID(state->info->instance_id)'
> scons: *** [build/game-gfx_sdl2.o] Error 1
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20201126/a8db482d/attachment.html>


More information about the Ohrrpgce mailing list