scorched3d linux installation

Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: scorched3d linux installation
PostPosted: Thu Oct 18, 2007 4:30 am 
Uncooked
Not Signed Up For Stats

Joined: Thu Oct 18, 2007 4:05 am
Posts: 5
Hi,

I have been trying to get scorhed3d to work for awhile.
at first I was getting an configure error that fftw was not found.
then I found a post on this forum saying that fftw needed "--enable-float" but that just changed the configure error wording. (still says fftw is missing) passing the location of fftw libs/includes to configure does nothing.
weather or not fftw is compiled with "--enable-float" skiping the fftw test on scorched3d gives the following error at make.

../common/NumberParser.cpp: In member function 'fixed NumberParser::getValue(ScorchedContext&)':
../common/NumberParser.cpp:131: error: call of overloaded 'fixed(size_t)' is ambiguous
../common/fixed.h:66: note: candidates are: fixed::fixed(const char*) <near>
../common/fixed.h:61: note: fixed::fixed(int)
../common/fixed.h:56: note: fixed::fixed(long int)
../common/fixed.h:51: note: fixed::fixed(unsigned int)
../common/fixed.h:41: note: fixed::fixed(const fixed&)
make[2]: *** [NumberParser.o] Error 1
make[2]: Leaving directory `/home/normuser/app-installers/scorched/src/scorched'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/normuser/app-installers/scorched/src'
make: *** [all-recursive] Error 1

this was with scorched3d-41 on slamd64 linux with the 2.6.16.29 kernel


Top
 Profile  
 
 Post subject: build error in x86_64?
PostPosted: Thu Oct 18, 2007 4:56 am 
User avatar
Crispy

Current Scorched3D Rank: Unranked




Joined: Fri Dec 29, 2006 7:49 pm
Posts: 76
Location: ID
the same error happens to me when i tried building s3d 41 in opensuse 10.2 x86_64 & 10.3 x86_64. the fftw is detected properly thought.

a different error happens in openSUSE 10.3 i586, i think it something to do with wxGTK.

btw, i only succeeded building s3d v41 in opensuse 10.2 i586

build logs attached.


Attachments:
File comment: build log for opensuse 10.3 i586
s3d41_opensuse_10.3_i586.txt [173.89 KiB]
Downloaded 154 times
File comment: build log for opensuse 10.3 x86_64
s3d41_opensuse_10.3_x86_64.txt [92.86 KiB]
Downloaded 130 times
File comment: build log for opensuse 10.2 x86_64
s3d41_opensuse_10.2_x86_64.txt [52 KiB]
Downloaded 146 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 18, 2007 11:36 am 
User avatar
Burned to a crisp

Current Scorched3D Rank: Unranked





Joined: Sun Sep 03, 2006 11:08 am
Posts: 268
Location: Latvia
As for the openSUSE 10.3 i586 error, Brain Damage mentioned in another thread that Scorched3D fails to build with wxWidgets 2.8.

For the "call of overloaded 'fixed(size_t)' is ambiguous" errors, I think you would just need to cast the parameter to one of the listed types (int, long int, unsigned int, etc), but I have no idea how to do it the proper C++ way. For what it's worth, the discouraged -- and probably broken in C++ anyway -- C way would be to simply add "(type to cast to)" before the variable, for example, change
Code:
fixed(operands_.size())
to
Code:
fixed((int) operands_.size())


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 18, 2007 1:03 pm 
User avatar
Site Admin
Not Signed Up For Stats

Joined: Mon Aug 04, 2003 4:09 pm
Posts: 4771
Location: Scotland
parasti wrote:
As for the openSUSE 10.3 i586 error, Brain Damage mentioned in another thread that Scorched3D fails to build with wxWidgets 2.8.

For the "call of overloaded 'fixed(size_t)' is ambiguous" errors, I think you would just need to cast the parameter to one of the listed types (int, long int, unsigned int, etc), but I have no idea how to do it the proper C++ way. For what it's worth, the discouraged -- and probably broken in C++ anyway -- C way would be to simply add "(type to cast to)" before the variable, for example, change
Code:
fixed(operands_.size())
to
Code:
fixed((int) operands_.size())


That is the correct fix however I would use (unsigned int).
I'll have a look at adding wx2.8 support soon.
Not sure why fftw is causing issues, it worked 1st time for me (we do use it in float mode, not double mode don't know if that makes a difference).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 18, 2007 1:53 pm 
User avatar
Crispy

Current Scorched3D Rank: Unranked




Joined: Fri Dec 29, 2006 7:49 pm
Posts: 76
Location: ID
thanks.

gonna make the diff file as soon as i get to my linux box.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 22, 2007 8:16 pm 
Uncooked
Not Signed Up For Stats

Joined: Thu Oct 18, 2007 4:05 am
Posts: 5
Thanks for the help with that parasti and gcamp.

I've gotten much closer to getting scorched3d to compile.
I had to replace some old school wxwidgets code that was calling wxNotebookSizer which doesnt exist any more.
I also had to change a few int's to long because they were being cast from a void (on a 64 bit system void is 64 bit and int is 32 bit).
but now I'm stuck on the following error:

../GLEXT/GLJpg.cpp:162: undefined reference to `jpeg_std_error(jpeg_error_mgr*)'
../GLEXT/GLJpg.cpp:163: undefined reference to `jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned long)'
../GLEXT/GLJpg.cpp:178: undefined reference to `jpeg_resync_to_restart(jpeg_decompress_struct*, int)'
../GLEXT/GLJpg.cpp:185: undefined reference to `jpeg_read_header(jpeg_decompress_struct*, int)'
../GLEXT/GLJpg.cpp:186: undefined reference to `jpeg_start_decompress(jpeg_decompress_struct*)'
../GLEXT/GLJpg.cpp:227: undefined reference to `jpeg_finish_decompress(jpeg_decompress_struct*)'
../GLEXT/GLJpg.cpp:228: undefined reference to `jpeg_destroy_decompress(jpeg_decompress_struct*)'
../GLEXT/GLJpg.cpp:204: undefined reference to `jpeg_read_scanlines(jpeg_decompress_struct*, unsigned char**, unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [scorched3dc] Error 1
make[2]: Leaving directory `/home/normuser/app-installers/scorched2/scorched/src/scorchedc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/normuser/app-installers/scorched2/scorched/src'
make: *** [all-recursive] Error 1

