Slackware10, GCC 3.3.4 and fails on zonemgr.cpp

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
MamiyaOtaru
Privateer
Posts: 729
Joined: Tue Jan 07, 2003 8:32 am

Post by MamiyaOtaru »

change lines 722 - 724 of zonemgr.cpp from

netbuf.addFloat( un->computer.max_pitch);
netbuf.addFloat( un->computer.max_yaw);
netbuf.addFloat( un->computer.max_roll);

to

netbuf.addFloat( un->computer.max_pitch_up);
netbuf.addFloat( un->computer.max_yaw_left);
netbuf.addFloat( un->computer.max_roll_left);
netbuf.addFloat( un->computer.max_pitch_down);
netbuf.addFloat( un->computer.max_yaw_right);
netbuf.addFloat( un->computer.max_roll_right);
gandalf

Post by gandalf »

fixed it. thanks.
little bit later it fails on:

Code: Select all

soundserver.cpp: In function `int main(int, char**)':
soundserver.cpp:282: error: `O_SHLOCK' undeclared (first use this function)
soundserver.cpp:282: error: (Each undeclared identifier is reported only once
   for each function it appears in.)
make[4]: *** [soundserver.o] Error 1
make[4]: Leaving directory `/server/games/vegastrike/vegastrike/vegastrike/src/networking'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/server/games/vegastrike/vegastrike/vegastrike/src/networking'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/server/games/vegastrike/vegastrike/vegastrike/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/server/games/vegastrike/vegastrike/vegastrike'
make: *** [all] Error 2
Error running 'make'

MamiyaOtaru
Privateer
Posts: 729
Joined: Tue Jan 07, 2003 8:32 am

Post by MamiyaOtaru »

CVS has been a bit wonky lately :D

As a temporary kludge, go through the file and comment out all if clauses with fnet. Search for if (fnet) and comment out. IE, change stuff like

if (fnet) {
return fNET_fgetc(socket);
}else {
return INET_fgetc(socket);
}

to

//if (fnet) {
//return fNET_fgetc(socket);
//}else {
return INET_fgetc(socket);
//}

and along the way that should comment out the one that gave the error :D It's a bit of a sledgehammer approach, but hey,compiled fine before all the fnet clauses were added, so might as well get rid of them for now :D Anyway, this should let you compile until the fnet stuff gets fixed.
liebenow
Star Pilot
Star Pilot
Posts: 5
Joined: Sun Oct 24, 2004 7:24 am

Post by liebenow »

Thanks for the tips! Although I should say that sometime between hitting these problems and finding this post they were both fixed in CVS. This just goes to renew my faith in the Open Source Community's ability to both totaly bork something, and then have it fixed within 48 hours. :wink:
I don't say much, but what I do say I say with confidance.
gandalf

Post by gandalf »

no, the second error still exists at the moment
Chunk
Merchant
Merchant
Posts: 39
Joined: Sun Oct 24, 2004 5:02 am

Post by Chunk »

Well I've searched the internet some and the correct definition for O_SHLOCK is 0x0010. I've added it to my /usr/include/bits/fcntl.h file and it appears to compile correctly now....I'll get back later as to if it works or not.

[edit] ok it compiles but won't link later on....more fNET stuff...
Hi! I'm lost. I'm going to go look for myself, so if I return before I get back, keep me here!
Chunk
Merchant
Merchant
Posts: 39
Joined: Sun Oct 24, 2004 5:02 am

Post by Chunk »

wow your make system has got a few problems

I think i figured out the problems though :)

this is how i got it to work ( in addition to adding the definition for O_SHLOCK)
it will stop when linking the sound server binary and complain about missing fNET_ functions. so go into the src/networking folder and run this (sorry the -I and -L options may be wrong for you so check):

g++ -DHAVE_CONFIG_H -I. -I. -I../.. -DHAVE_SDL=1 -DSDL_WINDOWING=1 -DHAVE_AL=1 -I/usr/include/python -DHAVE_PYTHON=1 -DUSE_BOOST_128=1 -I../../src/boost -I../../src -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/include/SDL -D_REENTRANT -pthread -pipe -MT inet.o -MD -MP -MF ".deps/inet.Tpo" -c -o inet_file.o inet_file.cpp

then run this in the src directory
make lin_time.o

now run these commands in the src/networking folder:
(not sure if this is correct) ar cru libnet.a inet.o inet_file.o ../lin_time.o
ranlib libnet.a

now do this:

g++ -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/include/SDL -D_REENTRANT -pthread -pipe -L/usr/X11R6/lib -L/usr/X11R6/lib -o soundserver inet.o inet_file.o soundserver.o ../lin_time.o -L/usr/local/lib -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lSDL_mixer -lutil -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lGL -lGLU -lglut -lXi -lXmu -lexpat -lpng -ljpeg -lopenal -lpython2.3 -Xlinker -export-dynamic -pthread

this should link the soundserver bin file and now you can go to the vegastrike dir and run make normally.

i don't know enough about the make systems to make these changes or i would....hopefully this will help though
Hi! I'm lost. I'm going to go look for myself, so if I return before I get back, keep me here!
gandalf

Post by gandalf »

last part of your solution ends with:
/usr/lib/libpng.so: undefined reference to `deflate'
/usr/lib/libpng.so: undefined reference to `inflate'
/usr/lib/libpng.so: undefined reference to `inflateInit_'
/usr/lib/libpng.so: undefined reference to `crc32'
/usr/lib/libpng.so: undefined reference to `deflateInit2_'
/usr/lib/libpng.so: undefined reference to `inflateReset'
/usr/lib/libpng.so: undefined reference to `deflateReset'
/usr/lib/libpng.so: undefined reference to `inflateEnd'
/usr/lib/libpng.so: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
to me. previous works nice... so it's a solution probably
Chunk
Merchant
Merchant
Posts: 39
Joined: Sun Oct 24, 2004 5:02 am

Post by Chunk »

gandalf wrote:last part of your solution ends with:
/usr/lib/libpng.so: undefined reference to `deflate'
/usr/lib/libpng.so: undefined reference to `inflate'
/usr/lib/libpng.so: undefined reference to `inflateInit_'
/usr/lib/libpng.so: undefined reference to `crc32'
/usr/lib/libpng.so: undefined reference to `deflateInit2_'
/usr/lib/libpng.so: undefined reference to `inflateReset'
/usr/lib/libpng.so: undefined reference to `deflateReset'
/usr/lib/libpng.so: undefined reference to `inflateEnd'
/usr/lib/libpng.so: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status

to me. previous works nice... so it's a solution probably
hmmm ok.....i guess you libs are different than mine..
this is a make system problem though
mine runs fine....if you know about the make system you might be able to fix the make files
Hi! I'm lost. I'm going to go look for myself, so if I return before I get back, keep me here!
Chunk
Merchant
Merchant
Posts: 39
Joined: Sun Oct 24, 2004 5:02 am

Post by Chunk »

ok well for whoever maintains the make system:
  • 1. the file src/networking/inet_file.cpp isn't getting compiled and it's not listed as a dependency of soundserver (and it is one)
    2. the file src/lin_time.o is a dependency of inet_file.o (and therefore soundserver). however the make systems tries to link soundserver before lin_time is compiled.
    3. the O_SHLOCK options doesn't seem to be a standard definition???? maybe a check needs to be added?
Hi! I'm lost. I'm going to go look for myself, so if I return before I get back, keep me here!
Chunk
Merchant
Merchant
Posts: 39
Joined: Sun Oct 24, 2004 5:02 am

Post by Chunk »

Chunk wrote:ok well for whoever maintains the make system:
  • 1. the file src/networking/inet_file.cpp isn't getting compiled and it's not listed as a dependency of soundserver (and it is one)
    2. the file src/lin_time.o is a dependency of inet_file.o (and therefore soundserver). however the make systems tries to link soundserver before lin_time is compiled.
    3. the O_SHLOCK options doesn't seem to be a standard definition???? maybe a check needs to be added?
Well I'm not sure how I did it :oops: but I've managed to edit the /src/networking/Makefile.am and Makefile.in files so that it compiles cleanly........
if it's needed i can try to make a patch for this.....
Hi! I'm lost. I'm going to go look for myself, so if I return before I get back, keep me here!
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

I think it's already in cvs
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
gandalf

Post by gandalf »

Yes. It works ok at the moment.

But after installing it asks to run vsinstall. Here is a result:
root@darkstar:/server/games/vegastrike# vsinstall
cp: cannot stat `/usr/local/share/vegastrike/data/setup.config': No such file or directory
cp: cannot stat `/usr/local/share/vegastrike/data/.vegastrike/*.m3u': No such file or directory
cp: cannot stat `/usr/local/share/vegastrike/data/vegastrike.config': No such file or directory
/usr/local/bin/vsinstall: line 16: /usr/local/bin/vssetup: No such file or directory
If you wish to have your own music edit ~/.vegastrike/*.m3u
Each playlist represents a place or situation in Vega Strike
Same result if i'd run it as user
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

I think you gotta move your vegastrike data to /usr/local/share/vegastrike/ for that script to work
it's just a shell script
you can hand-edit the paths so that it nabs the stuff from /server/games/vegastrike

also you probably need to make sure that vssetup was actually built and installed on your system from the vssetup dir
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
gandalf

Post by gandalf »

but the data dir is empty (except of CVS dir) - i used linux_vegastrike.sh to build game.
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

cvs update -d there?
what's in the CVS/ paste the contents of that dir (and the contents of those files)
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
gandalf

Post by gandalf »

gandalf@darkstar:/server/games/vegastrike/vegastrike/vegastrike/data$ cvs update -d
cvs update: Updating .
gandalf@darkstar:/server/games/vegastrike/vegastrike/vegastrike/data$
gandalf@darkstar:/server/games/vegastrike/vegastrike/vegastrike/data/CVS$ ls -la
total 20
drwxr-xr-x 2 gandalf users 4096 2004-10-23 15:50 ./
drwxr-xr-x 3 gandalf users 4096 2004-10-23 15:50 ../
-rw-r--r-- 1 gandalf users 2 2004-10-23 15:50 Entries
-rw-r--r-- 1 gandalf users 16 2004-10-23 15:50 Repository
-rw-r--r-- 1 gandalf users 59 2004-10-23 15:50 Root
gandalf@darkstar:/server/games/vegastrike/vegastrike/vegastrike/data/CVS$ cat *
D
vegastrike/data
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

edit data/CVS/Repository
to be
data4.x
rather than
vegastrike/data

and then do a cvs update -d
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
Post Reply