This topic contains 11 replies, has 0 voices, and was last updated by  kowal 10 years, 1 month ago.

  • Author
    Posts
  • #5921

    normuser
    Participant

    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*)
    ../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

    #45583

    kowal
    Participant

    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.

    #45584

    parasti
    Participant

    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

    fixed(operands_.size())

    to

    fixed((int) operands_.size())
    #45585

    imported_gcamp
    Participant

    @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

    fixed(operands_.size())

    to

    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).

    #45586

    kowal
    Participant

    thanks.

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

    #45587

    normuser
    Participant

    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?

    #45588

    Brain Damage
    Participant

    @normuser wrote:

    But libjpeg.so is there. any ideas?

    http://www.scorched3d.co.uk/phpBB2/viewtopic.php?t=4728

    #45589

    normuser
    Participant

    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?))

    #45590

    imported_gcamp
    Participant

    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.

    #45591

    kowal
    Participant

    @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&q=scorched3d&baseproject=ALL

    but failed on older suse version (10.0 – 10.1)

    ../GLEXT/GLImage.cpp:70: error: 'memcpy' was not declared in this scope

    the complete build log attached.

    #45592

    normuser
    Participant

    ../GLEXT/GLImage.cpp:70: error: ‘memcpy’ was not declared in this scope

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

    #45593

    imported_gcamp
    Participant

    Looking at the libjpeg header it seems that if __cplusplus is defined by the compiler then the extern tags are added for you.

    #45594

    kowal
    Participant

    @normuser wrote:

    ../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&q=scorched3d&baseproject=ALL

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.