From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcJ91-0000zK-M4 for qemu-devel@nongnu.org; Thu, 30 Jun 2011 11:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcJ8z-00032I-Cg for qemu-devel@nongnu.org; Thu, 30 Jun 2011 11:27:07 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:58090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcJ8z-000320-1c for qemu-devel@nongnu.org; Thu, 30 Jun 2011 11:27:05 -0400 Received: by qwj8 with SMTP id 8so1371001qwj.4 for ; Thu, 30 Jun 2011 08:27:04 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E0C95C1.1080402@redhat.com> Date: Thu, 30 Jun 2011 17:26:57 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <4DFC636D.9090800@mail.berlios.de> <20110623135202.GA12765@stefanha-thinkpad.localdomain> <4E03564A.5060201@mail.berlios.de> <4E07907F.1060703@mail.berlios.de> <4E0817B3.50109@mail.berlios.de> <4E08BC3A.1070708@mail.berlios.de> In-Reply-To: <4E08BC3A.1070708@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] fix MinGW compilation when --enable-vnc-jpeg is specified List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel , Roy Tam On 06/27/2011 07:22 PM, Stefan Weil wrote: > Am 27.06.2011 07:56, schrieb Roy Tam: >> 2011/6/27 Stefan Weil: >>> 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