quake2 icon indicating copy to clipboard operation
quake2 copied to clipboard

Crashes on catalina

Open benjaminselfridge opened this issue 4 years ago • 6 comments

Starts up okay, but when I try to start a new game it simply crashes. I'm on OS X Catalina. Single display, OpenGL driver.

benjaminselfridge avatar Sep 07 '20 21:09 benjaminselfridge

How did you compile it? I get error when i run Make src/client/input/sdl.c:30:10: fatal error: 'SDL2/SDL.h' file not found

kamleshgk avatar Nov 10 '20 15:11 kamleshgk

You'll need to install SDL2 via MacPorts or Homebrew.

jdolan avatar Nov 10 '20 15:11 jdolan

Hi @jdolan Do we need SDL2 or 1.2

I installed SDL2 via Brew - then added the path to INCLUDE in the MakeFile

ifeq ($(PLATFORM),darwin)
	CFLAGS += -D__APPLE__ -I/opt/local/include -I/usr/local/include/SDL2
endif

Then run the MakeFile and i get these and many other similar errors

src/linux/rw_sdl.c:166:7: error: use of undeclared identifier 'SDLK_KP9'; src/linux/rw_sdl.c:283:25: error: use of undeclared identifier 'SDL_FULLSCREEN' src/linux/rw_sdl.c:297:4: error: use of undeclared identifier 'SDL_GrabMode'

what could i be missing?
p.s Notice that Linux files are getting compiled even tho i go to 'Apple' folder and run Make. I even run Make in root folder, same.

kamleshgk avatar Nov 11 '20 09:11 kamleshgk

Yes, sorry, SDL 1.2. And yes, it will compile the Linux source files. Those files have some conditional directives for Apple. The Makefile is fairly straightforward. You’ll need sdl-config and curl-config on your PATH.

jdolan avatar Nov 11 '20 11:11 jdolan

Cool thanks @jdolan

I added the 1.2 version's "SDL.framework" file to /Library/Frameworks and added the path -I/Library/Frameworks/SDL.framework/Versions/A/Headers to CFLAGS and it compiled fine.

But am getting linker errors

Undefined symbols for architecture x86_64:
  "_SDL_CloseAudio", referenced from:
      _SNDDMA_Shutdown in snd_sdl.o
  "_SDL_CreateRGBSurface", referenced from:
      _SetSDLIcon in rw_sdl.o
  "_SDL_EnableKeyRepeat", referenced from:
      _SDLimp_InitGraphics in rw_sdl.o
  "_SDL_FreeSurface", referenced from:

Do i need to add the SDL lib in LDFLAGS variable? The SDL lib is found here /Library/Frameworks/SDL.framework/Versions/A/SDL

Thanks in advance.

kamleshgk avatar Nov 12 '20 16:11 kamleshgk

Yes, of course you need to also link against it. sdl-config --cflags and sdl-config --libs might help you here, too.

jdolan avatar Nov 12 '20 17:11 jdolan