softvolume.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
blob
Star Pilot
Star Pilot
Posts: 7
Joined: Tue May 23, 2006 9:51 pm

softvolume.cpp

Post by blob »

Hi,
I have been trying to build svn checkout from the last three days. I have also tried one from april the 29th, which is, according a previous thread, the last known to build. Below is the compiler output from where everything went wrong:


In file included from src/networking/softvolume.cpp:19:
src/networking/softvolume.h:35:36: warning: no newline at end of file
src/networking/softvolume.cpp:421:2: warning: no newline at end of file
src/networking/softvolume.cpp: In function 'long unsigned int interpolateF16F16(long unsigned int, long unsigned int, long unsigned int)':
src/networking/softvolume.cpp:70: error: '1' cannot be used as a function
src/networking/softvolume.cpp:70: error: expected primary-expression before 'unsigned'
src/networking/softvolume.cpp:70: error: expected `)' before 'unsigned'
src/networking/softvolume.cpp: In function 'short unsigned int mpyUS16F16(short unsigned int, long unsigned int)':
src/networking/softvolume.cpp:120: error: expected primary-expression before 'unsigned'
src/networking/softvolume.cpp:120: error: expected `)' before 'unsigned'
src/networking/softvolume.cpp: In function 'short int mpySS16F16(short int, long unsigned int)':
src/networking/softvolume.cpp:123: error: expected primary-expression before 'signed'
src/networking/softvolume.cpp:123: error: expected `)' before 'signed'
make[1]: *** [src/networking/softvolume.o] Error 1
make[1]: Leaving directory `/mnt/hda3/home/blob/Desktop.kde/vegastrike-svn/src/vegastrike/vegastrike'
make: *** [all] Error 2


I haven't seen anything about this error on the entire forum. I have searched on google for this, and all it could find was a (removed) page that has been written 2 years ago.
Help would be very much appreciated
You do not have the required permissions to view the files attached to this post.
Zeog
ISO Party Member
ISO Party Member
Posts: 453
Joined: Fri Jun 03, 2005 10:30 am
Location: Europe

Re: softvolume.cpp

Post by Zeog »

I'm sorry, I can't say anything helpful WRT your problem. But I'd like to correct that rumor:
blob wrote:I have also tried one from april the 29th, which is, according a previous thread, the last known to build.
I've successfully built a check out I made (version 10234) from two days ago on my system (kubuntu breezy). I'm just not reporting every successful build. Now we're at SVN version 10237. The softvolume.cpp has not changed since then. So, it's probably not the code's fault.
Last night I dreamed I ate an eight pound marshmallow. This morning my pillow was gone. Where is my pillow?
blob
Star Pilot
Star Pilot
Posts: 7
Joined: Tue May 23, 2006 9:51 pm

system stuff

Post by blob »

Maybe i should add some info about my system

I'm running archlinux with:

gcc 4.0.3
openal 0.0.8
freealut 1.0.1
sdl 1.2.10
xorg 7.0
freeglut 2.4.0
mesa 6.4.2
nvidia cgcompiler 1.4.1
cegui 0.4.1
ogre 1.2.0

Please tell if i forgot something
Zeog
ISO Party Member
ISO Party Member
Posts: 453
Joined: Fri Jun 03, 2005 10:30 am
Location: Europe

Post by Zeog »

I had a glance at the softvolume.cpp. It's doing a lot of 64 / 32 bit checking there. Do you have a 32bit or a 64bit system?
Last night I dreamed I ate an eight pound marshmallow. This morning my pillow was gone. Where is my pillow?
blob
Star Pilot
Star Pilot
Posts: 7
Joined: Tue May 23, 2006 9:51 pm

system stuff

Post by blob »

32 bit. My distro is i686 optimized.

I might also want to note that i'm using:

automake 1.9.6
autoconf 2.59
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

That's your SDL version.
Instead of defining SDL_HAS_64BIT_TYPE as the type itself, it's defining it as a 1 (as in - yes, you have a 64-bit type).

