Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to compile Quake II RTX
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
Strange_Attractor
n00b
n00b


Joined: 07 Mar 2011
Posts: 41
Location: Sweden

PostPosted: Fri Sep 24, 2021 4:52 pm    Post subject: Unable to compile Quake II RTX Reply with quote

I'm trying to compile Quake II RTX from the Github repository. But it fails with the following error message:

Code:
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:37:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   37 | void test_deflate       OF((Byte *compr, uLong comprLen));
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:38:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   38 | void test_inflate       OF((Byte *compr, uLong comprLen,
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:40:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   40 | void test_large_deflate OF((Byte *compr, uLong comprLen,
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:42:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   42 | void test_large_inflate OF((Byte *compr, uLong comprLen,
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:44:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   44 | void test_flush         OF((Byte *compr, uLong *comprLen));
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:45:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   45 | void test_sync          OF((Byte *compr, uLong comprLen,
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:47:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   47 | void test_dict_deflate  OF((Byte *compr, uLong comprLen));
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:48:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   48 | void test_dict_inflate  OF((Byte *compr, uLong comprLen,
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:50:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   50 | int  main               OF((int argc, char *argv[]));
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:80:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   80 | void test_compress      OF((Byte *compr, uLong comprLen,
      |                         ^~
/home/chris/Sources/Q2RTX/extern/zlib/test/example.c:82:25: fel: expected ”=”, ”,”, ”;”, ”asm” or ”__attribute__” before ”OF”
   82 | void test_gzio          OF((const char *fname,
      |                         ^~


Has anyone succedded in compiling the program?
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2070

PostPosted: Fri Sep 24, 2021 7:28 pm    Post subject: Reply with quote

I haven't tried but that's a common issue, e.g. like
https://github.com/gentoo/gentoo/blob/449d780/games-util/ucon64/files/ucon64-2.2.1-zlib.patch

Could probably do a similar fix, but that it's bundling these libraries seem more like the real issue.
Back to top
View user's profile Send private message
Strange_Attractor
n00b
n00b


Joined: 07 Mar 2011
Posts: 41
Location: Sweden

PostPosted: Tue Sep 28, 2021 8:49 pm    Post subject: Reply with quote

Ionen wrote:
I haven't tried but that's a common issue, e.g. like
https://github.com/gentoo/gentoo/blob/449d780/games-util/ucon64/files/ucon64-2.2.1-zlib.patch

Could probably do a similar fix, but that it's bundling these libraries seem more like the real issue.


Thanks for the feedback. I managed to get rid of some compiler errors by adding the suggested code segment, but the compilation still fails with the same error message for Q2RTX/extern/zlib/test/minigzip.c, even though i added the code to that file as well. Unfortunately I don't have the C programming skills required to proceed from here. :(
Back to top
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 170
Location: Edinburgh, UK

PostPosted: Mon Oct 04, 2021 7:51 pm    Post subject: Reply with quote

This patch was enough to get it working for me

That's for pointing out the fix for ucon64

Code:
diff --git a/test/example.c b/test/example.c
index eee17ce..401f5fa 100644
--- a/test/example.c
+++ b/test/example.c
@@ -26,6 +26,10 @@
     } \
 }
 
+#ifndef OF
+#define OF(x) x
+#endif
+
 static z_const char hello[] = "hello, hello!";
 /* "hello world" would be more standard, but the repeated "hello"
  * stresses the compression code better, sorry...
diff --git a/test/minigzip.c b/test/minigzip.c
index e22fb08..df246bd 100644
--- a/test/minigzip.c
+++ b/test/minigzip.c
@@ -63,6 +63,10 @@
 #endif
 #endif
 
+#ifndef OF
+#define OF(x) x
+#endif
+
 #if defined(UNDER_CE)
 #  include <windows.h>
 #  define perror(s) pwinerror(s)
Back to top
View user's profile Send private message
Strange_Attractor
n00b
n00b


Joined: 07 Mar 2011
Posts: 41
Location: Sweden

PostPosted: Sat Oct 09, 2021 8:37 am    Post subject: Reply with quote

FireBurn wrote:
This patch was enough to get it working for me

That's for pointing out the fix for ucon64

Code:
diff --git a/test/example.c b/test/example.c
index eee17ce..401f5fa 100644
--- a/test/example.c
+++ b/test/example.c
@@ -26,6 +26,10 @@
     } \
 }
 
+#ifndef OF
+#define OF(x) x
+#endif
+
 static z_const char hello[] = "hello, hello!";
 /* "hello world" would be more standard, but the repeated "hello"
  * stresses the compression code better, sorry...
diff --git a/test/minigzip.c b/test/minigzip.c
index e22fb08..df246bd 100644
--- a/test/minigzip.c
+++ b/test/minigzip.c
@@ -63,6 +63,10 @@
 #endif
 #endif
 
+#ifndef OF
+#define OF(x) x
+#endif
+
 #if defined(UNDER_CE)
 #  include <windows.h>
 #  define perror(s) pwinerror(s)


Thanks for the patch! It builds just fine after applying it.
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1772
Location: 127.0.0.1

PostPosted: Mon Oct 11, 2021 3:09 pm    Post subject: Reply with quote

I also hitted this error while building a random package from github.
Instead of patching, you can add to your CFLAGS on your command line :
Code:

$ CFLAGS='-DOF=_Z_OF' make


Explanation is in bug #383179, and in zlib ebuild.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum