svn from 28.04.2006 does not compile.

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
energyman76b
ISO Party Member
ISO Party Member
Posts: 445
Joined: Tue Feb 11, 2003 8:04 am

svn from 28.04.2006 does not compile.

Post by energyman76b »

Hi,
I get this error on make:
depbase=`echo src/cmd/alphacurve.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I./boost/1_33 -DHAVE_SDL=1 -DSDL_WINDOWING=1 -DHAVE_AL=1 -DHAVE_OGG -DDATA_DIR=\"/home/energyman/data4.x\" -I/usr/include/python2.4 -DHAVE_PYTHON=1 -I./src -g -O2 -pipe -O2 -ffast-math -static -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/include/SDL -D_REENTRANT -pthread -pipe -MT src/cmd/alphacurve.o -MD -MP -MF "$depbase.Tpo" -c -o src/cmd/alphacurve.o src/cmd/alphacurve.cpp; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
src/cmd/alphacurve.cpp:105:55: Warnung: Kein Newline am Dateiende
src/cmd/alphacurve.cpp: In function »int get_alpha(int, int, int, int, double, double, int, int)«:
src/cmd/alphacurve.cpp:37: Warnung: Umwandlung in »int« von »double«
src/cmd/alphacurve.cpp:41: Warnung: Umwandlung in »int« von »double«
src/cmd/alphacurve.cpp:85: Warnung: Umwandlung in »int« von »double«
src/cmd/alphacurve.cpp:95: Warnung: Umwandlung in »int« von »double«
depbase=`echo src/cmd/asteroid_generic.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I./boost/1_33 -DHAVE_SDL=1 -DSDL_WINDOWING=1 -DHAVE_AL=1 -DHAVE_OGG -DDATA_DIR=\"/home/energyman/data4.x\" -I/usr/include/python2.4 -DHAVE_PYTHON=1 -I./src -g -O2 -pipe -O2 -ffast-math -static -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/include/SDL -D_REENTRANT -pthread -pipe -MT src/cmd/asteroid_generic.o -MD -MP -MF "$depbase.Tpo" -c -o src/cmd/asteroid_generic.o src/cmd/asteroid_generic.cpp; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
./src/cmd/collection.h:62: Fehler: extra qualification »UnitCollection::UnitIterator::« on member »operator=«
./src/cmd/collection.h:97: Fehler: extra qualification »UnitCollection::ConstIterator::« on member »operator=«
./src/rendertext.h:26: Fehler: extra qualification »RText::« on member »text_width«
./src/rendertext.h:27: Fehler: extra qualification »RText::« on member »draw_text«
./src/rendertext.h:36: Fehler: extra qualification »RText::« on member »ConsoleKeyboardI«
./src/rendertext.h:38: Fehler: extra qualification »RText::« on member »conoutn«
./src/cmd/weapon_xml.h:35: Fehler: extra qualification »weapon_info::« on member »weapon_info«
./src/cmd/script/flightgroup.h:87: Fehler: extra qualification »Flightgroup::« on member »operator=«
make[1]: *** [src/cmd/asteroid_generic.o] Fehler 1
make[1]: Leaving directory `/home/energyman/vegastrike'
make: *** [all] Fehler 2

if you need more info, please tell me.
You do not have the required permissions to view the files attached to this post.
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

mine worked for the 29th of April for the vegastrike directory of SVN.
energyman76b
ISO Party Member
ISO Party Member
Posts: 445
Joined: Tue Feb 11, 2003 8:04 am

Post by energyman76b »

are you using gcc 4.1? on amd64?
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

Ahh, no. Sorry. Didn't see your system specs. I have GCC 3.4.5 on an athlon xp
prestidigitator
Mercenary
Mercenary
Posts: 123
Joined: Sat Apr 22, 2006 8:54 pm
Location: California, USA

Post by prestidigitator »

I'm having a somewhat similar problem (I'm on an amd64 with gcc 4.1). This is my first time trying to compile. :( My first issue was getting the configure script to stop complaining about GLUT (I'm using freeglut and wound up having to do a 'ln -s /usr/lib64/libglut.so.3 /usr/lib64/libglut32.so' before it finally gave over).

EDIT: Oh, also I had to give configure the argument 'CPPFLAGS="-I/usr/include/python2.4"'.

Now I'm getting a bunch of compile errors after a seemingly successful configure. Here's the end of my make output starting with the first error (user name replaced to protect the not-so-innocent):

Code: Select all

depbase=`echo src/cmd/asteroid_generic.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
if g++ -DHAVE_CONFIG_H -I. -I. -I.   -I./boost/1_33 -I/usr/include/python2.4   -DHAVE_SDL=1 -DSDL_WINDOWING=1      -DHAVE_AL=1   -DHAVE_OGG    -I./src   -g -O2 -pipe  -falign-loops=2 -falign-jumps=2 -falign-functions=2  -I/usr/include/SDL -D_REENTRANT -pthread -pipe -MT src/cmd/asteroid_generic.o -MD -MP -MF "$depbase.Tpo" -c -o src/cmd/asteroid_generic.o src/cmd/asteroid_generic.cpp; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
./src/cmd/collection.h:62: error: extra qualification ‘UnitCollection::UnitIterator::’ on member ‘operator=’
./src/cmd/collection.h:97: error: extra qualification ‘UnitCollection::ConstIterator::’ on member ‘operator=’
./src/rendertext.h:26: error: extra qualification ‘RText::’ on member ‘text_width’
./src/rendertext.h:27: error: extra qualification ‘RText::’ on member ‘draw_text’
./src/rendertext.h:36: error: extra qualification ‘RText::’ on member ‘ConsoleKeyboardI’
./src/rendertext.h:38: error: extra qualification ‘RText::’ on member ‘conoutn’
./src/cmd/weapon_xml.h:35: error: extra qualification ‘weapon_info::’ on member ‘weapon_info’
./src/cmd/script/flightgroup.h:87: error: extra qualification ‘Flightgroup::’ on member ‘operator=’
make[1]: *** [src/cmd/asteroid_generic.o] Error 1
make[1]: Leaving directory `/home/<user>/vegastrike_svn/vegastrike'
make: *** [all] Error 2
My config.log is attached (with user name similarly replaced).
You do not have the required permissions to view the files attached to this post.
prestidigitator
Mercenary
Mercenary
Posts: 123
Joined: Sat Apr 22, 2006 8:54 pm
Location: California, USA

Post by prestidigitator »

Err. I took a look at the source files, and someone is using incorrect C++ syntax: you do not use a class qualifier in the body of the class when declaring the class's methods. Unfortunately some compilers may be tolerant of this syntax, though. I'll work on fixing it.
prestidigitator
Mercenary
Mercenary
Posts: 123
Joined: Sat Apr 22, 2006 8:54 pm
Location: California, USA

Post by prestidigitator »

Ah. I'm in the middle of fixing the syntax errors, but now I'm getting compile problems because the configure script apparently couldn't find my python library, seemlingly because it's in /usr/lib64 not /usr/lib. Duhhhhhh..... :x
prestidigitator
Mercenary
Mercenary
Posts: 123
Joined: Sat Apr 22, 2006 8:54 pm
Location: California, USA

Post by prestidigitator »

So, I've changed the configure script to look for python in the right place and it seems to be happy about that now. I've fixed a BUNCH of the extra qualificiation syntax errors in various source files. NOW I'm having a problem in src/aldrv/al_init.cpp. I get the errors:

Code: Select all

src/aldrv/al_init.cpp: In function ‘bool AUDInit()’:
src/aldrv/al_init.cpp:186: error: invalid conversion from ‘ALvoid*’ to ‘ALCcontext*’
src/aldrv/al_init.cpp:186: error:   initializing argument 1 of ‘ALCboolean alcMakeContextCurrent(ALCcontext*)’
src/aldrv/al_init.cpp: In function ‘void AUDDestroy()’:
src/aldrv/al_init.cpp:227: error: invalid conversion from ‘ALvoid*’ to ‘ALCcontext*’
src/aldrv/al_init.cpp:227: error:   initializing argument 1 of ‘void alcDestroyContext(ALCcontext*)’
The problem seems to be where the global variable 'context_id' is declared:

Code: Select all

#ifndef _WIN32
static ALvoid *context_id=NULL;
#else
static ALCcontext * context_id=NULL;
#endif
#endif
Now my version (0.0.9) of OpenAL uses the type 'ALCcontext*', so obviously this preprocessor code is wrong in my case. For now I am going to remove the conditional in my working copy. I'm not sure if there should rightly be a more useful conditional in there based on the OpenAL version. Anyone know?

DO ANY OF THE DEVELOPERS EVEN COMPILE VEGASTRIKE IN LINUX?!
prestidigitator
Mercenary
Mercenary
Posts: 123
Joined: Sat Apr 22, 2006 8:54 pm
Location: California, USA

Post by prestidigitator »

Okay.... Now libalut is not being linked in, causing undefined symbols:

Code: Select all

src/aldrv/vegastrike-al_sound.o: In function `AUDCreateSoundWAV(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)':src/aldrv/al_sound.cpp:342: undefined reference to `alutLoadWAVMemory'
:src/aldrv/al_sound.cpp:357: undefined reference to `alutUnloadWAV'
collect2: ld returned 1 exit status
prestidigitator
Mercenary
Mercenary
Posts: 123
Joined: Sat Apr 22, 2006 8:54 pm
Location: California, USA

Post by prestidigitator »

Well, I finally got it to compile without errors, but it didn't help a whole heck of a lot, since:

1.) There don't seem to be any instructions anywhere for how to install data downloaded via svn for a compiled install. I GUESSED that everything in the repo under data4.x should just be copied into the base install directory, but who knows if that's right.

2.) vegastrike wouldn't start with the following output:

Code: Select all

GOT SUBDIR ARG = 
Found data in ..
Using /home/<user>/vegastrike-trunc as data directory
Vega Strike  
See http://www.gnu.org/copyleft/gpl.html for license details.

Using .vegastrike as the home directory
Found MODDIR = /home/<user>/vegastrike-trunc/mods
USING HOMEDIR : /home/<user>/.vegastrike As the home directory 
CONFIGFILE - No config found in home : /home/<user>/.vegastrike/vegastrike.config
CONFIGFILE - No home config file found, using datadir config file : /home/<user>/vegastrike-trunc/vegastrike.config
DATADIR - No datadir specified in config file, using ; /home/<user>/vegastrike-trunc
SIMULATION_ATOM: 0.04
MISSION_NAME is empty using : explore_universe.mission
running import sys
print sys.path
sys.path = [r"/home/<user>/vegastrike-trunc/modules/builtin/",r"/home/<user>/vegastrike-trunc/modules/",r"/home/<user>/vegastrike-trunc/bases/"]
testing VS randomrunning import sys
print sys.path
['/usr/lib64/python24.zip', '/usr/lib64/python2.4', '/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', '/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages', '/usr/lib64/python2.4/site-packages/FontTools', '/usr/lib64/python2.4/site-packages/Numeric', '/usr/lib64/python2.4/site-packages/PIL', '/usr/lib64/python2.4/site-packages/dbus', '/usr/lib64/python2.4/site-packages/gst-0.10', '/usr/lib64/python2.4/site-packages/gtk-2.0', '/usr/lib/python2.4/site-packages']
['/home/<user>/vegastrike-trunc/modules/builtin/', '/home/<user>/vegastrike-trunc/modules/', '/home/<user>/vegastrike-trunc/bases/']
open /dev/[sound/]dsp: Device or resource busy
ALSA lib pcm_dmix.c:865:(snd_pcm_dmix_open) unable to open slave
Xlib: connection to ":0.0" refused by server

Xlib: No protocol specified


Xlib: connection to ":0.0" refused by server

Xlib: No protocol specified


Couldn't initialize SDL: No available video deviceCurrent Path /home/<user>/vegastrike-trunc
Final Path /home/<user>/vegastrike-trunc
Using .vegastrike as the home directory
Opened audio at 44100 Hz 16 bit stereo, 4096 bytes audio buffer

[CONNECTED]
i0
[SETTING FADEIN TO 0]
o10
[SETTING FADEOUT TO 10]
v1.000000
[SETTING VOLUME TO 1.000000]
v0.50000015.000000
[SETTING VOLUME TO 1.000000]
Unlike in the 0.4.3 package, there doesn't seem to be any kind of setup program or anything, and 'vslauncher' doesn't seem to be much help. Also, after running 'vegastrike' no more X programs would start up afterwards until I restarted X. Yeah. :x

Anyway, attached is a patch file. You should be able to (at least if you are looking at SVN revision 10200--the latest as of this morning) go into the vegastrike directory (the one with the 'configure' script) and type:

Code: Select all

patch <extraQualificationsFixPatch.txt
The other things I had to do were go into the 'configure' script and change the line (10865 for me) that reads:

Code: Select all

PYTHON_libchk="/usr/lib /usr/local/lib /sw/lib/python${PYTHON_SHORT}/config ...
to read:

Code: Select all

PYTHON_libchk="/usr/lib64 /usr/lib /usr/local/lib /sw/lib/python${PYTHON_SHORT}/config ...
After configuring, I also went into the Makefile and changed every instance of the string:

Code: Select all

-lopenal
to:

Code: Select all

-lopenal -lalut
Good luck, and let me know if you come up with anything else helpful.
You do not have the required permissions to view the files attached to this post.
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

I get that same error. The only thing I have found to work is to

Code: Select all

xhost +local: 
before I run vegastrike. I have heard that this is not too good security-wise, but what else am I supposed to do?

As was related to me, use the data4.x directory, in that directory make a link to your compiled vegastrike & soundserver binaries, name them vegastrike & soundserver.
prestidigitator
Mercenary
Mercenary
Posts: 123
Joined: Sat Apr 22, 2006 8:54 pm
Location: California, USA

Post by prestidigitator »

rigelan wrote:I get that same error. The only thing I have found to work is to

Code: Select all

xhost +local: 
before I run vegastrike. I have heard that this is not too good security-wise, but what else am I supposed to do?

As was related to me, use the data4.x directory, in that directory make a link to your compiled vegastrike & soundserver binaries, name them vegastrike & soundserver.
That was the first thing I tried, but to no avail.
energyman76b
ISO Party Member
ISO Party Member
Posts: 445
Joined: Tue Feb 11, 2003 8:04 am

Post by energyman76b »

prestidigitator wrote:Well, I finally got it to compile without errors, but it didn't help a whole heck of a lot, since:

1.) There don't seem to be any instructions anywhere for how to install data downloaded via svn for a compiled install. I GUESSED that everything in the repo under data4.x should just be copied into the base install directory, but who knows if that's right.
--with-data-dir=
?

worked in the past ....
prestidigitator
Mercenary
Mercenary
Posts: 123
Joined: Sat Apr 22, 2006 8:54 pm
Location: California, USA

Post by prestidigitator »

energyman76b wrote:
prestidigitator wrote:Well, I finally got it to compile without errors, but it didn't help a whole heck of a lot, since:

1.) There don't seem to be any instructions anywhere for how to install data downloaded via svn for a compiled install. I GUESSED that everything in the repo under data4.x should just be copied into the base install directory, but who knows if that's right.
--with-data-dir=
?

worked in the past ....
I tried that (configuring before the install, of course) but only looked in the standard install locations for the data ('.', '..', '../data', and '/usr/...' or whatever). At least that's what it said. So I put the data in '..' and it stopped complaining about THAT. Oh, and I'm not sure I'm supposed to create the '~/.vegastrike' directory contents either, since the setup/config program that normally does that the first time you start up is nowhere to be found (and when I did an svn checkout on 'vssetup' I just got something that won't compile at all).

I still can't run because of the X access problem, too. I'm not sure HOW it is screwing with X, either; my '~/.Xauthority' file doesn't seem to be being changed or anything, but even if I do an 'xhost +' it cannot connect to the X server, and my X session is hosed until I restart X. So it's all academic at this point. I can still run 0.4.3 just fine, but no development (or game updates) for me! :(
mattepiu
Trader
Trader
Posts: 17
Joined: Sat May 13, 2006 11:46 am

Post by mattepiu »

all the fixes but the one of openal are extra qualification : should be applied safely to the cvs, they'll not break anything (is just a more strict c++ ).
mattepiu
Trader
Trader
Posts: 17
Joined: Sat May 13, 2006 11:46 am

further testing

Post by mattepiu »

I don't know if this helps, but after a failed vegastrike load, I can't open
anymore xterm or konsole.
Other than this, if I create a symlink to vegastrike and soundserver in the
data dir and launch from there, I get some alsa error too (I'm using alsa-1.0.11).
mattepiu
Trader
Trader
Posts: 17
Joined: Sat May 13, 2006 11:46 am

Post by mattepiu »

tried also the ogre branch (I have ogre-1.2 working on my box, gcc-4.1 compiled),
I patched just the extra qualification error there but compilation stops at:

Code: Select all

src/cmd/unit.cpp: In member function 'virtual void GameUnit<UnitType>::DrawNow(const Matrix&, float)':
src/cmd/unit.cpp:317: error: 'docked' was not declared in this scope
src/cmd/unit.cpp:317: error: 'DOCKED' was not declared in this scope
src/cmd/unit.cpp:317: error: 'DOCKED_INSIDE' was not declared in this scope
src/cmd/unit.cpp: In member function 'virtual void GameUnit<UnitType>::Draw(const Transformation&, const Matrix&)':
src/cmd/unit.cpp:531: error: 'docked' was not declared in this scope
src/cmd/unit.cpp:531: error: 'DOCKED' was not declared in this scope
src/cmd/unit.cpp:531: error: 'DOCKED_INSIDE' was not declared in this scope
src/cmd/unit.cpp:552: error: 'docked' was not declared in this scope
src/cmd/unit.cpp:552: error: 'DOCKED' was not declared in this scope
src/cmd/unit.cpp:552: error: 'DOCKED_INSIDE' was not declared in this scope
Post Reply