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

  • Author
    Posts
  • #5946

    drumz
    Participant

    I’m using Slackware 12.0. I installed wxGTK, OpenAL, freealut, and fftw using the slackbuilds from slackbuilds.org. On fftw I had to add “–enable-float” to configure. I also applied the fix from http://www.scorched3d.co.uk/phpBB2/viewtopic.php?t=4699 since I’ve got wxGTK 2.8.4 installed. There error I get when running make is:

    g++  -g -O2 -DS3D_DOCDIR="/usr/local/games/scorched3d/share/documentation" -DS3D_DATADIR="/usr/local/games/scorched3d/share" -DS3D_BINDIR="/usr/local/games/scorched3d/bin"  -L/usr/X11R6/lib -L/usr/X11R6 -L/usr/local/lib -o scorched3dc AddTarget.o (insert a ton more object files here) GLSLShaderSetup.o -lfftw3f  -lopenal   -lalut -lfreetype -lz -lGL -lGLU -lpthread  -logg  -lvorbis -lm -lvorbisfile -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lSDL_net -lz -lpng -ljpeg
    GLJpg.o: In function `GLJpg::loadFromBuffer(NetBuffer&, bool)':
    /home/erich/pkgs/scorched3d/scorched/src/scorchedc/../GLEXT/GLJpg.cpp:162: undefined reference to `jpeg_std_error(jpeg_error_mgr*)'
    /home/erich/pkgs/scorched3d/scorched/src/scorchedc/../GLEXT/GLJpg.cpp:163: undefined reference to `jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned int)'
    /home/erich/pkgs/scorched3d/scorched/src/scorchedc/../GLEXT/GLJpg.cpp:178: undefined reference to `jpeg_resync_to_restart(jpeg_decompress_struct*, int)'
    /home/erich/pkgs/scorched3d/scorched/src/scorchedc/../GLEXT/GLJpg.cpp:185: undefined reference to `jpeg_read_header(jpeg_decompress_struct*, int)'
    /home/erich/pkgs/scorched3d/scorched/src/scorchedc/../GLEXT/GLJpg.cpp:186: undefined reference to `jpeg_start_decompress(jpeg_decompress_struct*)'
    /home/erich/pkgs/scorched3d/scorched/src/scorchedc/../GLEXT/GLJpg.cpp:227: undefined reference to `jpeg_finish_decompress(jpeg_decompress_struct*)'
    /home/erich/pkgs/scorched3d/scorched/src/scorchedc/../GLEXT/GLJpg.cpp:228: undefined reference to `jpeg_destroy_decompress(jpeg_decompress_struct*)'
    /home/erich/pkgs/scorched3d/scorched/src/scorchedc/../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/erich/pkgs/scorched3d/scorched/src/scorchedc'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/erich/pkgs/scorched3d/scorched/src'
    make: *** [all-recursive] Error 1

    GLEXT/GLJpg is including jpeglib.h, which for me is in /usr/include. I have libjpeg-6b installed. All the “undefined references” listed above are present in /usr/include/libjpeg.h. Is usr/lib, libjpeg.so symlinks to libjpeg.so.62 which symlinks to libjpeg.so.62.0.0

    Any ideas as to why linkings is failing?

    #45788

    drumz
    Participant

    I managed to get it to compile by wrapping the include statement for jpeglib in an extern “C” statement.
    Change the following in src/GLEXT/GLJpg.cpp:


    extern "C" {
    #include
    }

    As mentioned it now compiles and I installed it. However, when I try to run it I get the following error:

    $ scorched3d
    Fatal Error: Mismatch between the program and library build versions detected.
    The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6),
    and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.4,compatible with 2.6).
    Aborted

    I suspect the wxGTK 2.8 fix I applied from http://www.scorched3d.co.uk/phpBB2/viewtopic.php?t=4699 wasn’t enough.

    #45789

    Brain Damage
    Participant

    @drumz wrote:

    The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6),
    and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.4,compatible with 2.6).

    as you can see, the wx source library you used to compile scorched3d, is slightly different from the one you have installed & precompiled; if you used your distro libraries, then i guess they did something wrong there

    if you compiled/installed the wxwidgets library yourself, then i’d suggect you to double check the ./configure flags you used

    #45790

    drumz
    Participant

    I did some more checking and I had wxWidgets and wxGTK installed. Come to find out they’re the same thing so I removed both of them and am reinstalling/compiling wxGTK and will then recompile scorched3d. I have a 1.3GHz Pentium-M, so this could take awhile…

    #45791

    drumz
    Participant

    I recompiled wxGTK with –enable-compat24 and then tried again. Now it works.

    Thanks for the help!

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

You must be logged in to reply to this topic.