Compile Problems Linux

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
P_N

Compile Problems Linux

Post by P_N »

Hi!

I have some problems compiling the game (CRUX linux 1.2)
The '--enable-boost-128' and changing 'glXProcAddressARB' to 'glXProcAddress' in 'gl_init.cpp' solved some of it, but now I'm stuck again.
al_sound.cpp: In function `void AUDStopAllSounds()':
al_sound.cpp:311: `sounds' undeclared (first use this function)
al_sound.cpp:311: (Each undeclared identifier is reported only once for each
function it appears in.)
make: *** [al_sound.o] Error 1
Anyone?

/Magnus
Sweden
P_N

Post by P_N »

Ok, didn't know OpanAl was a requirement.
But now it looks like this:

gldrv/libgldrv.a(gl_init.o)(.text+0x22e): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x23f): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x250): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x261): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x613): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x624): more undefined references to `glXGetProcAddress' follow
collect2: ld returned 1 exit status
make[3]: *** [vegastrike] Error 1
make[3]: Leaving directory `/home/magnus/tempp/vegastrike-0.4.1-installer/vegastrike/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/magnus/tempp/vegastrike-0.4.1-installer/vegastrike/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/magnus/tempp/vegastrike-0.4.1-installer/vegastrike'
make: *** [all] Error 2

Didn't make a difference if I changed 'glXGetProcAddressARB' to 'glXGetProcAddress'

Any ideas?
Lasker
Merchant
Merchant
Posts: 36
Joined: Wed May 07, 2003 1:01 am

Post by Lasker »

Very similar here (CVS-0.4.1).
After removing the 'ARB' in 'glXProcAddressARB' compiling went much further, but there still seems something wrong with it (undifined reference):

Code: Select all

: undefined reference to `boost::python::converter::rvalue_from_python_stage1(_object*, boost::python::converter::registration const&)'
cmd/base_init.o(.gnu.linkonce.t._ZN5boost6python6detail9returningIvE4callINS0_21default_call_policiesEiSsffffSsSsEEP7_objectPFvT0_T1_T2_T3_T4_T5_T6_T7_ES7_S7_PKT_+0xef): more undefined references to `boost::python::converter::rvalue_from_python_stage1(_object*, boost::python::converter::registration const&)' follow
gfx/libgfx.a(vdu.o)(.text+0x98a9): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'
gldrv/libgldrv.a(gl_init.o)(.text+0x143): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x154): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x165): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x176): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x495): In function `init_opengl_extensions()':
: undefined reference to `glXGetProcAddress'
gldrv/libgldrv.a(gl_init.o)(.text+0x4a6): more undefined references to `glXGetProcAddress' follow
cmd/ai/libai.a(hard_coded_scripts.o)(.text+0x5673): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'
cmd/ai/libai.a(firekeyboard.o)(.text+0x6b62): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'
collect2: ld returned 1 exit status
make[3]: *** [vegastrike] Fehler 1
make[3]: Leaving directory `/home/pi/vegastrike/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/pi/vegastrike/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/pi/vegastrike'
make: *** [all] Fehler 2
I also followed the steps recommended in another thread

Code: Select all

aclocal
autoheader
autoconf
automake -a
configure --enable-boost-128
make
System specs:
1 Ghz Athlon K7C (Firebird), NVIDIA Gforce 3 (NVIDIA Kernel Module 1.0-5336), Fedora Linux, kernel 2.4.22-1.2174.nptl, ALSA runtime libraries v1.0.2, openal + openal-devel 0.0.6-1
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

fix youre header to define glXGetProcAddressARB instead of glXGetProcAddress

your dll only defines the former not the latter...if VS calls the latter this'll happen
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
Lasker
Merchant
Merchant
Posts: 36
Joined: Wed May 07, 2003 1:01 am

Post by Lasker »

When I do this, compiling bailes out much sooner (that was the reason why I changed it):

Code: Select all

Making all in gldrv
make[3]: Entering directory `/home/pi/vegastrike/src/gldrv'
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src -I../../src/boost  -DHAVE_SDL=1 -DSDL_WINDOWING=1 -DHAVE_SDL_MIXER=1      -DHAVE_AL=1   -I/usr/include/python2.2 -DHAVE_PYTHON=1  -DUSE_BOOST_128=1   -pipe -O2 -fexpensive-optimizations -fomit-frame-pointer -Wall -ffast-math   -I/usr/include/SDL -D_REENTRANT -pipe  -MT gl_init.o -MD -MP -MF ".deps/gl_init.Tpo" \
  -c -o gl_init.o `test -f 'gl_init.cpp' || echo './'`gl_init.cpp; \
then mv -f ".deps/gl_init.Tpo" ".deps/gl_init.Po"; \
else rm -f ".deps/gl_init.Tpo"; exit 1; \
fi
gl_init.cpp: In function `void init_opengl_extensions()':
gl_init.cpp:106: error: `glXGetProcAddressARB' undeclared (first use this
   function)
gl_init.cpp:106: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
../../src/cmd/collection.h: At global scope:
../../src/cmd/collection.h:49: Warnung: inline function `void
   UnitCollection::UnitIterator::GetNextValidUnit()' used but never defined
