Not able to shoot anyone but myself.

Help with Setup, Hardware, Performance or other Issues...Or just pimp your rig.
Post Reply
Stingray
Private
Private
Posts: 3
Joined: Sat Mar 26, 2005 9:20 pm

Not able to shoot anyone but myself.

Post 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?
User avatar
Teppic
Private First Class
Private First Class
Posts: 576
Joined: Mon Mar 07, 2005 10:00 pm
Location: The North Block

Post by Teppic »

Download version 2.0.5 cvs by using the v2_0branch tag, then it is compatible with the 'normal' servers.
Stingray
Private
Private
Posts: 3
Joined: Sat Mar 26, 2005 9:20 pm

Post by Stingray »

2.0.5 has the same problem. I am even able to flatten a tank but not shoot him.
JoJo_buster
Private
Private
Posts: 4
Joined: Sun Dec 18, 2005 11:34 pm

GCC 4.0 bug

Post 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
Stingray
Private
Private
Posts: 3
Joined: Sat Mar 26, 2005 9:20 pm

Post by Stingray »

Hello,

thats the solution. Thank you very much. Now it works.
User avatar
un pacifiste
Private
Private
Posts: 3
Joined: Fri Dec 30, 2005 6:16 pm

What is the procedure ?

Post 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 !
JoJo_buster
Private
Private
Posts: 4
Joined: Sun Dec 18, 2005 11:34 pm

Post 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
JoJo_buster
Private
Private
Posts: 4
Joined: Sun Dec 18, 2005 11:34 pm

followup

Post 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.
User avatar
un pacifiste
Private
Private
Posts: 3
Joined: Fri Dec 30, 2005 6:16 pm

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

Post by un pacifiste »

Great !!
It works !
I has the same config than the first post (ubuntu AMD64)
This tips good!
User avatar
un pacifiste
Private
Private
Posts: 3
Joined: Fri Dec 30, 2005 6:16 pm

Thx JoJo

Post 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)
++
JoJo_buster
Private
Private
Posts: 4
Joined: Sun Dec 18, 2005 11:34 pm

Post 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.
nec013
Private
Private
Posts: 1
Joined: Sun Jan 29, 2006 2:10 am

Also also, Thx JoJo

Post by nec013 »

Thought I was taking crazy pills. Your compiler tip is very appreciated. :wink:
Post Reply