/suzan
Sent from Nepal

On Mon, Sep 14, 2009 at 11:45 PM, TJ Ninneman <t...@twopeasinabucket.com>wrote:

> Sujan,
>
> Try the following at the command prompt before running python:
>
> # ldconfig -m /usr/local/jdk1.6.0/jre/lib/amd64
> # ldconfig -m /usr/local/jdk1.6.0/jre/lib/amd64/server
>
> When i run the above commands, it returned nothing.
But I have solved my problem. I run the jcc command manually and everything
worked. I collected all the jar files built in a directory and I run the
command:

python -m jcc --jar lucene-core-2.4.1.jar --jar lucene-analyzers-2.4.1.jar
--jar lucene-snowball-2.4.1.jar --jar lucene-highlighter-2.4.1.jar --jar
lucene-regex-2.4.1.jar --jar lucene-queries-2.4.1.jar --jar
lucene-instantiated-2.4.1.jar --jar extensions.jar --package java.lang
--package java.util --package java.io java.lang.System java.lang.Runtime
java.lang.Boolean java.lang.Byte java.lang.Character java.lang.Integer
java.lang.Short java.lang.Long java.lang.Double java.lang.Float
java.text.SimpleDateFormat java.io.StringReader java.io.InputStreamReader
java.io.FileInputStream java.util.Arrays --exclude
org.apache.lucene.queryParser --exclude
org.apache.lucene.queryParser.TokenMgrError --exclude
org.apache.lucene.queryParser.ParseException --python lucene --version 2.4.1
--mapping org.apache.lucene.document.Document
'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping java.util.Properties
'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --sequence
org.apache.lucene.search.Hits 'length:()I'
'doc:(I)Lorg/apache/lucene/document/Document;' --files 2 --build --module
collections.py --install

 Thanks TJ.

> Obviously, the path may vary so customize those to your platform and java
> version.
>
> TJ
>
>
> On Sep 14, 2009, at 2:35 AM, Sujan Shakya wrote:
>
>  I have been trying to install PyLucene on FreeBSD for 1 week and have not
>> succeeded yet. So please kindly help me out.
>>
>> Installation of jcc would succeed successfully, but while importing jcc I
>> got the following error:
>>
>>  File
>> "/usr/local/lib/python2.5/site-packages/JCC-2.3-py2.5-freebsd-LogEx-i386.egg/jcc/__init__.py",
>> line 29, in <module>
>>   from _jcc import initVM
>>
>> And once i make pylucene, the following error would occur:
>>
>> Traceback (most recent call last):
>>  File "/usr/local/lib/python2.5/runpy.py", line 95, in run_module
>>   filename, loader, alter_sys)
>>  File "/usr/local/lib/python2.5/runpy.py", line 52, in _run_module_code
>>   mod_name, mod_fname, mod_loader)
>>  File "/usr/local/lib/python2.5/runpy.py", line 32, in _run_code
>>   exec code in run_globals
>>  File
>>
>> "/usr/local/lib/python2.5/site-packages/JCC-2.3-py2.5-freebsd-LogEx-i386.egg/jcc/__init__.py",
>> line 27, in <module>
>>   import jcc.__main__
>>  File
>>
>> "/usr/local/lib/python2.5/site-packages/JCC-2.3-py2.5-freebsd-LogEx-i386.egg/jcc/__init__.py",
>> line 29, in <module>
>>   from _jcc import initVM
>> ImportError: Shared object "libverify.so" not found, required by
>> "libjava.so"
>> *** Error code 255
>>
>> Stop in /storage/misc/pylucene/pylucene-2.4.1-1.
>>
>> So I searched for libverify.so on the local machine and it was found on
>> /usr/local/lib/. So I copied /usr/local/lib/libverify.so to
>> /lib/libverify.so.
>>
>> After this I run make inside pylucene. And after this "import -m jcc" did
>> not displayed any error.
>>
>> Then the 'make install' inside pylucene also ends successfully and 'import
>> lucene' did not emit any error either.
>>
>> But when i run dir(lucene), there's too little modules than when i run
>> dir(lucene) on mac.
>>
>> When looking over the
>> site-packages/lucene-2.4.1-py2.5-freebsd-LogEx-i386.egg/lucene/, there
>> were
>> no any .jar files, where there should be 8 jar files, I guess.
>> So am i missing any classpaths for any jar files during make of pylucene ?
>>
>> My jcc/setup.py for freebsd looks like:
>>
>> JDK = {
>> 'freebsd7': '/usr/local/diablo-jdk1.6.0',
>> }
>> INCLUDES = {
>> 'freebsd7': ['%(freebsd7)s/include' %(JDK),
>>      '%(freebsd7)s/include/freebsd' %(JDK)],
>> }
>> CFLAGS = {
>> 'freebsd7': ['-fno-strict-aliasing', '-Wno-write-strings'],
>> }
>> DEBUG_CFLAGS = {
>> 'freebsd7': ['-O0', '-g', '-DDEBUG'],
>> }
>> LFLAGS = {
>> 'freebsd7': ['-L%(freebsd7)s/jre/lib/i386' %(JDK), '-ljava',
>>      '-L%(freebsd7)s/jre/lib/i386/client' %(JDK), '-ljvm',
>>
>> '-Wl,-rpath=%(freebsd7)s/jre/lib/i386:%(freebsd7)s/jre/lib/i386/client'
>> %(JDK)],
>> }
>> JAVAC = {
>> 'freebsd7': ['javac'],
>> }
>>
>> And pylucene/Makefile looks like:
>>
>> # FreeBSD
>> PREFIX_PYTHON=/usr/local
>> ANT=ant
>> PYTHON=$(PREFIX_PYTHON)/bin/python
>> JCC=$(PYTHON) -m jcc
>> NUM_FILES=2
>>
>>
>> Any help will be greatly appreciated.
>>
>> Thanks.
>>
>> /suzan
>>
>
>

Reply via email to