On 06/27/2011 07:22 PM, Stefan Weil wrote: > Am 27.06.2011 07:56, schrieb Roy Tam: >> 2011/6/27 Stefan Weil<w...@mail.berlios.de>: >>> Am 27.06.2011 04:37, schrieb TeLeMan: >>>> This patch breaks the compilation with --enable-vnc-png: >>>> >>>> CC ui/vnc-enc-tight.o >>>> In file included from /usr/include/png.h:518, >>>> from ui/vnc-enc-tight.c:34: >>>> /usr/include/pngconf.h:371: error: expected '=', ',', ';', 'asm' or >>>> '__attribute__' before '.' token >>>> /usr/include/pngconf.h:372: error: expected '=', ',', ';', 'asm' or >>>> '__attribute__' before 'include' >>>> make: *** [ui/vnc-enc-tight.o] Error 1 >>>> >>>> -- >>>> SUN OF A BEACH >>> I get the same compiler error when I run with --enable-vnc-png, >>> and the buildbots got it as well. In my last test, png support >>> was disabled, so I did not notice this problem. >>> >>> The png header files check for prior inclusion of setjmp.h >>> and have a really surprising way of telling that this happened >>> (instead of #error, they use illegal C code - a comment without >>> comment delimiters). >>> >> I wonder which libpng version do you use. Mine is 1.5.2 and it works >> here. > > The critical code is only active for linux (#ifdef __linux__ ... #endif). > I was using linbpng-1.2.42 (ubuntu) and libpng-1.2.44 (debian). > > You won't get the problem when compiling with MinGW.
>From pngconf.h * You can bypass this test if you know that your application uses exactly * the same setjmp.h that was included when libpng was built. Only define * PNG_SKIP_SETJMP_CHECK while building your application, prior to the * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK * while building a separate libpng library for general use. Paolo