make[3]: *** [gl_init.o] Fehler 1
make[3]: Leaving directory `/home/pi/vegastrike/src/gldrv'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/pi/vegastrike/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/pi/vegastrike'
make: *** [all] Fehler 2
Do we both speak about the same thing, the line "#define GET_GL_PROC glXGetProcAddressARB" in ~vegastrike/src/gldrv/gl_init.cpp?
Lasker
Merchant
Merchant
Posts: 36
Joined: Wed May 07, 2003 1:01 am

Post by Lasker »

Guess I know now what you mean. I assumed the NVIDIA headers were automatically installed during the driver installation, but that wasn't true.
They are provided, though (in /usr/share/doc/NVIDIA_GLX-1.0/include/GL) and I copied the content into /usr/include/GL, overwriting the excisting headers. Finally ldconfig. The problem described above seems to be solved now, but I run into a new one: my python development installation is screwed. Have to check first...
Lasker
Merchant
Merchant
Posts: 36
Joined: Wed May 07, 2003 1:01 am

Post by Lasker »

Now I get *tons* of messages all starting with 'undifined reference...'
As a short example here the last few lines

Code: Select all

: undefined reference to `boost::python::converter::rvalue_from_python_stage1(_object*, boost::python::converter::registration const&)'
cmd/base_init.o(.gnu.linkonce.t._ZN5boost6python6detail9returningIvE4callINS0_21default_call_policiesEiSsffffSsSsEEP7_objectPFvT0_T1_T2_T3_T4_T5_T6_T7_ES7_S7_PKT_+0xc5): In function `_object* boost::python::detail::returning<void>::call<boost::python::default_call_policies, int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, float, float, float, float, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(void (*)(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, float, float, float, float, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >), _object*, _object*, boost::python::default_call_policies const*)':
: undefined reference to `boost::python::converter::rvalue_from_python_stage1(_object*, boost::python::converter::registration const&)'
cmd/base_init.o(.gnu.linkonce.t._ZN5boost6python6detail9returningIvE4callINS0_21default_call_policiesEiSsffffSsSsEEP7_objectPFvT0_T1_T2_T3_T4_T5_T6_T7_ES7_S7_PKT_+0xef): more undefined references to `boost::python::converter::rvalue_from_python_stage1(_object*, boost::python::converter::registration const&)' follow
gfx/libgfx.a(vdu.o)(.text+0x98a9): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'
cmd/ai/libai.a(hard_coded_scripts.o)(.text+0x5673): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'
cmd/ai/libai.a(firekeyboard.o)(.text+0x6b62): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'
collect2: ld returned 1 exit status
make[3]: *** [vegastrike] Fehler 1
make[3]: Leaving directory `/home/pi/vegastrike/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/pi/vegastrike/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/pi/vegastrike'
make: *** [all] Fehler 2
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

try

cd src/boost
make clean all
cd ../boost129
make clean all
cd ../../
make
then if that doesn't work
try rebuilding all... this seems like something where you changed from boost 128 to boost 129 or vice versa and somehow the boost stuff didn't rebuild itself
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
Lasker
Merchant
Merchant
Posts: 36
Joined: Wed May 07, 2003 1:01 am

Post by Lasker »

Just curious: even after configure --enable-boost-128 there is stuff written into the boost129 folder (boost128 folder doesn't excist).

Is this normal?
Lasker
Merchant
Merchant
Posts: 36
Joined: Wed May 07, 2003 1:01 am

Post by Lasker »

hellcatv wrote:try

cd src/boost
make clean all
cd ../boost129
make clean all
cd ../../
make
Doesn't work
then if that doesn't work
try rebuilding all... this seems like something where you changed from boost 128 to boost 129 or vice versa and somehow the boost stuff didn't rebuild itself
also doesn't work (did a make clean in src before a new make from the top), but got some new error messages at least:

Code: Select all

gl_state.cpp: In function `void GFXBlendMode(BLENDFUNC, BLENDFUNC)':

gl_state.cpp:182: error: `GL_CONSTANT_ALPHA' undeclared (first use this
   function)
gl_state.cpp:182: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
gl_state.cpp:184: error: `GL_ONE_MINUS_CONSTANT_ALPHA' undeclared (first use
   this function)
gl_state.cpp:186: error: `GL_CONSTANT_COLOR' undeclared (first use this
   function)
