Ioquake3 compile error

I have been attempting to compile ioquake3 but have gotten the same error every time. I have followed the instructions provided by the wiki to compile with msys2. Any insight you could provide would be much appreciated.

Console Output
$ make ARCH=x86_64 BUILD_STANDALONE=1
make[1]: Entering directory '/c/ioq3'

Building in build/release-msys-x86_64:
PLATFORM: msys
ARCH: x86_64
VERSION: 1.36_GIT_f2c61c14-2020-02-11
COMPILE_PLATFORM: msys
COMPILE_ARCH: x86_64
HAVE_VM_COMPILED:
PKG_CONFIG: pkg-config
CC: cc

CFLAGS:
-DNO_VM_COMPILED -DNO_GZIP -Icode/zlib -DUSE_INTERNAL_JPEG -Icode/jpeg-8c -DUSE_LOCAL_HEADERS -DSTANDALONE -DPRODUCT_VERSION="1.36_GIT_f2c61c14-2020-02-11" -Wformat=2 -Wno-format-zero-length -Wformat-security -Wno-format-nonliteral -Wstrict-aliasing=2
-Wmissing-format-attribute -Wdisabled-optimization -Werror-implicit-function-declaration -MMD -DNDEBUG -O3

CLIENT_CFLAGS:
-DUSE_OPENAL -DUSE_OPENAL_DLOPEN -DUSE_CURL -DUSE_CURL_DLOPEN -DUSE_VOIP -DUSE_CODEC_OPUS -DOPUS_BUILD -DHAVE_LRINTF -DFLOATING_POINT -DFLOAT_APPROX -DUSE_ALLOCA -Icode/opus-1.2.1/include -Icode/opus-1.2.1/celt -Icode/opus-1.2.1/silk -Icode/opus-1.2.1/silk/float
-Icode/opusfile-0.9/include -DUSE_CODEC_VORBIS -Icode/libvorbis-1.3.6/include -Icode/libvorbis-1.3.6/lib -Icode/libogg-1.3.3/include -DUSE_RENDERER_DLOPEN -DUSE_MUMBLE

SERVER_CFLAGS:
-DUSE_VOIP

LDFLAGS:


LIBS:


CLIENT_LIBS:


AUTOUPDATER_LIBS:


Output:
ioq3ded.x86_64
ioquake3.x86_64
renderer_opengl1_x86_64.so
renderer_opengl2_x86_64.so
baseq3/cgamex86_64.so
baseq3/qagamex86_64.so
baseq3/uix86_64.so
missionpack/cgamex86_64.so
missionpack/qagamex86_64.so
missionpack/uix86_64.so

make[2]: Entering directory '/c/ioq3'
DED_CC code/server/sv_bot.c
make[2]: cc: No such file or directory
make[2]: *** [Makefile:2749: build/release-msys-x86_64/ded/sv_bot.o] Error 127
make[2]: Leaving directory '/c/ioq3'
make[1]: *** [Makefile:1400: targets] Error 2
make[1]: Leaving directory '/c/ioq3'
make: *** [Makefile:1316: release] Error 2

I’ve personally never build ioquake3 with MSYS2 but it seems ioquake3 doesn’t handle platform msys. You can manually specify to build with mingw (ignore the 32, mingw-w64 can still build x86_64).

Try:

make ARCH=x86_64 BUILD_STANDALONE=1 PLATFORM=mingw32 COMPILE_PLATFORM=mingw32

I have found the solution to by problem (turns out I had just forgotten to install gcc), however I now face a new error.

Console Output
make[1]: Entering directory '/d/documents/documents/games/urban terror modding/ioq3'

Building in build/release-mingw64-x86_64:
PLATFORM: mingw64
ARCH: x86_64
VERSION: 1.36_GIT_f2c61c14-2020-02-11
COMPILE_PLATFORM: mingw64
COMPILE_ARCH: x86_64
HAVE_VM_COMPILED: true
PKG_CONFIG: pkg-config
CC: cc

