Does the engine even build anymore?

(1/10) > >>

stigmha:
Hi

I have spent quite some time attempting to build the engine on various modern platforms with different results, and I would truly appreciate any help.

Background

I started off by being lazy and doing things the wrong way; skimming through the Wiki and by downloading a copy of the game engine source and the QVM's source. I quickly found the Visual Studio project in /misc/msvc/ioq3.sln and opened it in Visual Studio 2012 on a Windows 8 machine. It converted the project to VS12 format and I eventually managed to get the engine to build and run (I later got it to work in VS13 too). I made a few modifications to the engine with positive results, but problems arise once I started working on the source of the VMs in the VS12 project. I managed to compile them in to dlls and made the engine load them on launch, but I experienced multiple bugs. One being that every bot renamed to "scoreboard" and became a spectator immediately after connecting to the game. I delved into the code, found the source of the problem and decided to compare this file with its equivalent in the QVMs project; they were different. I realized that the QVM code in the engine's Visual Studio project are terrible outdated, and that the VS project (.sln file) is leftovers from ioquake3. I will suggest to remove it from the source of OA, as it is merely useless and leads to confusion.

I decided to do it the right way from now on and started to read your forums in detail.

Windows 7/8

I followed all your instructions on the Coding section of the DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/DeveloperFAQ#Coding]DeveloperFAQ; Installed MinGW with the specified packages, modified the cross-make-mingw.sh, and entered the engine's root directory in a "MinGW Shell" instance. I then ran "sh cross-make-mingw.sh". It compiled successfully, but the linker (LD) gives the following errors:

Code:

LD build/release-mingw32-x86/openarena.x86.exe
code/libs/win32/libcurl.a(strequal.o):strequal.c:(.text+0x14): undefined reference to 'strcasecmp'
code/libs/win32/libcurl.a(strequal.o):strequal.c:(.text+0x48): undefined reference to 'strncasecmp'
collect2.exe: error: ld returned 1 exit status

I spent almost a day Googling, reading and attempting to fix this issue with no luck. The only references I found to the functions strcasecmp and strncasecmp in the engine's source are the prototypes defined in /code/libcurl/curl/stdcheaders.h. So I disassembled libcurl.a and found a call to _strcasecmp in the function _curl_strequal and _strncasecmp in _curl_strnequal, none which are implemented in the libcurl.a itself. I have currently no clue on how to fix this, anyone?

OSX Mavericks (10.9.1)

I had already installed the latest version of XCode with the command line tools installed. There is a XCode project file available in the project's source but it also looks like some ioquake3 leftovers that haven't been modified to be compliant with OpenArena, so I ignored it. I yet again followed the Wiki and ran "make". Result:

Code:

