#605 r13221 fails to build

SVN
closed-fixed
nobody
None
5
2011-11-08
2011-10-30
No

I'm trying to build VegaStrike on a stable Gentoo Linux system, but get stuck at this error:

depbase=`echo src/gfx/vsimage.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ g++ -DHAVE_CONFIG_H -I. -DBOOST_PYTHON_NO_PY_SIGNATURES -DBOOST_PYTHON_STATIC_LIB -I./boost/1_45 -DHAVE_SDL=1 -DSDL_WINDOWING=1 -DHAVE_AL=1 -DHAVE_OGG -DNV_CUBE_MAP=1 -DHAVE_FFMPEG -D__STDC_CONSTANT_MACROS -I/usr/include/python2.7 -DHAVE_PYTHON=1 -I./src -pipe -DNV_CUBE_MAP -O2 -ffast-math -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pthread -MT src/gfx/vsimage.o -MD -MP -MF $depbase.Tpo -c -o src/gfx/vsimage.o src/gfx/vsimage.cpp &&\ mv -f $depbase.Tpo $depbase.Po
src/gfx/vsimage.cpp: In member function 'VSFileSystem::VSError VSImage::WritePNG(unsigned char*)':
src/gfx/vsimage.cpp:870:10: error: invalid use of incomplete type 'struct png_struct'
/usr/include/png.h:822:16: error: forward declaration of 'struct png_struct'
make[1]: *** [src/gfx/vsimage.o] Error 1

Discussion

  • Klauss++

    Klauss++ - 2011-10-31

    It sounds like you have a misconfigured libpng.
    Make sure you have the devel versions of the libpng packages installed.

    What build system are you using? autotools? cmake? (if you do configure && make, it's autotools)
    The configure part should have complained about missing libpng

     
  • Klauss++

    Klauss++ - 2011-10-31
    • status: open --> pending
     
  • Myckel Habets

    Myckel Habets - 2011-10-31

    I'm using this build method: http://vegastrike.sourceforge.net/wiki/HowTo:Checkout_SVN_%28Ubuntu_Linux%29

    My system is Gentoo Linux, x86 stable. Recently libpng was bumped to 1.5, that might be the cause of this bug. Libpng should be fine because I was able to compile all installed packages against this version of libpng.

     
  • Myckel Habets

    Myckel Habets - 2011-10-31
    • status: pending --> open
     
  • Klauss++

    Klauss++ - 2011-10-31

    It is very likely libpng15 is not compatible with our source.
    libpng12 and 15 are quite different.

    Can you install libpng12?

     
  • Myckel Habets

    Myckel Habets - 2011-10-31

    1.5 is not compatible with 1.2 or 1.4, that is for sure. I see there is still a libpng-1.2 ebuild in tree. I'll have a check on that.

    Does VegaStrike support libpng 1.4 as well, or only libpng 1.2?

     
  • Klauss++

    Klauss++ - 2011-10-31

    I never checked with 1.4.
    But since it's packaged with a different soname, I would expect it to be incompatible as well.

     
  • Myckel Habets

    Myckel Habets - 2011-11-01

    I installed libpng-1.2, but it only installs the library, not the header files.
    The only solution for me seems to wait until VS supports libpng-1.4 or libpng-1.5 (according to the libpng site they should be compatible, unless deprecated features of 1.4 are used).

    You might want to adjust the configure scripts to check for the version of libpng it finds and gives a warning if 1.2 isn't found.

     
  • Myckel Habets

    Myckel Habets - 2011-11-01

    Changing the offending line into:

    if ( setjmp( png_jmpbuf(png_ptr) ) ) {

    seems to progress past this error. I don't know if this is the correct code at this place, I took it from the libpng site. I'll have a look this evening if compilation now succeeds completely.

     
  • Klauss++

    Klauss++ - 2011-11-01
    • status: open --> pending
     
  • Klauss++

    Klauss++ - 2011-11-01

    It's a problem with your distribution if it doesn't install libpng1.2's headers.
    You might want to report it.

    In any case, if they say 1.2 and 1.4 are compatible, you could try.
    If it warns against the use of deprecated stuff, post the output, we might be able to fix it.

     
  • Myckel Habets

    Myckel Habets - 2011-11-01

    libpng 1.2 is only provided for a few binary packages that need it. All other software is patched to use libpng 1.5.

    I've continued compiling the source with the setjmp change below and compilation is successful. VegaStrike seems to run fine with that change under libpng 1.5 (I removed libpng 1.2 from my system).

     
  • Myckel Habets

    Myckel Habets - 2011-11-01
    • status: pending --> open
     
  • Myckel Habets

    Myckel Habets - 2011-11-08
    • status: open --> closed-fixed
     
  • Myckel Habets

    Myckel Habets - 2011-11-08

    Thank you for pushing the fix into svn! I guess this bug can be closed now.

     


Anonymous

Cancel  Add attachments