I can't try anything yet, so I won't commit anything like this until I get home, but you could apply the attached patch.

Alternatively, you could add the USE_FAST_F16MATH define to disable 64-bit arithmetic. (it will cost you one bit of precision on the output - not a big deal).
You do not have the required permissions to view the files attached to this post.
Last edited by klauss on Thu May 25, 2006 1:04 am, edited 1 time in total.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
blob
Star Pilot
Star Pilot
Posts: 7
Joined: Tue May 23, 2006 9:51 pm

sdl

Post by blob »

Hi,

Applying your patch resulted into the following error:

In file included from src/networking/softvolume.cpp:41:
src/networking/softvolume.h:35:36: warning: no newline at end of file
src/networking/softvolume.cpp: In function 'long unsigned int interpolateF16F16(long unsigned int, long unsigned int, long unsigned int)':
src/networking/softvolume.cpp:92: error: 'SDL_INT64' was not declared in this scope
src/networking/softvolume.cpp:92: error: expected primary-expression before 'unsigned'
src/networking/softvolume.cpp:92: error: expected `)' before 'unsigned'
src/networking/softvolume.cpp: In function 'short unsigned int mpyUS16F16(short unsigned int, long unsigned int)':
src/networking/softvolume.cpp:142: error: 'SDL_UINT64' was not declared in this scope
src/networking/softvolume.cpp:142: error: 'SDL_INT64' was not declared in this scope
src/networking/softvolume.cpp:142: error: expected primary-expression before 'unsigned'
src/networking/softvolume.cpp:142: error: expected `)' before 'unsigned'
src/networking/softvolume.cpp: In function 'short int mpySS16F16(short int, long unsigned int)':
src/networking/softvolume.cpp:145: error: 'SDL_INT64' was not declared in this scope
src/networking/softvolume.cpp:145: error: expected primary-expression before 'signed'
src/networking/softvolume.cpp:145: error: expected `)' before 'signed'
make[1]: *** [src/networking/softvolume.o] Error 1
make: *** [all] Error 2


At least we know what we're dealing with. Since i have no knowledge of c++ i can't make anything out of it myself, but all the other distro's will upgrade to the new sdl soon enough. I hope the developers will come across this problem before that happens.

I hope these error messages will provide you all the info you need.
You do not have the required permissions to view the files attached to this post.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Damn - I picked the wrong place to put that big #if/else block.
I'll fix it, and update the patch (so, please, revert to SVN, as the new patch will be based on a clean SVN checkout).

See? This is why I didn't want to commit it - I always mess up if I can't test-build.

Done - check the old post, the attachment has been updated.
If it works, it gets commited :)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
blob
Star Pilot
Star Pilot
Posts: 7
Joined: Tue May 23, 2006 9:51 pm

sdl

Post by blob »

We're allmost there. The error messages are getting shorter and shorter.


In file included from src/networking/softvolume.cpp:40:
src/networking/softvolume.h:35:36: warning: no newline at end of file
src/networking/softvolume.cpp: In function 'short int mpySS16F16(short int, long unsigned int)':
src/networking/softvolume.cpp:156: error: expected ';' before ')' token
src/networking/softvolume.cpp:156: error: expected primary-expression before ')' token
src/networking/softvolume.cpp:156: error: expected `;' before ')' token
make[1]: *** [src/networking/softvolume.o] Error 1
make[1]: Leaving directory `/mnt/hda3/home/blob/Desktop.kde/vegastrike-svn/src/v egastrike'
make: *** [all] Error 2
You do not have the required permissions to view the files attached to this post.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Oops - sorry.
My bad (sorry for all this trouble, but I should build and set up SDL 1.2.10 to be able to solve it myself, but doing that right now is... torublesome... on my end).

You have to remove the #undef SDL_HAS_64BIT_TYPE (there's only one - in the new #ifdef block).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
blob
Star Pilot
Star Pilot
Posts: 7
Joined: Tue May 23, 2006 9:51 pm

sdl

Post by blob »

It worked! You're a genieus
You do not have the required permissions to view the files attached to this post.
Post Reply