Return-Path: Delivered-To: apmail-lucene-pylucene-dev-archive@minotaur.apache.org Received: (qmail 93510 invoked from network); 5 Oct 2010 18:50:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Oct 2010 18:50:05 -0000 Received: (qmail 31571 invoked by uid 500); 5 Oct 2010 18:50:05 -0000 Delivered-To: apmail-lucene-pylucene-dev-archive@lucene.apache.org Received: (qmail 31540 invoked by uid 500); 5 Oct 2010 18:50:04 -0000 Mailing-List: contact pylucene-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pylucene-dev@lucene.apache.org Delivered-To: mailing list pylucene-dev@lucene.apache.org Received: (qmail 31532 invoked by uid 99); 5 Oct 2010 18:50:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Oct 2010 18:50:04 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [66.159.224.220] (HELO ovaltofu.org) (66.159.224.220) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Oct 2010 18:49:57 +0000 Received: from [192.168.0.6] ([192.168.0.6]) (authenticated bits=0) by ovaltofu.org (8.14.4/8.14.4) with ESMTP id o95InUbO021363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Oct 2010 11:49:32 -0700 (PDT) Date: Tue, 5 Oct 2010 11:50:29 -0700 (PDT) From: Andi Vajda X-X-Sender: vajda@yuzu.local Reply-To: Andi Vajda To: pylucene-dev@lucene.apache.org cc: janssen@parc.com Subject: Re: Can't build 3.0.2 with gcc 4.5 and mingw/msys on Windows XP In-Reply-To: <55312.1286304230@parc.com> Message-ID: References: <55312.1286304230@parc.com> User-Agent: Alpine 2.01 (OSX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org On Tue, 5 Oct 2010, Bill Janssen wrote: > I'm trying to build JCC 2.6 (from the PyLucene 3.0.2 source bundle) with > GCC 4.5 on Windows XP using MinGW/msys. > > creating build\temp.win32-2.6\Release\jcc\sources > c:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -D_jcc_lib -DJCC_VER="2.6" "-IC:\Program Files\Java\jdk1.6.0_21\include" "-IC:\Program Files\Java\jdk1.6.0_21\include\win32" -I_jcc -Ijcc/sources -Ic:\Python26\include -Ic:\Python26\PC -c jcc/sources/jcc.cpp -o build\temp.win32-2.6\Release\jcc\sources\jcc.o -DPYTHON -fno-strict-aliasing -Wno-write-strings > jcc/sources/jcc.cpp: In function 'PyObject* initJCC(PyObject*)': > jcc/sources/jcc.cpp:337:48: error: cannot convert 'double' to 'const char*' for argument '1' to 'PyObject* PyString_FromString(const char*)' > error: command 'gcc' failed with exit status 1 > > I believe the #ifdef a few lines above needs to change from > > #ifdef _MSC_VER > > to > > #if defined(_MSC_VER) || defined(__WIN32) > > to match the similar #ifdefs elsewhere in the code. > > JCC_VER is a double on Windows but a string elsewhere? Odd. Probably because it lost "" somewhere like where the compiler was invoked from. -Dfoo=1.2 instead of -Dfoo="1.2". The verstring macro in the conditional you found fixes this. As you suggest, it should have the extra check for __WIN32 like elsewhere. Thanks ! Andi..