Issues compiling archived SRB2 versions

HitCoder

Launcher Blaster
Hello,

Sorry for the extremely obscure post and I'm additionally sorry if this is in the wrong section (wasn't really sure where to go, mods feel free to move this).

I've been intending to implement a profiles feature into LauncherBlast2, and I want to do something similar to Minecraft with regards to allowing users to add installations of older versions of SRB2 too.

Obviously this isn't a huge issue in itself, especially for Windows. But for support for Linux and potentially Mac as well, I'd be interested in compiling native binaries for the older versions of the game. Obviously WINE is an option, but I figured I'd try my hand at compiling native binaries.

The version I tried this on was Final Demo 1094 (partly because it has a lot of nostalgia for me as it was my first version I played before I even played online), and I ran into a few issues that I fixed, but I've seemingly hit a dead end. The error I'm currently getting while compiling is as follows:
CLI output:
undefined reference to `FixedMul'
This doesn't just happen for FixedMul, it includes some other functions, and it happens in several other files. Upon looking into it it looks like a linux-specific issue for the doom engine but it seems to be a bug that was patched later down the line that wasn't originally patched in this version of the game(?)

I'm wondering if there would be a possible quick fix that would keep netgame compatibility in-tact if possible? It's fine if nobody knows how to really help, but as I said, it'd be interesting and additionally improve performance overall and just be preferable as it eliminated the dependency on WINE.

In addition to this I seemingly have to use NOASM=1 due to assembly code issues, (despite nasm and nasm32 being installed), specify to the compiler to compile in 32bit (which makes sense anyway as it's an older version, in addition to 64 and i86/x32 not being cross compatible netplay-wise back then).

Lastly I don't even know whether this works as I've not gotten the game to compile yet, so don't know if it will lead to issues in the long-run, but the compiler really doesn't like Z_BEST_COMPRESSION and suggests PNG_Z_DEFAULT_COMPRESSION, which for now is what I switched it to.

I'm half expecting nobody can help me with this issue but I figured it would be worth a try asking.

Thanks in advance to anyone who wishes to join my endeavour haha.
 
I don't have a solution for this, unfortunately. I also ran into compiler error on the Raspberry Pi compiling m_perfstats.c:

make: *** [Makefile:396: ../make/linux/SDL/objs/./m_perfstats.o] Error 1

make error:
m_perfstats.c: In function ‘M_DrawRenderStats’:
m_perfstats.c:169:35: error: ‘ps_hw_skyboxtime’ undeclared (first use in this function)
  169 |   {"skybox ", "Skybox render: ", &ps_hw_skyboxtime},
      |                                   ^~~~~~~~~~~~~~~~
m_perfstats.c:169:35: note: each undeclared identifier is reported only once for                                      each function it appears in
m_perfstats.c:169:3: warning: missing initializer for field ‘value’ of ‘perfstat                                     row_t’ {aka ‘struct perfstatrow’} [-Wmissing-field-initializers]
  169 |   {"skybox ", "Skybox render: ", &ps_hw_skyboxtime},
      |   ^
m_perfstats.c:41:15: note: ‘value’ declared here
   41 |  void       * value;
      |               ^~~~~
m_perfstats.c:171:35: error: ‘ps_hw_nodesorttime’ undeclared (first use in this                                      function)
  171 |   {"nodesrt", "Drwnode sort:  ", &ps_hw_nodesorttime},
      |                                   ^~~~~~~~~~~~~~~~~~
m_perfstats.c:171:3: warning: missing initializer for field ‘value’ of ‘perfstat                                     row_t’ {aka ‘struct perfstatrow’} [-Wmissing-field-initializers]
  171 |   {"nodesrt", "Drwnode sort:  ", &ps_hw_nodesorttime},
      |   ^
m_perfstats.c:41:15: note: ‘value’ declared here
   41 |  void       * value;
      |               ^~~~~
m_perfstats.c:172:35: error: ‘ps_hw_nodedrawtime’ undeclared (first use in this                                      function)
  172 |   {"nodedrw", "Drwnode render:", &ps_hw_nodedrawtime},
      |                                   ^~~~~~~~~~~~~~~~~~
m_perfstats.c:172:3: warning: missing initializer for field ‘value’ of ‘perfstat                                     row_t’ {aka ‘struct perfstatrow’} [-Wmissing-field-initializers]
  172 |   {"nodedrw", "Drwnode render:", &ps_hw_nodedrawtime},
      |   ^
m_perfstats.c:41:15: note: ‘value’ declared here
   41 |  void       * value;
      |               ^~~~~
m_perfstats.c:173:35: error: ‘ps_hw_spritesorttime’ undeclared (first use in thi                                     s function); did you mean ‘ps_sw_spritecliptime’?
  173 |   {"sprsort", "Sprite sort:   ", &ps_hw_spritesorttime},
      |                                   ^~~~~~~~~~~~~~~~~~~~
      |                                   ps_sw_spritecliptime
m_perfstats.c:173:3: warning: missing initializer for field ‘value’ of ‘perfstat                                     row_t’ {aka ‘struct perfstatrow’} [-Wmissing-field-initializers]
  173 |   {"sprsort", "Sprite sort:   ", &ps_hw_spritesorttime},
      |   ^
m_perfstats.c:41:15: note: ‘value’ declared here
   41 |  void       * value;
      |               ^~~~~
m_perfstats.c:174:35: error: ‘ps_hw_spritedrawtime’ undeclared (first use in thi                                     s function); did you mean ‘ps_sw_spritecliptime’?
  174 |   {"sprdraw", "Sprite render: ", &ps_hw_spritedrawtime},
      |                                   ^~~~~~~~~~~~~~~~~~~~
      |                                   ps_sw_spritecliptime
m_perfstats.c:174:3: warning: missing initializer for field ‘value’ of ‘perfstat                                     row_t’ {aka ‘struct perfstatrow’} [-Wmissing-field-initializers]
  174 |   {"sprdraw", "Sprite render: ", &ps_hw_spritedrawtime},
      |   ^
m_perfstats.c:41:15: note: ‘value’ declared here
   41 |  void       * value;
      |               ^~~~~
-- r_things.c ...
m_perfstats.c:209:33: error: ‘ps_hw_batchsorttime’ undeclared (first use in this                                      function)
  209 |   {"batsort", "Batch sort:  ", &ps_hw_batchsorttime},
      |                                 ^~~~~~~~~~~~~~~~~~~
m_perfstats.c:210:33: error: ‘ps_hw_batchdrawtime’ undeclared (first use in this                                      function)
  210 |   {"batdraw", "Batch render:", &ps_hw_batchdrawtime},
      |                                 ^~~~~~~~~~~~~~~~~~~
m_perfstats.c:215:31: error: ‘ps_hw_numpolys’ undeclared (first use in this func                                     tion)
  215 |   {"polygon", "Polygons:  ", &ps_hw_numpolys},
      |                               ^~~~~~~~~~~~~~
m_perfstats.c:216:31: error: ‘ps_hw_numverts’ undeclared (first use in this func                                     tion)
  216 |   {"vertex ", "Vertices:  ", &ps_hw_numverts},
      |                               ^~~~~~~~~~~~~~
m_perfstats.c:221:31: error: ‘ps_hw_numcalls’ undeclared (first use in this func                                     tion)
  221 |   {"drwcall", "Draw calls:", &ps_hw_numcalls},
      |                               ^~~~~~~~~~~~~~
m_perfstats.c:222:31: error: ‘ps_hw_numshaders’ undeclared (first use in this fu                                     nction)
  222 |   {"shaders", "Shaders:   ", &ps_hw_numshaders},
      |                               ^~~~~~~~~~~~~~~~
m_perfstats.c:223:31: error: ‘ps_hw_numtextures’ undeclared (first use in this f                                     unction); did you mean ‘numtextures’?
  223 |   {"texture", "Textures:  ", &ps_hw_numtextures},
      |                               ^~~~~~~~~~~~~~~~~
      |                               numtextures
m_perfstats.c:224:31: error: ‘ps_hw_numpolyflags’ undeclared (first use in this                                      function)
  224 |   {"polyflg", "Polyflags: ", &ps_hw_numpolyflags},
      |                               ^~~~~~~~~~~~~~~~~~
m_perfstats.c:225:31: error: ‘ps_hw_numcolors’ undeclared (first use in this fun                                     ction)
  225 |   {"colors ", "Colors:    ", &ps_hw_numcolors},
      |                               ^~~~~~~~~~~~~~~
m_perfstats.c:243:20: warning: unused variable ‘batchcalls_col’ [-Wunused-variab                                     le]
  243 |  perfstatcol_t     batchcalls_col = {220, 200, V_PURPLEMAP,     batchcal                                     ls_row};
      |                    ^~~~~~~~~~~~~~
m_perfstats.c:242:20: warning: unused variable ‘batchcount_col’ [-Wunused-variab                                     le]
  242 |  perfstatcol_t     batchcount_col = {155, 200, V_PURPLEMAP,     batchcou                                     nt_row};
      |                    ^~~~~~~~~~~~~~
m_perfstats.c:240:21: warning: unused variable ‘batchtime_col’ [-Wunused-variabl                                     e]
  240 |  perfstatcol_t      batchtime_col =  {90, 115, V_REDMAP,         batchti                                     me_row};
      |                     ^~~~~~~~~~~~~
m_perfstats.c:232:20: warning: unused variable ‘opengltime_col’ [-Wunused-variab                                     le]
  232 |  perfstatcol_t     opengltime_col =  {24,  24, V_YELLOWMAP,     openglti                                     me_row};
      |       

make: *** [Makefile:396: ../make/linux/SDL/objs/./m_perfstats.o] Error 1
 
Yeah it's a little irritating.
I was considering compiling on some old linux distro to see what I could achieve but even when I tried compiling with gcc 4.3 I got issues/the same problem. I can't remember what it was off the top of my head.

worst case scenario I'll use WINE but ehhhh. I don't think anyone will be able to help as versions that old are no longer supported and tbh I wonder if anyone even compiled it on linux back then, to a point that maybe there's fundamental issues with the source code with regards to linux compatibility...
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top