error: unknown target CPU 'prescott'
>:(

I Googled it, found this in the Makefile: "OPTIMIZEVM += -march=prescott -mfpmath=sse" and changed prescott to native: "OPTIMIZEVM += -march=native -mfpmath=sse". So I ran make again and everything seemed to work until:

Code:

code/qcommon/vm_x86.c:86:23: error: initializer element is not a compile-time constant
static  int             ftolPtr = (int)qftol0F7F;



I played a bit in the code and Googled the error, but without any success. I honestly didn't gave it much effort as I was quite sick of these issues, I wanted to try Linux next. Any OSX gurus out there who know a quick fix?

Ubuntu 13.10

Yet again back to your wiki, and I made sure all dependencies in your list were installed before I tried to build it. I did find it a bit strange that your Wiki states libsdl2-dev when I knew OA uses SDL 1.2 and not SDL 2, but I decided to try anyways. "make" resulted in duplicate errors as code/SDL12/include/SDL_config_minimal.h declares typedef unsigned int size_t which is already declared in one of the includes. My quick fix was to comment out this line, but then I got compilation errors on unknown type size_t :o! So I decided to include the file stddef.h which worked and the compilation went well. The linker failed however badly complaining about the SDL calls which it couldn't find. I then installed SDL 1.2 ("sudo apt-get install libsdl1.2-dev"), tried again and it worked! I also reverted my changes to the SDL_config_minimal.h file and it worked. You should definitely fix the Wiki to say "libsdl1.2-dev" instead of "libsdl2-dev"!

--------------

Summary: any help on Windows and OSX is highly appreciated. I don't currently care for Solaris, but it's probably not a walk in the park there either. Thank you for your time.

Neon_Knight:
I have sent a PM to sago007, who knows about the code. He may help you.

grey matter:
On a sidenote, does the current ioquake3 source code build without problems on Windows with VisualStudio? Afaik the VS project files are not really being used.
All the other platforms should work fine with ioq3 as well. If you can confirm this, it might be easier to use ioq3 to fix oa's crufty codebase.

P.S.: ioq3 has a SDL2 branch.

Gig:
For building engine from OSX, you may send a PM to Jackoverfull, linking this thread. He created OSX executables.
But I don't know if he's also used to compiling QVM.

stigmha:
Quote from: Neon_Knight on January 16, 2014, 08:31:18 AM

I have sent a PM to sago007, who knows about the code. He may help you.


Thanks :D

Quote from: grey matter on January 16, 2014, 04:00:42 PM

On a sidenote, does the current ioquake3 source code build without problems on Windows with VisualStudio? Afaik the VS project files are not really being used.


Good idea, I cloned it and opened it in VisualStudio 2013 which converts it into a VS13 project. It did not build "out of the box" as the project contained old references to their renderer, which they now has separated into two subdirectories; renderergl1 and renderergl2. I honestly think the names says it all, but I replaced the references to the old renderer directory to renderergl2. Compilation went fine, but the linker is unhappy:

Code:

Error 261 error LNK2026: module unsafe for SAFESEH image. C:\~\ioq3\misc\msvc10\ftola.obj quake3
Error 262 error LNK2026: module unsafe for SAFESEH image. C:\~\ioq3\misc\msvc10\snapvector.obj quake3
Error 264 error LNK2005: _Com_Error already defined in common.obj C:\~\ioq3\misc\msvc10\tr_subs.obj quake3
Error 265 error LNK2005: _Com_Printf already defined in common.obj C:\~\ioq3\misc\msvc10\tr_subs.obj quake3
Error 267 error LNK1281: Unable to generate SAFESEH image. C:\~\ioq3\build\quake3_debug\ioquake3.x86.exe quake3



I checked LNK2026 at MSDN and it means: "/SAFESEH was specified, but a module was not compatible with the safe exception handling feature. If you want to use this module with /SAFESEH, then you will need to recompile the module using the Visual C++ .NET 2003 (or later) compiler.". Not so weird as it is programmed in C with the project set to use the C compiler (/TC flag), and not the Visual C++ compiler. I disabled /SAFESEH by opening the quake3 project's Property Pages then expanded Configuration Properties->Linker->Advanced and changed "Image Has Safe Exception Handlers" to "No (/SAFESEH:NO)". I rebuilt it and that specific error was gone. LNK2005 remained, but I also got tons of linking errors from the rendering system  :RIP:. So I included the files in renderecommon to the project. It gave me the same errors. I removed all the renderer files from the project, and tried the renderegl1 instead combined with the renderecommon files. It fixed the rendering linker errors. LNK2005 next.

Both Com_Error's and Com_Printf's prototypes are defined in qshared.h, while the implementations are defined the following places:
cg_main.c l.441 (client)g_main.c l.540 (server)ui_atoms.c l.33 (user interface)tr_subs.c l.38 (renderer)common.c l.260 (engine)
The line numbers points to the Com_Error functions with the Com_Printf's right above. I commented out the one in the renderer as it leads to a duplicate in the engine. Clean, rebuild, and 318 warnings later; success! I then tried to run it setting "Command Arguments" to "+set fs_basepath "C:\Program Files (x86)\openarena-0.8.8\"". I also made sure to change the Linker settings to display the console, so I could see the program output ("Property Pages"->"Configuration Properties"->"Linker"->"System": set "SubSystem" to "Console (/SUBSYSTEM:CONSOLE)"). I got the following pop-up:

Code:

---------------------------
Error
---------------------------
"pak0.pk3" is missing. Please copy it from your legitimate Q3 CDROM. Point Release files are missing. Please re-install the 1.32 point release. Also check that your ioq3 executable is in the correct place and that every file in the "baseq3" directory is present and readable. Copy console log to clipboard?
---------------------------
Ja   Nei  
---------------------------


Console says "0 files in pk3 files". I obviously have to change the "baseoa" directorie's name to "baseq3". New attempt, "computer says no":

Code:

**************************************************
WARNING: baseq3/pak0.pk3 is present but its checksum (3235491247)
is not correct. Please re-copy pak0.pk3 from your
legitimate Q3 CDROM.
**************************************************

I patched this by commenting out the function calls to FS_CheckPak0() at line 3901 and 3936 in files.c. Game launched and worked well with OpenArena! :D But I am not sure whether I'll continue with ioquake3 as the engine since it worked just as well With Visual Studio using OA's engine. I haven't tested it on any other platforms yet, but I honestly want the OA MinGW procedure to work as it is the "proper" OA way of doing it.

Quote from: Gig on January 17, 2014, 02:03:04 AM

For building engine from OSX, you may send a PM to Jackoverfull, linking this thread. He created OSX executables.


Thanks, PM has been sent. :) I might experiment using ioquake3's Makefiles to see if I can get it to work in OA as well.

Quote from: Gig on January 17, 2014, 02:03:04 AM

But I don't know if he's also used to compiling QVM.


I haven't really focused on compiling the QVMs yet, but I have successfully managed to compile the QVMs on both Windows and Linux using the provided scripts in the QVM projects. OSX complains: Unknown target CPU 'prescott', which I guess I can fix the same way as with the engine. But my first priority is to get the engine to compile as the QVMs are portable.

FYI: Linux seems to compile the QVMs as dynamic libraries (*.so) rather than QVMs (*.qvm).

Navigation

[0] Message Index

[#] Next page