CFLAGS:
-Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -DUSE_ICON -DWINVER=0x501 -m64 -DNO_GZIP -Icode/zlib -DUSE_INTERNAL_JPEG -Icode/jpeg-8c -DUSE_LOCAL_HEADERS -DSTANDALONE -DPRODUCT_VERSION="1.36_GIT_f2c61c14-2020-02-11" -Wformat=2
-Wno-format-zero-length -Wformat-security -Wno-format-nonliteral -Wstrict-aliasing=2 -Wmissing-format-attribute -Wdisabled-optimization -Werror-implicit-function-declaration -MMD -DNDEBUG -O3 -ffast-math

CLIENT_CFLAGS:
-DCURL_STATICLIB -Icode/SDL2/include -DUSE_OPENAL -DUSE_OPENAL_DLOPEN -DUSE_CURL -DUSE_VOIP -DUSE_CODEC_OPUS -DOPUS_BUILD -DHAVE_LRINTF -DFLOATING_POINT -DFLOAT_APPROX -DUSE_ALLOCA -Icode/opus-1.2.1/include -Icode/opus-1.2.1/celt -Icode/opus-1.2.1/silk
-Icode/opus-1.2.1/silk/float -Icode/opusfile-0.9/include -DUSE_CODEC_VORBIS -Icode/libvorbis-1.3.6/include -Icode/libvorbis-1.3.6/lib -Icode/libogg-1.3.3/include -DUSE_RENDERER_DLOPEN -DUSE_MUMBLE

SERVER_CFLAGS:
-DUSE_VOIP

LDFLAGS:


LIBS:
-lws2_32 -lwinmm -lpsapi

CLIENT_LIBS:
-lgdi32 -lole32 code/libs/win64/libcurl.a -lcrypt32 -lmingw32 code/libs/win64/libSDL264main.a code/libs/win64/libSDL264.dll.a

AUTOUPDATER_LIBS:
-lwininet

Output:
ioq3ded.x86_64.exe
ioquake3.x86_64.exe
renderer_opengl1_x86_64.dll
renderer_opengl2_x86_64.dll
baseq3/cgamex86_64.dll
baseq3/qagamex86_64.dll
baseq3/uix86_64.dll
missionpack/cgamex86_64.dll
missionpack/qagamex86_64.dll
missionpack/uix86_64.dll
baseq3/vm/cgame.qvm
baseq3/vm/qagame.qvm
baseq3/vm/ui.qvm
missionpack/vm/cgame.qvm
missionpack/vm/qagame.qvm
missionpack/vm/ui.qvm
SDL264.dll

make[2]: Entering directory '/d/documents/documents/games/urban terror modding/ioq3'
DED_CC code/server/sv_bot.c
In file included from code/server/../qcommon/q_shared.h:195,
             from code/server/server.h:24,
             from code/server/sv_bot.c:24:
code/server/../qcommon/q_platform.h:305:2: error: #error "Operating system not supported"
305 | #error "Operating system not supported"
  |  ^~~~~
code/server/../qcommon/q_platform.h:309:2: error: #error "Architecture not supported"
309 | #error "Architecture not supported"
  |  ^~~~~
code/server/../qcommon/q_platform.h:313:2: error: #error "ID_INLINE not defined"
313 | #error "ID_INLINE not defined"
  |  ^~~~~
code/server/../qcommon/q_platform.h:317:2: error: #error "PATH_SEP not defined"
317 | #error "PATH_SEP not defined"
  |  ^~~~~
code/server/../qcommon/q_platform.h:321:2: error: #error "DLL_EXT not defined"
321 | #error "DLL_EXT not defined"
  |  ^~~~~
code/server/../qcommon/q_platform.h:366:2: error: #error "Endianness not defined"
366 | #error "Endianness not defined"
  |  ^~~~~
In file included from code/server/server.h:24,
             from code/server/sv_bot.c:24:
