Author Topic: trem not compiling on gcc-4.2.0 & glibc-2.6  (Read 3703 times)

dodo1122

  • Posts: 160
  • Turrets: +0/-0
trem not compiling on gcc-4.2.0 & glibc-2.6
« 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
nime & manga fan <3

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

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
trem not compiling on gcc-4.2.0 & glibc-2.6
« Reply #1 on: July 11, 2007, 10:33:22 pm »
stop making gentoo compile with -Werror
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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

  • Posts: 160
  • Turrets: +0/-0
trem not compiling on gcc-4.2.0 & glibc-2.6
« Reply #2 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
nime & manga fan <3

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

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
trem not compiling on gcc-4.2.0 & glibc-2.6
« Reply #3 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?
benmachine

next_ghost

  • Posts: 892
  • Turrets: +3/-6
trem not compiling on gcc-4.2.0 & glibc-2.6
« Reply #4 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.
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

  • Posts: 160
  • Turrets: +0/-0
trem not compiling on gcc-4.2.0 & glibc-2.6
« Reply #5 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
nime & manga fan <3

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

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
trem not compiling on gcc-4.2.0 & glibc-2.6
« Reply #6 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.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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

  • Posts: 160
  • Turrets: +0/-0
trem not compiling on gcc-4.2.0 & glibc-2.6
« Reply #7 on: July 12, 2007, 03:39:42 pm »
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 )