News:

Come Chat with us live! Learn how HERE!

Main Menu

trem not compiling on gcc-4.2.0 & glibc-2.6

Started by dodo1122, July 11, 2007, 09:35:17 PM

dodo1122

This is what i get when compiling trem on my gentoo with gcc-4.2.0 and glibc-2.6:


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

cc1: warnings being treated as errors

Now, why? :P
Anyone can help?

dodo
nime & manga fan <3

Currently learning the fine art of programming in c++
Currently on holidays (will be back @ 24/08/07 )

kevlarman

stop making gentoo compile with -Werror
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

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
nime & manga fan <3

Currently learning the fine art of programming in c++
Currently on holidays (will be back @ 24/08/07 )

benmachine

Quote from: dodo1122i 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?
benmachine

next_ghost

GCC has found a real bug, it should be
if (!qdir[0])
instead of
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.
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

dodo1122

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
nime & manga fan <3

Currently learning the fine art of programming in c++
Currently on holidays (will be back @ 24/08/07 )

kevlarman

Quote from: next_ghostGCC has found a real bug, it should be
if (!qdir[0])
instead of
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.
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

dodo1122

heh, so i'll wait till tomorrow and upgrade gcc to 4.2.1 ;-)


dodo
nime & manga fan <3

Currently learning the fine art of programming in c++
Currently on holidays (will be back @ 24/08/07 )