As well, I would advice you to remove the shared libs from previous installation to avoid debugging problems with those libs in the future ;)
J.
Julien Anguenot wrote:
> Hi !
>
> Antonio Weber wrote:
>>> How did you install PyLucene ? Which version ? If from source try a
>>> "make check" within the source directory and check if you don't have any
>>> errors.
>>>
>>> We saw this case on some production instances. If you provide me enough
>>> information on your PyLucene installation including gcc version,
>>> binaries / sources etc... I will be able to help you to fix it.
>> I got PyLucene Sources version 1.9.1 from http://pylucene.osafoundation.org/
>> >From that package I changed these variables
>>
>> PREFIX=/usr/local (I think this has no effect this way)
>> PREFIX_PYTHON=/usr
>> SWIG=/usr/bin/swig
>> GCJ_HOME=/usr
>> GCJ_VER=4
>>
>> With this settings I compiled and installed it (make build && make install)
>>
>> To my environment:
>> Fedora Core 5
>> [EMAIL PROTECTED] ~]$ uname -a
>> Linux localhost.localdomain 2.6.17-1.2139_FC5 #1 Fri Jun 23 12:40:16 EDT
>> 2006 i686 i686 i386 GNU/Linux
>>
>> gcc version is 4.1.1
>> [EMAIL PROTECTED] ~]$ gcc --version
>> gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
>> Copyright (C) 2006 Free Software Foundation, Inc.
>>
>> Python version
>> [EMAIL PROTECTED] ~]$ python -vV
>> Python 2.4.3
>>
>>
>> Now i've done the make check in PyLucene and you're right, it has some
>> faults, here is the output:
>>
>> [EMAIL PROTECTED] PyLucene-src-1.9.1]# make test
>> find test -name 'test_*.py' | xargs -n 1 python
>> E
>> ======================================================================
>> ERROR: testSimilarity (__main__.SimilarityTestCase)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "test/test_Similarity.py", line 80, in testSimilarity
>> searcher.setSimilarity(SimpleSimilarity())
>> File "/home/antonio/devel/PyLucene-src-1.9.1/PyLucene.py", line 2890, in
>> setSimilarity
>> def setSimilarity(*args): return _PyLucene.Searcher_setSimilarity(*args)
>> JavaError: java.lang.NullPointerException
>>
>> ----------------------------------------------------------------------
>> Ran 1 test in 0.064s
>>
>> FAILED (errors=1)
>> .
>> ----------------------------------------------------------------------
>> Ran 1 test in 0.004s
>>
>> OK
>> .....
>> ----------------------------------------------------------------------
>> Ran 5 tests in 0.121s
>>
>> OK
>> .
>> ----------------------------------------------------------------------
>> Ran 1 test in 0.004s
>>
>> OK
>> ..
>> ----------------------------------------------------------------------
>> Ran 2 tests in 0.012s
>>
>> OK
>> .
>> ----------------------------------------------------------------------
>> Ran 1 test in 0.003s
>>
>> OK
>> .FF
>> ======================================================================
>> FAIL: testRangeFilterId (__main__.TestRangeFilter)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "test/test_RangeFilter.py", line 131, in testRangeFilterId
>> self.assertEqual(numDocs - 1, len(result), "all but last")
>> AssertionError: all but last
>>
>> ======================================================================
>> FAIL: testRangeFilterRand (__main__.TestRangeFilter)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "test/test_RangeFilter.py", line 228, in testRangeFilterRand
>> self.assertEqual(numDocs - 1, len(result), "all but biggest")
>> AssertionError: all but biggest
>>
>> ----------------------------------------------------------------------
>> Ran 3 tests in 0.018s
>>
>> FAILED (failures=2)
>> xargs: Prozeß python wurde durch das Signal 6 abgebrochen.
>> make: *** [test] Fehler 123
>
> ok. The problem here is the gcc version. PyLucene does not support GCC
> 4.x yet, it seems. For further information you may ask the PyLucene guys
> on their mailing list.
>
> I currently running the same Linux box as yours so follow what's below
> and you shoud be fine :
>
> To fix the problem install a gcc-3.4.4 from source, which is the
> officially supported version, on your system and recompile the PyLucene
> source against it.
>
> To compile the gcc here are the command line :
>
> - mkdir gcc-3.4.4
> - cd gcc-3.4.4
> - bunzip2 -c ../gcc-3.4.4.tar.bz2 | tar -xvf -
>
> - mkdir build
> - cd build
> - ../gcc-3.4.4/configure --enable-threads=posix
> --prefix=/usr/local/gcc-3.4.4 --enable-languages=c,c++,java
> - make bootstrap
> - sudo make install
>
> For more information : http://svn.osafoundation.org/pylucene/trunk/INSTALL
>
> It won't affect your current system with gcc 4.x this way.
>
> Then compile the PyLucene against it with a Makefile that would look
> like this way in your case :
>
> PREFIX=/usr/local (I think this has no effect this way)
> PREFIX_PYTHON=/usr
> SWIG=/usr/bin/swig
> GCJ_HOME=/usr/local/gcc-3.4.4
> GCJ_VER=3
>
> Then before launching PyLucene tests or NXLucene server do not forget to
> export the PyLucene related shared libs :
>
> $ export LD_LIBRARY_PATH=/usr/local/gcc-3.4.4/lib
> $ cd NXLucene/bin
> $ ./nxlucened start
>
>> By test in nxlucene (its the most recent from svn)
>> I get this output (thats because of the broken PyLucene installation I think)
>> [EMAIL PROTECTED] NXLucene]$ ./test.py -v -s nxlucene
>> Running tests from src
>> Running tests at level 1
>> Running unit tests:
>> Running:
>> .........................
>>
>> Failure in test test_batched_search
>> (nxlucene.tests.test_lucene_server.LuceneServerTestCase)
>> Traceback (most recent call last):
>> File "/usr/lib/python2.4/unittest.py", line 260, in run
>> testMethod()
>> File "src/nxlucene/tests/test_lucene_server.py", line 372, in
>> test_batched_search
>> self.assertEqual(len(self._server), 0)
>> File "/usr/lib/python2.4/unittest.py", line 333, in failUnlessEqual
>> raise self.failureException, \
>> AssertionError: 7 != 0
>>
>> ..Abgebrochen
>
> Should disappear with the new compiled PyLucene.
>
> [...]
>
> Keep us posted !
>
> Cheers,
>
> J.
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> cps-devel mailing list
> http://lists.nuxeo.com/mailman/listinfo/cps-devel
--
Julien Anguenot | Nuxeo R&D (Paris, France)
Open Source ECM - www.nuxeo.com
CPS Platform - http://www.cps-project.org
Mobile: +33 (0) 6 72 57 57 66
signature.asc
Description: OpenPGP digital signature
_______________________________________________ cps-devel mailing list http://lists.nuxeo.com/mailman/listinfo/cps-devel
