Tremulous Forum

General => Troubleshooting => Topic started by: dodo1122 on July 11, 2007, 09:35:17 pm

Title: trem not compiling on gcc-4.2.0 & glibc-2.6
Post by: dodo1122 on July 11, 2007, 09:35:17 pm
This is what i get when compiling trem on my gentoo with gcc-4.2.0 and glibc-2.6:

Code: [Select]

dominic@gentoo trunk % make
make -C src/tools/lcc install
make[1]: Entering directory `/home/dominic/trunk/src/tools/lcc'
install -s -m 0755 build-linux-x86/q3lcc ../
install -s -m 0755 build-linux-x86/q3cpp ../
install -s -m 0755 build-linux-x86/q3rcc ../
make[1]: Leaving directory `/home/dominic/trunk/src/tools/lcc'
make -C src/tools/asm install
make[1]: Entering directory `/home/dominic/trunk/src/tools/asm'
gcc -O2 -Wall -Werror -fno-strict-aliasing -o q3asm q3asm.c cmdlib.c
cc1: warnings being treated as errors
cmdlib.c: In function ‘ExpandPath’:
cmdlib.c:316: warning: the address of ‘qdir’ will always evaluate as ‘true’
cmdlib.c: In function ‘ExpandGamePath’:
cmdlib.c:329: warning: the address of ‘qdir’ will always evaluate as ‘true’
make[1]: *** [q3asm] Error 1
make[1]: Leaving directory `/home/dominic/trunk/src/tools/asm'
make: *** [tools] Error 2

I recompiled my whole system with these two is well, without any errors.
This is SVN954.
I tried to set the CFLAGS back to normal in the Makefile, but that did not obviously help. Tried different svn checkouts, still the same.
I recompiled my whole system with these two is well, without any errors.
The problem from what i see is

Code: [Select]
cc1: warnings being treated as errors

Now, why? :P
Anyone can help?

dodo
Title: trem not compiling on gcc-4.2.0 & glibc-2.6
Post by: kevlarman on July 11, 2007, 10:33:22 pm
stop making gentoo compile with -Werror
Title: trem not compiling on gcc-4.2.0 & glibc-2.6
Post by: dodo1122 on July 11, 2007, 10:56:14 pm
i am not. I haven't changed the Makefile, and none of my system flags have that (which are not used while compiling trem anyway iirc).
It is clean SVN that i am compiling, and it still fails.


dodo
Title: trem not compiling on gcc-4.2.0 & glibc-2.6
Post by: benmachine on July 11, 2007, 11:13:17 pm
Quote from: "dodo1122"
i am not. I haven't changed the Makefile, and none of my system flags have that (which are not used while compiling trem anyway iirc).
It is clean SVN that i am compiling, and it still fails.


dodo

Go look in the log you posted, -Werror is right there. Remove it?
Title: trem not compiling on gcc-4.2.0 & glibc-2.6
Post by: next_ghost on July 11, 2007, 11:21:56 pm
GCC has found a real bug, it should be
Code: [Select]
if (!qdir[0])
instead of
Code: [Select]
if (!qdir)

qdir is really always true because it's global array of 1024 chars. According to the comment, the condition which GCC refuses to compile tests the string in qdir, not the adress of the array itself.

And dodo, don't use stuff which is not yet available for public testing.
Title: trem not compiling on gcc-4.2.0 & glibc-2.6
Post by: dodo1122 on July 11, 2007, 11:29:35 pm
why not? :P gcc-4.2.0 will be shortly in the gentoo's portage tree(keyworded), and right now its working pretty stable for me, and so is glibc-2.6 . As i've mentioned, i recompiled my whole system with it, and not a single serious error appeared. This is the first "bug" i have encountered while using gcc-4.2.0 & glibc-2.6. And i would like to point out that gcc-4.2.0 is actually marked as stable. Its not like im using gcc-4.3.0, although i would love to (-march=core2 being the main reason).


dodo
Title: trem not compiling on gcc-4.2.0 & glibc-2.6
Post by: kevlarman on July 11, 2007, 11:43:53 pm
Quote from: "next_ghost"
GCC has found a real bug, it should be
Code: [Select]
if (!qdir[0])
instead of
Code: [Select]
if (!qdir)

qdir is really always true because it's global array of 1024 chars. According to the comment, the condition which GCC refuses to compile tests the string in qdir, not the adress of the array itself.

And dodo, don't use stuff which is not yet available for public testing.
that bug is fixed upstream already.
Title: trem not compiling on gcc-4.2.0 & glibc-2.6
Post by: dodo1122 on July 12, 2007, 03:39:42 pm
heh, so i'll wait till tomorrow and upgrade gcc to 4.2.1 ;-)


dodo