gl_state.cpp:188: error: `GL_ONE_MINUS_CONSTANT_COLOR' undeclared (first use
   this function)
../../src/cmd/collection.h: At global scope:
../../src/cmd/collection.h:49: Warnung: inline function `void
   UnitCollection::UnitIterator::GetNextValidUnit()' used but never defined
make[3]: *** [gl_state.o] Fehler 1
make[3]: Leaving directory `/home/pi/vegastrike/src/gldrv'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/pi/vegastrike/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/pi/vegastrike'
make: *** [all] Fehler 2
Btw, a 'make clean all' rather than a simple 'make clean' in src surprisingly acts like a 'make'...
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

hmmm...now suddenly it's having trouble with some very normal openGL commands

make sure your header files have those constants
if not--add them
you can google for the exact values or check up on the old headers you had
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
leerbag

linux compiling problem: GL_CONSTANT_ALPHA...

Post by leerbag »

Hello,
I am trying to compile under linux suse9.0 and as soon as I had install all the needed libraries, I have had the same errors about glext.h:

Code: Select all

if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src -I../../src/boost  -DHAVE_SDL=1 -DSDL_WINDOWING=1 -DHAVE_SDL_MIXER=1      -DHAVE_AL=1   -I/usr/local/include/python2.3 -DHAVE_PYTHON=1  -DUSE_BOOST_128=1   -pipe -O2 -fexpensive-optimizations -fomit-frame-pointer -Wall -ffast-math   -I/usr/include/SDL -D_REENTRANT -pipe  -MT gl_state.o -MD -MP -MF ".deps/gl_state.Tpo" \
  -c -o gl_state.o `test -f 'gl_state.cpp' || echo './'`gl_state.cpp; \
then mv -f ".deps/gl_state.Tpo" ".deps/gl_state.Po"; \
else rm -f ".deps/gl_state.Tpo"; exit 1; \
fi
gl_state.cpp: In function `void GFXBlendMode(BLENDFUNC, BLENDFUNC)':
gl_state.cpp:182: error: `GL_CONSTANT_ALPHA' undeclared (first use this
   function)
gl_state.cpp:182: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
gl_state.cpp:184: error: `GL_ONE_MINUS_CONSTANT_ALPHA' undeclared (first use
   this function)
gl_state.cpp:186: error: `GL_CONSTANT_COLOR' undeclared (first use this
   function)
gl_state.cpp:188: error: `GL_ONE_MINUS_CONSTANT_COLOR' undeclared (first use
   this function)
The variables from glext.h seems undefined. I have tried to reinclude glext.h at the begining of gl_state.cpp to be sure it is included but that changed nothing. I although tried to replace the variable with their values but then other functions were undefined :-(
Any Idee how these variables and functions definitions get lost?

Gab
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

what are these other functions :-)
just paste in the values if your headers aren't working right

if you have nvidia do

nvidia-installer --update-headers or something
that will install up-to-date headers
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
leerbag

other functions

Post by leerbag »

Ido not remember what other errors came, but there were a lot!
I'll try it again soon.
About the driver nvidia I installed them sooner than a week ago, I thought they were up to date.
Thanks for the answer!
I eat something and try again ;-)
Lasker
Merchant
Merchant
Posts: 36
Joined: Wed May 07, 2003 1:01 am

Post by Lasker »

hellcatv wrote: if you have nvidia do
nvidia-installer --update-headers or something
that will install up-to-date headers
You surely mean --opengl-headers (--update-headers doesn't exist).
Don't know, if that solves the problem, I've got a bit tired of wasting hours
with compiling that beast.

Btw, starting nvidia-installer with -A prints a list of advanced options...
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

yes... nvidia's installer can install better headers :-)
ones that actually LINK with your driver

you may need to forcably reinstall the driver to get it to download the freakin' headers...but then again it saves the headers in some temporary file as it's building, so maybe you can stop it and just copy gl.h and glu.h by hand (glx.h and so fortH)
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
leerbag

Post by leerbag »

in fact I did not need newer nvidia drivers or header files to finish successfully the compilation.
Just replacing some constants with their values
(see other thread here)
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

cool

well no user should have to define those constants...that's the most bizzare thing

perhaps we needed to #define some GL_VERSION flag or something

if you'd like you can toss your gl.h over to me at danielhorn
then the at symbol mindspring.com
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
leerbag

Post by leerbag »

send.
Guest

Missing includes

Post by Guest »

Well, I dunno if this fixes everything, but the reason the glext.h test blows up during configure is that it doesn't first include gl.h. I kludged up the glext.h file rather than trying to figure out how configure runs this test -- probably a less than ideal answer:

/* I put this at the top of glext.h */
#ifndef __gl_h_
#include <GL/gl.h>
#endif
Post Reply