code/server/../qcommon/q_shared.h:604:17: error: expected ‘;’ before ‘int’
604 | static ID_INLINE int VectorCompare( const vec3_t v1, const vec3_t v2 ) {
  |                 ^~~~
  |                 ;
code/server/../qcommon/q_shared.h:611:8: error: unknown type name ‘ID_INLINE’
611 | static ID_INLINE vec_t VectorLength( const vec3_t v ) {
  |        ^~~~~~~~~
code/server/../qcommon/q_shared.h:611:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘VectorLength’
611 | static ID_INLINE vec_t VectorLength( const vec3_t v ) {
  |                        ^~~~~~~~~~~~
code/server/../qcommon/q_shared.h:615:8: error: unknown type name ‘ID_INLINE’
615 | static ID_INLINE vec_t VectorLengthSquared( const vec3_t v ) {
  |        ^~~~~~~~~
code/server/../qcommon/q_shared.h:615:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘VectorLengthSquared’
615 | static ID_INLINE vec_t VectorLengthSquared( const vec3_t v ) {
  |                        ^~~~~~~~~~~~~~~~~~~
code/server/../qcommon/q_shared.h:619:8: error: unknown type name ‘ID_INLINE’
619 | static ID_INLINE vec_t Distance( const vec3_t p1, const vec3_t p2 ) {
  |        ^~~~~~~~~
code/server/../qcommon/q_shared.h:619:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Distance’
619 | static ID_INLINE vec_t Distance( const vec3_t p1, const vec3_t p2 ) {
  |                        ^~~~~~~~
code/server/../qcommon/q_shared.h:626:8: error: unknown type name ‘ID_INLINE’
626 | static ID_INLINE vec_t DistanceSquared( const vec3_t p1, const vec3_t p2 ) {
  |        ^~~~~~~~~
code/server/../qcommon/q_shared.h:626:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘DistanceSquared’
626 | static ID_INLINE vec_t DistanceSquared( const vec3_t p1, const vec3_t p2 ) {
  |                        ^~~~~~~~~~~~~~~
code/server/../qcommon/q_shared.h:635:17: error: expected ‘;’ before ‘void’
635 | static ID_INLINE void VectorNormalizeFast( vec3_t v )
  |                 ^~~~~
  |                 ;
code/server/../qcommon/q_shared.h:646:17: error: expected ‘;’ before ‘void’
646 | static ID_INLINE void VectorInverse( vec3_t v ){
  |                 ^~~~~
  |                 ;
code/server/../qcommon/q_shared.h:652:17: error: expected ‘;’ before ‘void’
652 | static ID_INLINE void CrossProduct( const vec3_t v1, const vec3_t v2, vec3_t cross ) {
  |                 ^~~~~
  |                 ;
In file included from code/server/server.h:25,
             from code/server/sv_bot.c:24:
code/server/../qcommon/qcommon.h:377:17: error: expected ‘;’ before ‘float’
377 | static ID_INLINE float _vmf(intptr_t x)
  |                 ^~~~~~
  |                 ;
make[2]: *** [Makefile:2749: build/release-mingw64-x86_64/ded/sv_bot.o] Error 1
make[2]: Leaving directory '/d/documents/documents/games/urban terror modding/ioq3'
make[1]: *** [Makefile:1400: targets] Error 2
make[1]: Leaving directory '/d/documents/documents/games/urban terror modding/ioq3'
make: *** [Makefile:1316: release] Error 2

From what I can figure out, the first few errors are caused by undefined variables in q_platform.h. As I am unfamiliar with the code I have no idea where these variables would be defined. As before, any insight you could provide would be greatly appreciated.

_WIN32 should be defined by mingw-w64’s gcc so q_platform.h can define the operating system, ID_INLINE, etc. _WIN32 isn’t defined so the errors occur. Aside from maybe installing the wrong gcc(?) I’ve no idea what’s happened.

I installed the wrong gcc. For some reason when I tried to build with the msys2.exe the mingw gcc wasn’t recognized. Using the mingw64.exe does work however. Who would have thought? Thanks for the help though, not sure I would have figured it out on my own.

1 Like