Author Topic: Compile Errors  (Read 14397 times)

Noyesdude

  • Posts: 44
  • Turrets: +2/-1
Compile Errors
« on: May 29, 2012, 07:36:09 am »
I'm using make in windows with minGW32 and I've got no idea whats going on with this >.<  This is the whole section after I type in make.

Code: [Select]
make -C src/tools/lcc install
make[1]: Entering directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/lcc'
install -s -m 0755 build-mingw32-x86/q3lcc.exe ../
install -s -m 0755 build-mingw32-x86/q3cpp.exe ../
install -s -m 0755 build-mingw32-x86/q3rcc.exe ../
make[1]: Leaving directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/lcc'
make -C src/tools/asm install
make[1]: Entering directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/asm'
gcc -O2 -Wall -Werror -fno-strict-aliasing -o q3asm q3asm.c cmdlib.c
q3asm.c: In function 'TryAssembleENDPROC':
q3asm.c:959:10: error: variable 'v2' set but not used [-Werror=unused-but-set-va
riable]
q3asm.c:959:7: error: variable 'v' set but not used [-Werror=unused-but-set-vari
able]
cc1.exe: all warnings being treated as errors

cmdlib.c: In function 'ExpandPath':
cmdlib.c:316:6: error: the address of 'qdir' will always evaluate as 'true' [-We
rror=address]
cmdlib.c: In function 'ExpandGamePath':
cmdlib.c:329:6: error: the address of 'qdir' will always evaluate as 'true' [-We
rror=address]
cc1.exe: all warnings being treated as errors

If anything else is needed I'll supply it as soon as I can

Thanks in advance
   Noyesdude
Co-creater of the Pbot installation guide(http://xserverx.com/forum/viewtopic.php?f=44&t=2352) on XserverX, and Tremulous player. and btw its No-yes-dude :D

/dev/humancontroller

  • Posts: 1033
  • Turrets: +1002/-383
Re: Compile Errors
« Reply #1 on: May 29, 2012, 08:02:49 am »
I'm using make in windows with minGW32 and I've got no idea whats going on with this >.<  This is the whole section after I type in make.

Code: [Select]
make -C src/tools/lcc install
make[1]: Entering directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/lcc'
install -s -m 0755 build-mingw32-x86/q3lcc.exe ../
install -s -m 0755 build-mingw32-x86/q3cpp.exe ../
install -s -m 0755 build-mingw32-x86/q3rcc.exe ../
make[1]: Leaving directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/lcc'
make -C src/tools/asm install
make[1]: Entering directory `/c/Tremulous/Tremulous-1.1.0-src/src/tools/asm'
gcc -O2 -Wall -Werror -fno-strict-aliasing -o q3asm q3asm.c cmdlib.c
q3asm.c: In function 'TryAssembleENDPROC':
q3asm.c:959:10: error: variable 'v2' set but not used [-Werror=unused-but-set-va
riable]
q3asm.c:959:7: error: variable 'v' set but not used [-Werror=unused-but-set-vari
able]
cc1.exe: all warnings being treated as errors

cmdlib.c: In function 'ExpandPath':
cmdlib.c:316:6: error: the address of 'qdir' will always evaluate as 'true' [-We
rror=address]
cmdlib.c: In function 'ExpandGamePath':
cmdlib.c:329:6: error: the address of 'qdir' will always evaluate as 'true' [-We
rror=address]
cc1.exe: all warnings being treated as errors
PROBLEM?
Quote from: ~Noyesdude
How do I fix these compile errors?
stop using the 1.1.0 source code, which is ~6.5 years old. get a newer version.

a workaround is to not pass -Werror to the compiler.

the fix is to edit the code:
  • in cmdlib.c, change both occurrences of
Code: [Select]
if (!qdir)
to
Code: [Select]
if (!qdir[0])
 
  • in q3asm.c, remove
Code: [Select]
int v, v2;
and change
Code: [Select]
v = ParseValue(); // locals
v2 = ParseValue(); // arg marshalling
to
Code: [Select]
ParseValue(); // locals
ParseValue(); // arg marshalling

    Noyesdude

    • Posts: 44
    • Turrets: +2/-1
    Re: Compile Errors
    « Reply #2 on: May 29, 2012, 08:36:58 am »
    Thanks for helping.

    I'll see about getting the newer code in the near future.
    Co-creater of the Pbot installation guide(http://xserverx.com/forum/viewtopic.php?f=44&t=2352) on XserverX, and Tremulous player. and btw its No-yes-dude :D