[pylucene-dev] PyLucene throws segmentation fault in Debian GNU/Linux

Andi Vajda vajda at osafoundation.org
Thu Feb 21 08:47:49 PST 2008


On Feb 20, 2008, at 22:42, Roopesh <roopesh.raj at gmail.com> wrote:

> Dear Sir,
>
>
> I have compiled PyLucene from source using gcc-3.2.2 in my Debian  
> system. But when I use it in my Turbogears project it crashes the  
> program with a Segmentation fault. Segmentation fault occurs when I  
> try to instantiate a Document (doc = Document()). What can be the  
> reason for this. Is it the problem with compilation process? Or is  
> it something to do with Turbogears?
>
> Given below are the changes I have done in the MakeFile of PyLucene.
>
> VERSION=2.2.0-1
> LUCENE_SVN_VER=549438
> LUCENE_VER=2.2.0-$(LUCENE_SVN_VER)
> LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/trunk
> PYTHON_VER=2.5
> #DB_VER=4.3.29
> #DB_VER=4.4.20
> #DB_VER=4.5.20
> PYLUCENE:=$(shell pwd)
> LUCENE=lucene-java-$(LUCENE_VER)
> #DB_LIB_VER=$(basename $(DB_VER))
>
>
> # Linux (with gcc 3.4.4 and libgcj statically linked)
>
> LD_LIBRARY_PATH=/usr/lib
>
> PREFIX=/usr
> PREFIX_PYTHON=/home/roopesh/Desktop/Python-2.5.1
> LIBDIR_NAME=lib
> GCJ_HOME=/usr/local/gcc-3.4.4
> GCJ_LIBDIR=$(GCJ_HOME)/$(LIBDIR_NAME)
> GCJ_STATIC=1
> LIB_INSTALL=libstdc++.so.6 libgcc_s.so.1
> ANT=ant
> PYTHON=/usr/lib/python2.5
>
>
> ifeq ($(OS),Linux)
> PYTHON_SITE=/usr/share/python-support
> PYTHON_INC=$(PREFIX_PYTHON)/Include
> PYLUCENE_LIB=$(BINDIR)/_PyLucene.so

Several problems here. You appear to be using gcj-pylucene which has  
been superseded by jcc-pylucene (see
http://pylucene.osafoundation.org for more info).
Also, gcc 3.2.2 is too old, gcj 3.4.x
(x >= 2) is required for gcj-pylucene.
And finally, the crash you describe could be related to calling a  
lucene API from an unitialized thread. With gcj-pylucene, this is  
tricky do right in a   web framework (search the list archives). With  
jcc-pylucene, you must call env.attachCurrentThread() first from  
threads other than the main thread.

Andi..

>
>
> Regards
> Roopesh
>
> _______________________________________________
> pylucene-dev mailing list
> pylucene-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/pylucene-dev/attachments/20080221/a1bd10b6/attachment.html


More information about the pylucene-dev mailing list