On Mon, 10 Aug 2009, KK wrote:

As I mentioned earlier jcc got installed to dist-packages sub-directory of
python2.6, instead of site-packages,  and modifying the Makefile to reflect
that was not working porperly, so i simply created a sym link in
/usr/lib/python2.6 wiht a name "site-packages" and made it point to the
actual jcc installation (rather, faulty in my case) i.e
/usr/local/lib/python2.6/dist-packages.

You're making your system harder to debug by doing this. You should let Python use the same logic to find jcc (with -m) than was used to install it.

Then I used the normal process of
installation, make and make install without any errors. Importing lucene is
not giving any errors( so far) and i guess we've to load JVM before doing
anything else, right? using the lucene.initVM(lucene.CLASSPATH) statement.

If you don't use initVM() before anything else, you'll get an error.

And yes I've to add the ld path to my .bashrc file this ways, i guess this
is okey ( its working fine, without this it was giving errors saying
libjava.so not found), this is what i did:
 export
LD_LIBRARY_PATH=/usr/lib/jvm/java-6-openjdk/jre/lib/i386/:/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:$LD_LIBRARY_PATH

It's ok but using LD_LIBRARY_PATH a security issue. It's better to link the executables with -rpath as is done by default in jcc's setup.py.

Finally I'm done installing PyLucene on my box after fighting for 3-4 days.
Sounds stupid?Yes, but true in my case.


Thank you very much @ Christian & Andi

You're welcome !

Andi..


--KK


On Mon, Aug 10, 2009 at 4:37 PM, KK <dioxide.softw...@gmail.com> wrote:

Yes, jcc is under dist-packages.
I think I should comment the lines I commented out for linux as we're
going to  provide all those details from the command line, right?
I did the same and ruinning the commad you mentioned gave me the following
errors:

k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$ make ANT=ant
PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m jcc.__main__"
NUM_FILES=2
CFLAGS= /usr/bin/python2.6 -m jcc.__main__ --jar
lucene-java-2.2.0-578217/build/lucene-core-2.2.0-578217.jar --jar
lucene-java-2.2.0-578217/build/contrib/snowball/lucene-snowball-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/highlighter/lucene-highlighter-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/analyzers/lucene-analyzers-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/regex/lucene-regex-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/queries/lucene-queries-2.2.0-578217.jar
--jar build/jar/extensions.jar --package java.lang 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 --package java.util java.text.SimpleDateFormat --package
java.io java.io.StringReader java.io.InputStreamReader
java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token
--exclude org.apache.lucene.queryParser.TokenMgrError --exclude
org.apache.lucene.queryParser.ParseException --python lucene --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;' --version 2.2.0-578217
--files 2 --build
/usr/bin/python2.6: libjava.so: cannot open shared object file: No such
file or directory
make: *** [compile] Error 1
k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$

Any idea on how to resolve this error?

Thanks,
KK.


On Mon, Aug 10, 2009 at 4:25 PM, Christian Heimes <li...@cheimes.de>wrote:

KK schrieb:

Thanks Christian.
After installing python-dev i'm able to do the build for jcc and then
installed without gettig any error messages. Then from the main directory
i
changed the makefile and (surprisingly i dint see any site-packages
directory under python2.6, but i still modified the path for __init__.py
then running  "make"  downloaded lucene stuffs, I guess, and then gave me
some error messages like this:
<error snip>


[...]

 This cleary says that there is no __init__.py file, in fact as I
mentioned
earlier i couldn't find any site-packages directory under python2.6. Am I
doing something wrong? Whats the way out?

As a side note, I'm using open-jdk and not sun-jdk.


Where did JCC ended up? Perhaps it's in /usr/local/lib. Anyway you
shouldn't use an absolute path to call JCC. I suggest you use the python2.6
as interpreter and "-m jcc.__main__" as JCC argument:

make ANT=ant PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m
jcc.__main__" NUM_FILES=2

Christian




Reply via email to