matatk / agrip

AGRIP AudioQuake and Level Description Language (LDL)
http://agrip.org.uk
Other
16 stars 6 forks source link

Cannot compile zquake on Mavericks #20

Closed matatk closed 10 years ago

matatk commented 10 years ago

Compilation fails, with all sorts of areas that appear to be regarding string handling functions.

Installing GCC via homebrew appears to fix this, but I am not sure if the string-handling problems encountered in the gamecode compiler will then surface.

matatk commented 10 years ago

So far this is the only article I've found that may be of any use: http://www.jasonamyers.com/mavericks-clang/ -- looks like a good place to start; thanks to the author!

matatk commented 10 years ago

The problems found in ZQCC persist here; it crashes on startup in Info_RemoveKey (not sure exactly where).

https://github.com/matatk/agrip/blob/master/audioquake/zq-repo/zquake/source/common.c#L1118

matatk commented 10 years ago

It seems that the runtime on Mavericks checks for potentially(?) overlapping strings; whilst it would be good to re-code to avoid this, the effort is too great and the code has been working fine for many years without, so the immediate fix to get out of this situation appears to be to find a way to turn off this checking, as hinted at in the following bash bug report: https://github.com/Homebrew/homebrew/issues/23470

Now trying to work out how to do this...

matatk commented 10 years ago

Have found, from this homebrew pull request that passing -D_FORTIFY_SOURCE=0 to the compiler will fix this particular issue -- BUT it then crashes elsewhere, so I am leaving this open for now...

matatk commented 10 years ago

The latest problem was a graphics-related crash and appears to be down to a bug in Mavericks, according to this bug report: http://trac.wildfiregames.com/ticket/2272

I have temporarily removed that call to setting the gamma ramp and zquake-glsdl compiles and runs on Mavericks, with the gcc Clang frontend and -D_FORTIFY_SOURCE=0 -- let's hope that's the last of the Mavericks-induced troubles.