TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
581 stars 152 forks source link

Compile errors on Ubuntu 20.04 #654

Closed z0rti closed 3 years ago

z0rti commented 3 years ago

Tried to compile it for Ubuntu 20.04, but got errors:

tools/quake3/q3map2/light_ydnar.c: In function ‘FloodLightForSample’:
tools/quake3/q3map2/light_ydnar.c:4112:7: error: ‘lm’ undeclared (first use in this function); did you mean ‘tm’?
 4112 |   if( lm->styles[lightmapNum] != LS_NORMAL && lm->styles[lightmapNum] != LS_NONE ) // isStyleLight
      |       ^~
      |       tm
tools/quake3/q3map2/light_ydnar.c:4112:7: note: each undeclared identifier is reported only once for each function it appears in
tools/quake3/q3map2/light_ydnar.c:4112:18: error: ‘lightmapNum’ undeclared (first use in this function); did you mean ‘lightmapGamma’?
 4112 |   if( lm->styles[lightmapNum] != LS_NORMAL && lm->styles[lightmapNum] != LS_NONE ) // isStyleLight
      |                  ^~~~~~~~~~~
      |                  lightmapGamma
scons: *** [build/release/q3map2/tools/quake3/q3map2/light_ydnar.o] Error 1
scons: building terminated because of errors.
tkoeppe commented 3 years ago

I agree, that looks odd. @illwieckz, could you kindly take a look? #652 seems to be pasting code from a different fork (https://github.com/Garux/netradiant-custom/commit/1a614efce1f5384489324a6468fac8908492f5ba) that doesn't apply here?

illwieckz commented 3 years ago

Hmm, something weird happened with my workspace. Because of Python3 issue with Scons, I made some python fixes to be able to build the tree again (similar to #651 I haven't yet seen at the time), so basically I wanted to merge the commit above my Python3 branch, check the build, then cherry-pick the commit into a feature branch to ship it on master. It looks like at some point I did something wrong at some merge or cherry-picking step and in fact the branches I built did not included the commit…

Obviously the patch does not apply, I'm surprised it technically applied. In fact it looks like the part of floodlight code that is known to be broken is not yet merged to master so the fix does not apply yet.

@TTimo sorry for the noise then, it looks like the buggy code is not there yet and therefore can't be fixed. You may just revert 090fbf3d0ddd3472615f249d7215421fc67b313b.

:woman_facepalming: