SDL1 fallback support?

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
User avatar
Raziel
ScummVM Porter
Posts: 1522
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

SDL1 fallback support?

Post by Raziel »

If i'm not mistaken ScummVM still supports SDL1 as fallback.

If yes, how could i fix the only linker error i get when trying to build with SDL1...this one

Code: Select all

    LINK     scummvm
backends/platform/sdl/sdl.o: In function `OSystem_SDL::setupGraphicsModes()':
backends/platform/sdl/sdl.cpp:721: undefined reference to `SdlAudioCDManager::SdlAudioCDManager()'
gmake: *** [scummvm] Error 1
I know it worked before, but i have to admit i haven't tried to build it with SDL1 for at least a year

Thank you
User avatar
criezy
ScummVM Developer
Posts: 950
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: SDL1 fallback support?

Post by criezy »

I just tried compiling with SDL 1.2.15 on macOS, and it still compiles without errors for me. The SdlAudioCDManager code is only compiled in when using SDL 1.2 (not with SDL 2). Maybe somehow the way you compiled ScummVM it did no pick it up?
User avatar
Raziel
ScummVM Porter
Posts: 1522
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Re: SDL1 fallback support?

Post by Raziel »

Strange, the compiling process is completely the same with sdl2, going through configure first.

Maybe my SDL1 installation broke in the meantime?

Thank you for the pointer
User avatar
Raziel
ScummVM Porter
Posts: 1522
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Re: SDL1 fallback support?

Post by Raziel »

There is something fishy in the configure process.
Even after a "clean" and deleting the (very old) sdl-audiocd.o in backends/audiocd/sdl/ it's not being picked up (no object file created)

Looking at module.mk in backends i see it mention sdl-audiocd.o but it won't get build, strange

Code: Select all

# SDL 2 removed audio CD support
ifndef USE_SDL2
MODULE_OBJS += \
	audiocd/sdl/sdl-audiocd.o
endif
I guess it's the "ifndef" that is failing, i have a correct "USE_SDL2 = 0" in config.mk, but since this is the ONLY "ifndef" in the whole module.mk i blame this to be the problem (and most certainly something that fails on my system)

I'm going to add it manually to module.mk and see if it works that way
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: SDL1 fallback support?

Post by Praetorian »

Raziel wrote: Sun Feb 17, 2019 1:36 pm There is something fishy in the configure process.
Even after a "clean" and deleting the (very old) sdl-audiocd.o in backends/audiocd/sdl/ it's not being picked up (no object file created)

Looking at module.mk in backends i see it mention sdl-audiocd.o but it won't get build, strange

Code: Select all

# SDL 2 removed audio CD support
ifndef USE_SDL2
MODULE_OBJS += \
	audiocd/sdl/sdl-audiocd.o
endif
I guess it's the "ifndef" that is failing, i have a correct "USE_SDL2 = 0" in config.mk, but since this is the ONLY "ifndef" in the whole module.mk i blame this to be the problem (and most certainly something that fails on my system)

I'm going to add it manually to module.mk and see if it works that way
Maybe I'm wrong but shouldn't the USE_SDL2 be entirely undefined for your case? As in be commented out in the config.mk or not exist at all there?
"USE_SDL2 = 0" still defines it and so "#ifndef USE_SDL2" would still evaluate to false
User avatar
Raziel
ScummVM Porter
Posts: 1522
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Re: SDL1 fallback support?

Post by Raziel »

I get that and tried a different approach by commenting out the whole USE_SDL2 loop and adding sdl-audiocd manually with the same result...or rather with still getting the error while linking, but this time with undefinded references to default-audiocd...no matter if i keep default-audiocd in place or by removing it as well.

I guess i have to try something else, it seems it's still picking up SDL2 somewhere in the process

Edit: It was (again) a faulty checkout. Redoing a fresh checkout makes sdl1 work (if i change the sdl-config line in configure
Post Reply