You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Ed...@VerizonWireless.com on 2009/06/10 15:24:20 UTC

JCC on Cygwin windows

importing jcc is throwing Import error for not finding init_jcc, indicating either JCC is not built right or runtime is not right.  JCC was built with only warnings using gcc 4.4 on Cygwin windows. details of  gcc, and JCC import error.

$ gcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: ../gcc-4.4.0/configure --enable-languages=c,c++
Thread model: single
gcc version 4.4.0 (GCC) 

$ python
Python 2.5.2 (r252:60911, Dec  2 2008, 09:26:14) 
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import jcc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/JCC-2.1-py2.5-cygwin-1.5.25-i686.egg/jcc/__init__.py", line 31, in <module>
    from _jcc import initVM
ImportError: dynamic module does not define init function (init_jcc)
>>> 

how to get a working JCC for python running in Cygwin windows to try PyLucene, or how to get a working PyLucene.

thanks in advance
Edwin


The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure.  If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof.  Thank you.


Re: JCC on Cygwin windows

Posted by Andi Vajda <va...@apache.org>.
On Wed, 10 Jun 2009, Edwin.Madari@VerizonWireless.com wrote:

> importing jcc is throwing Import error for not finding init_jcc, indicating either JCC is not built right or runtime is not right.  JCC was built with only warnings using gcc 4.4 on Cygwin windows. details of  gcc, and JCC import error.
>
> $ gcc -v
> Using built-in specs.
> Target: i686-pc-cygwin
> Configured with: ../gcc-4.4.0/configure --enable-languages=c,c++
> Thread model: single
> gcc version 4.4.0 (GCC)
>
> $ python
> Python 2.5.2 (r252:60911, Dec  2 2008, 09:26:14)
> [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import jcc
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/usr/lib/python2.5/site-packages/JCC-2.1-py2.5-cygwin-1.5.25-i686.egg/jcc/__init__.py", line 31, in <module>
>    from _jcc import initVM
> ImportError: dynamic module does not define init function (init_jcc)
>>>>
>
> how to get a working JCC for python running in Cygwin windows to try 
> PyLucene, or how to get a working PyLucene.

  Edwin,

If you can get this all to work with the cygwin compiler chain that's great. 
Please contribute potential patches back and your platform of choice will be 
supported. As it is, no one - at least that I know of - is using the cygwin 
compiler chain to build and use PyLucene with JCC on Windows.

At this point you can decide if you'd like to get it to work - and that's 
going to be taking some extra work from you since no one else on this list 
has stepped forward with solutions - or you can switch to the compiler most 
everyone else using PyLucene/JCC on Windows is using which is some version 
of Microsoft's Visual C++. When I test PyLucene on Windows, I use MSVC 7.1 
on Windows 2000. Newer configurations are known to work just as well.

There even is a free (as in $) version of that compiler available:
    http://www.microsoft.com/express/download/

If you go this route, be sure to use a version of Python that was compiled 
with MSVC (or build it yourself).

I know of another person using yet another compiler on Windows called 
MinGW and, as far as I know, they got it to work. I don't have the details
but I'm sure if you ask on this list, they'd provide what they know.

On another note, you seem to be using JCC 2.1, why ?
The current version is 2.3.

Andi..