Page 1 of 1

Not able to shoot anyone but myself.

Posted: Thu Dec 15, 2005 10:25 pm
by Stingray
Hello all,

I am using Ubuntu Linux Breezy on an amd64 in amd64 native mode.
The bzflag package wich come with the distribution woks fine but:
I am not able to shoot anyone. Anyone can shoot me and i also can pick up flags. My bullets go allways straight through the enemy. This is not an lag problem.
I downloaded the sources and copiled/installed everything.
I am speaking about bzflag-2.0.4.20050930
Same problem.
I tried to compile the source in 32 bit mode but havent any luck. This is my problem because even the shortest program i tried to compile had the same error.

Code: Select all

gcc -m32 -lc -L/lib32 -L/usr/lib32 -L/emul/ia32-linux/usr/lib/ 1.c
/usr/lib/gcc/x86_64-linux-gnu/4.0.2/../../../../lib32/crt1.o: In function `_start':
../sysdeps/i386/elf/start.S:109: undefined reference to `__libc_csu_fini'
../sysdeps/i386/elf/start.S:110: undefined reference to `__libc_csu_init'
collect2: ld returned 1 exit status
I also installed a chroot environment for an pure 32 bit system.
The 32 bit compiled version works without problem.
I also started the 32 bit version from the 64 bit environment.
That works too. I used this file to start the 32 bit bzflag:

Code: Select all

export LD_PRELOAD="/opt/chroot/usr/lib/libSDL-1.2.so.0 /opt/chroot/usr/lib/libartsc.so.0.0.0 /opt/chroot/usr/lib/libesd.so.0 /opt/chroot/usr/lib/libaudiofile.so.0 /opt/chroot/usr/lib/libaa.so.1 /opt/chroot/lib/libslang.so.2 /opt/chroot/usr/lib/libasound.so.2 /opt/chroot/usr/lib/libcurl.so.3 /opt/chroot/usr/lib/libidn.so.11 /opt/chroot/usr/lib/libssl.so.0.9.7 /opt/chroot/usr/lib/libcrypto.so.0.9.7 /opt/chroot/usr/lib/libgpm.so.1"
/opt/chroot/usr/local/bin/bzflag -d -window -geometry 1024x768-50-50 -directory  /usr/local/share/bzflag/
I tried to use the cvs version but it has only one server in the list.
Any advice?

Posted: Thu Dec 15, 2005 11:20 pm
by Teppic
Download version 2.0.5 cvs by using the v2_0branch tag, then it is compatible with the 'normal' servers.

Posted: Fri Dec 16, 2005 1:33 am
by Stingray
2.0.5 has the same problem. I am even able to flatten a tank but not shoot him.

GCC 4.0 bug

Posted: Sun Dec 18, 2005 11:39 pm
by JoJo_buster
Had the same problem myself until I read that it is a bug in the 4.0.x version of gcc (compiler). Compiling with Optimisation >1 creates bugs so set the CXXFLAGS variable like below and complie from scratch. Have fun !!

export CXXFLAGS=-O1

Posted: Wed Dec 21, 2005 10:28 am
by Stingray
Hello,

thats the solution. Thank you very much. Now it works.

What is the procedure ?

Posted: Fri Jan 06, 2006 1:49 pm
by un pacifiste
Have i to uninstall the bz package from ubuntu (my distrib) and compile the last version from source and make a "export CXXFLAGS=-01" ?
Or Have i to run only the "export CXXFLAGS=-01" ?

Thanks for your feed back, I am really fed up with playing bz from MSwindows ...

Good game !

Posted: Fri Jan 06, 2006 2:25 pm
by JoJo_buster
1) get the sources files (mine was bzflag-2.0.4.20050930.tar.bz2 )

2) unpack em

3) open a command-window (konsole or xterm )

4) switch into the base directory ( cd ./bzflag-2.0.4.20050930 )

5) export CXXFLAGS=-01

6) ./configure

7) READ the error messages if any, and install any necessary packages until step 6 works

8) make

9) <get root priveleges with su >

10) make install

11) start playing BZFlag on a real Operating System

followup

Posted: Fri Jan 06, 2006 2:30 pm
by JoJo_buster
To answer you question though, you can probably leave the package installed because the above procedure will overwrite all the currently installed programs, but if you ever get an updated package, it may overwrite your self compiled version.

I would just follow the above instructions.

:-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-)

Posted: Fri Jan 06, 2006 7:31 pm
by un pacifiste
Great !!
It works !
I has the same config than the first post (ubuntu AMD64)
This tips good!

Thx JoJo

Posted: Fri Jan 06, 2006 7:36 pm
by un pacifiste
Thx u I can play BZ2.4 on my Ubuntu Breezy, as u said,now I can play on a real system :D

But I don't understand what was the bug and so the solution !
Can u say me further more about it ?

Thanks again and see u on silvercat.tybox.net:5154 8)
++

Posted: Fri Jan 06, 2006 7:55 pm
by JoJo_buster
The bug is the compiler gcc. The Optimizer is standardly set to level 2 which is the highest level of code optimization with out bloating the executable. The Optimizer in gcc 4.x has been re-written which also leads to an amazingly fast compiler - speeds never before seen in gcc. Unfortunately it also is in need of a bit of fine tuning. Anyway, BZFlag can be successfully compiled at optimization level 1 which is set with export CXXFLAGS=-01 option.

Glad it finally works for you.

Also also, Thx JoJo

Posted: Sat Feb 04, 2006 7:32 pm
by nec013
Thought I was taking crazy pills. Your compiler tip is very appreciated. :wink: