0.4.1 linux/ppc - endianness.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
phaidros
Atmospheric Pilot
Atmospheric Pilot
Posts: 1
Joined: Mon Jan 19, 2004 4:49 am
Location: de

0.4.1 linux/ppc - endianness.cpp

Post by phaidros »

following that instructions by deepwave:

1.) add --enable-128-boost to make in setup.sh
2.) Change every -03 to -02 in vegastrike/configure.in
3.) Add this line in the beginning of: vegastrike/src/gldrv/gl_init.cpp, gl_globals.h and gl_init.h.

#define glXGetProcAddress glXGetProcAddressARB

- I'm getting around the glext compile probs but hit the ground with ppc. now I'm getting this error:

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 -c endianness.cpp
endianness.cpp: In function `double VSSwapHostDoubleToLittle(double)':
endianness.cpp:17: `DONTUSE__NXSwapBigDoubleToLittle' undeclared (first use
this function)
endianness.cpp:17: (Each undeclared identifier is reported only once for each
function it appears in.)
make[3]: *** [endianness.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/vegastrike-0.4.1/work/vegastrike-0.4.1-installer/vegastrike/src'

any suggestions what could help in this case??
regards.
--
information needs to be free.
korg
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Fri Feb 27, 2004 2:42 am

Post by korg »

Im trying to install vegastrike on gentoo 1.4 on ppc.

The package is masked, but im stoopid, so im trying anyway ;)

It died on:
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 -DGLX_GLXEXT_LEGACY -pipe -O2 -fexpensive-optimizations -fomit-frame-pointer -Wall -ffast-math -I/usr/include/SDL -D_REENTRANT -pipe -c endianness.cpp
endianness.cpp: In function `double VSSwapHostDoubleToLittle(double)':
endianness.cpp:17: `DONTUSE__NXSwapBigDoubleToLittle' undeclared (first use
this function)
endianness.cpp:17: (Each undeclared identifier is reported only once for each
function it appears in.)
make[3]: *** [endianness.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/var/tmp/portage/vegastrike-0.4.1/work/vegastrike-0.4.1-installer/vegastrike/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/vegastrike-0.4.1/work/vegastrike-0.4.1-installer/vegastrike/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/vegastrike-0.4.1/work/vegastrike-0.4.1-installer/vegastrike'
make: *** [all-recursive-am] Error 2


Now, having a look in endianness.h, I see that we have a couple of lines that use the confidence filling function:
`DONTUSE__NXSwapBigDoubleToLittle'

but in endiannes.cpp we define:

DONTUSE__NXSwapBigDoubleToLittleEndian

so, shouldnt the endianness.h file have the following???

45c45
< # define le64_to_cpu(x) (DONTUSE__NXSwapBigDoubleToLittle(x))
---
> # define le64_to_cpu(x) (DONTUSE__NXSwapBigDoubleToLittleEndian(x))
56c56
< # define le64_to_cpu(x) (DONTUSE__NXSwapBigDoubleToLittle(x))
---
> # define le64_to_cpu(x) (DONTUSE__NXSwapBigDoubleToLittleEndian(x))

(for the non patch aware, edit the endianness.h file and add 'Endian' to these two #define lines (as shown)).

Well I got it compiled once i did this... its its dog slow, but *shrugs* it seems to go... now I just need to work out how to fly the bloody thing and what im supposed to do :0
richard
Bounty Hunter
Bounty Hunter
Posts: 162
Joined: Mon Jan 26, 2004 9:29 am
Location: Melbourne, Australia
Contact:

Post by richard »

korg needs hardware-accelerated 3D, badly :)
Gamer, Python programmer
korg
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Fri Feb 27, 2004 2:42 am

Post by korg »

I'd have thought it had it already, but i might be wrong... its some kind of radeon... ah, a Radeon Mobility M7 7500 with 32Meg of 64bit DDR.

*shugs* maybe I havnt added the right kernel module, (although I have a 118792byte module called radeon in lsmod).

Gentoo portage adds a flag: -DGLX_GLXEXT_LEGACY whatever that does (but it doesnt sound good :). Google tells me:

Correct. The GLX_GLXEXT_LEGACY must be defined in order for the
needed function glXGetProcAddressARB to be available.

Ill get an fps from my intel machine at home (thats gentoo also, so it will have the same flag).

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

Post by hellcatv »

hmmm... look at endianness.h
it has a lot of #defines and some of them define the swaphosttolittle stuff

maybe your pc fits in one of the categories but isn't properly targetted by the #defines

perhaps it defines __APPLE__ and isntead shouldbe linux which is "everything else" or vice versa
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
Guest

Post by Guest »

hellcatv said:

#defines and some of them define the swaphosttolittle stuff

Yeah, but if you read my comment above, you see that (as far as I can see) it defines it _INCORRECTLY_. I did the changes I outlined above and it
compiled fine.

To reiterate:

Now, having a look in endianness.h, I see that we have a couple of lines that use the confidence filling function:

`DONTUSE__NXSwapBigDoubleToLittle'

but in endiannes.cpp we define:

DONTUSE__NXSwapBigDoubleToLittleEndian

Basically it looks like someone forgot to add 'Endian' to the end of the #defines in endianness.h :) :) :).

If you fix the #define to actually refer to the right thing it works fine.

Maybe I should submit a bug over this/
korg
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Fri Feb 27, 2004 2:42 am

Post by korg »

(That last comment was me. I forgot to log in :-/)
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

I understand now--thanks for the fix
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
Post Reply