On Aug 20, 2012, at 5:14, "Thomas Koch" <k...@orbiteam.de> wrote:

> Hi,
> I had some trouble with the windows build of this version: while building
> JCC 2.14 in my windows7-32 build env (python2.7,Java1.6,Microsoft Visual
> Studio 9.0 C++) the build fails on command
> 
> cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -D_java_generics
> -DJCC_VER="2.14" "-IC:\Program Files\Java\jdk1.6.0_06/include" "-IC:\Program
> Files\Java\jdk1.6.0_06/include/win32" -I_jcc -Ijcc/sources
> -IC:\Python27\include -IC:\Python27\PC /Tpjcc/sources/functions.cpp /Fo
> build\temp.win32-2.7\Release\jcc/sources/functions.obj -DPYTHON /EHsc
> /D_CRT_SECURE_NO_WARNINGS functions.cpp
> 
> with error:   jcc/sources/functions.cpp(17) : fatal error C1083: Datei
> (Include) kann nicht geöffnet werden: "arpa/inet.h": No such file or
> directory

Oops. Yes, this needs to be fixed with some conditional include.
Thank you for reporting this.

Andi..

> error: command '"C:\Program Files\Microsoft Visual Studio
> 9.0\VC\BIN\cl.exe"' failed with exit status 2
> 
> I noticed that
> pylucene-3.6.1-1\jcc\jcc\sources\function.cpp
> line17 states
> #include <arpa/inet.h>
> whereas this line is missing in
> pylucene-3.6.0-2\jcc\jcc\sources\function.cpp
> 
> There is no 'arpa' folder in either my 
> <Java\jdk>\include 
> nor
> <Java\jdk>\include\win32
> 
> So I commented the line and tried again - the functions.cpp can be compiled
> now but the final link step fails due to a missing reference. (externes
> Symbol "_htons@4" in Funktion ""struct _object * __cdecl
> makeInterface(struct _object *,struct _object *)" ) - so the include was
> necessary.
> 
> 
> The method makeInterface seems to be new in JCC 2.14 and uses the htons
> function  (host-to-network short - "converts from host to TCP/IP network
> byte order") - this defined in windows socket lib as well:
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms741394(v=vs.85).as
> px 
> 
> (On unix it's part of the standard C Library (libc.so, libc.a) on Windows
> it's part of  'Ws2_32.lib' - that's what I learned from Google today ,.-)
> 
> So one quick-fix is to
> a) replace
> #include <arpa/inet.h>
> by 
> #include <winsock2.h>
> In functions.cpp
> 
> And
> b) extend (line 136) in setup.py:
> 
>    'win32': ['/LIBPATH:%(win32)s/lib' %(JDK), 'jvm.lib',
> 'Ws2_32.lib'],
> 
> (Don't know where MS-VC finds that lib. It's not in windows-system - most
> likely it's from an installed Windows SDK  in C:/Program Files/Microsoft
> SDKs/Windows/v6.0A/Lib).
> 
> Then the setup.py build and install works fine. I could import jcc and
> initVM()  - haven't tried further with the lucene part so it could also be a
> dead end... (don't think so however).
> 
> 
> I finally tried with MinGW quickly but this fails (in JArray.cpp: see below)
> - could be a problem of my MinGW setup though.
> 
> So question is if MS-VC compiler should be further supported. In this case
> kind of #ifdef macro is required and possibly fine-tuning of setup.py
> 
> Otherwise I'd have to switch to MinGW on windows (and get this working)...
> Here's my MinGW issue (unrelated to above, but should be noted that MinGW
> compile functions.cpp without any error)
> 
> C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -D_java_generics
> -DJCC_VER="2.14" "-IC:\Program Files\Java\jdk1.6.0_06/include" "-IC:\Program
> Files\Java\jdk1.6.0_06/include/win32" -I_jcc -Ijcc/sources
> -IC:\Python27\include -IC:\Python27\PC -c jcc/sources/JArray.cpp -o
> build\temp.win32-2.7\Release\jcc\sources\jarray.o -DPYTHON
> -fno-strict-aliasing -Wno-write-strings jcc/sources/JArray.cpp: 
> In instantiation of `_t_JArray<_jobject*>':
> jcc/sources/JArray.cpp:610:   instantiated from `_t_jobjectarray<_jobject*>'
> jcc/sources/JArray.cpp:617:   instantiated from here
> jcc/sources/JArray.cpp:28: error: base `t_JArray<_jobject*>' with only
> non-default constructor in class without a constructor
> jcc/sources/JArray.cpp: In instantiation of `_t_jobjectarray<_jobject*>':
> jcc/sources/JArray.cpp:617:   instantiated from here
> jcc/sources/JArray.cpp:610: error: base `_t_JArray<_jobject*>' with only
> non-default constructor in class without a constructor
> ...
> 
> Note:
> - I get the same errors (in JArray.cpp) when trying to build JCC 2.13 with
> MinGW ('gcc version 3.4.5 - mingw-vista special r3')
> So it's not an issue of 3.6.1.1 (but probably wrong MinGW version or
> setup... of my local env.)
> - I was able to build JCC 2.13 on the same host with same env. (from
> 3.6.0-2) with MS-VC 9.0
> 
> Anyone succeeded to build  3.6.1 on Windows yet?
> 
> 
> Regards,
> Thomas 
> 
> 
>> -----Ursprüngliche Nachricht-----
>> Von: Andi Vajda [mailto:va...@apache.org]
>> Gesendet: Samstag, 18. August 2012 22:06
>> An: pylucene-dev@lucene.apache.org
>> Cc: gene...@lucene.apache.org
>> Betreff: [VOTE] Release PyLucene 3.6.1
>> 
>> 
>> The PyLucene 3.6.1-1 release tracking the (not so) recent release of
> Apache
>> Lucene 3.6.1 is ready.
>> 
>> A release candidate is available from:
>> http://people.apache.org/~vajda/staging_area/
>> 
>> A list of changes in this release can be seen at:
>> http://svn.apache.org/repos/asf/lucene/pylucene/branches/pylucene_3_6/
>> CHANGES
>> 
>> PyLucene 3.6.1 is built with JCC 2.14 included in these release artifacts:
>> http://svn.apache.org/repos/asf/lucene/pylucene/trunk/jcc/CHANGES
>> 
>> A list of Lucene Java changes can be seen at:
>> http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_3_6_1/lucen
>> e/CHANGES.txt
>> 
>> Please vote to release these artifacts as PyLucene 3.6.1-1.
>> 
>> Thanks !
>> 
>> Andi..
>> 
>> ps: the KEYS file for PyLucene release signing is at:
>> http://svn.apache.org/repos/asf/lucene/pylucene/dist/KEYS
>> http://people.apache.org/~vajda/staging_area/KEYS
>> 
>> pps: here is my +1
> 
> 

Reply via email to