But libjpeg.so is there. any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 22, 2007 8:53 pm 
User avatar
Reduced to ashes
Not Signed Up For Stats

Joined: Fri Jan 06, 2006 12:11 am
Posts: 639
Location: The Dark Side of the Earth
normuser wrote:
But libjpeg.so is there. any ideas?

http://www.scorched3d.co.uk/phpBB2/viewtopic.php?t=4728
Proudly without signature :P

Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 6:32 pm 
Uncooked
Not Signed Up For Stats

Joined: Thu Oct 18, 2007 4:05 am
Posts: 5
OK,

I put the extern "C" around the jpeglib include and finally got scorched to compile, but then it segfaulted with:
#2 0x00002b8719b5cdd4 in vsnprintf () from /lib64/tls/libc.so.6
#3 0x00000000004259e5 in formatStringList (
format=0x6c26ff "GL_EXTENSIONS:%s", ap=0x7fffffb8e750)
at ../common/DefinesString.cpp:49
because there was no va_copy call before vsnprintf.
after adding va_copy it now runs, but there is something wrong with the graphics. the landscape seems to be floating above the water and if I try to move the camera closer or zoom in the image changes to just a square gray field. everything else works.

The source files I had to modify are attached if enyone wants to try it. (these source files will only work with a 64bit OS and an version of wxwidgets from after wxnotebooksizer was deprecated (2.5.x I think?))


Attachments:
File comment: modified src files
src.tar.gz [19.79 KiB]
Downloaded 146 times
Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 7:20 pm 
User avatar
Site Admin
Not Signed Up For Stats

Joined: Mon Aug 04, 2003 4:09 pm
Posts: 4771
Location: Scotland
Thanks normuser, the changes in the patch have already been added to CVS.

Edit: Except the extern c for libjpeg, I wonder if that is correct for all systems.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 8:07 pm 
User avatar
Crispy

Current Scorched3D Rank: Unranked




Joined: Fri Dec 29, 2006 7:49 pm
Posts: 76
Location: ID
kowal wrote:
thanks.

gonna make the diff file as soon as i get to my linux box.

i successfully compile s3d v41 in opensuse 10.2 (i586 & x86_64) and opensuse 10.3 (i586 & x86_64).

available here:
http://software.opensuse.org/search?p=1 ... roject=ALL

but failed on older suse version (10.0 - 10.1)
Code:
../GLEXT/GLImage.cpp:70: error: 'memcpy' was not declared in this scope


the complete build log attached.


Attachments:
s3d41_opensuse_10.0-10.1_all_arch.txt.tar.bz2 [17.67 KiB]
Downloaded 143 times
Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 8:53 pm 
Uncooked
Not Signed Up For Stats

Joined: Thu Oct 18, 2007 4:05 am
Posts: 5
Quote:
../GLEXT/GLImage.cpp:70: error: 'memcpy' was not declared in this scope


Try adding string.h to the includes in GLImage.cpp


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 12:58 am 
User avatar
Site Admin
Not Signed Up For Stats

Joined: Mon Aug 04, 2003 4:09 pm
Posts: 4771
Location: Scotland
Looking at the libjpeg header it seems that if __cplusplus is defined by the compiler then the extern tags are added for you.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 6:45 am 
User avatar
Crispy

Current Scorched3D Rank: Unranked




Joined: Fri Dec 29, 2006 7:49 pm
Posts: 76
Location: ID
normuser wrote:
Quote:
../GLEXT/GLImage.cpp:70: error: 'memcpy' was not declared in this scope


Try adding string.h to the includes in GLImage.cpp

thanks, all builds succeded.

now i need someone to test them :)

http://software.opensuse.org/search?p=1 ... roject=ALL


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group