Oops. Never fails. I've attached the diff now.
-matthew
Matthew O'Connor [EMAIL PROTECTED] said:
> All,
>
> I got PyLucene 1.9rc1-7 to build and pass all tests on
> Debian stable (Sarge). I had some trouble at first but I
> got it to go. I know others have gotten it to work but I
> didn't see any recent success stories in the archives, so I
> thought I'd share mine.
>
> To build PyLucene 1.9rc1-7 you need the following packages
> installed:
>
> gcj-3.4 (>= 3.4.3-13)
> libgcj5-dev (>= 3.4.3-13)
> swig (>= 1.3.24-1)
> python2.4-dev (>= 2.4.1-2)
> libgcj5 (>= 3.4.3-13)
> python2.4 (>= 2.4.1-2)
>
> The version numbers in the parens are the versions I used
> and which were available to me through Sarge. These
> versions are unlikely to change in Sarge unless there are
> security patches.
>
> To run PyLucene 1.9rc1-7 (after it is built) you only need
> the following packages, which were listed above:
>
> libgcj5 (>= 3.4.3-13)
> python2.4 (>= 2.4.1-2)
>
> Once you have the listed packages installed you will have to
> modify the Makefile. Find the the "Linux" section and set
> the following values:
>
> PREFIX=/usr
> PREFIX_PYTHON=$(PREFIX)
> SWIG=$(PREFIX)/bin/swig
> GCJ_HOME=/usr
> GCJ_VER=3
>
> You may leave the DB, PREFIX_DB, and ANT things commented
> out (unless, of course, you want the Berkeley DB stuff. I
> didn't bother with that).
>
> On Line 159 of the Makefile, where CCFLAGS is set for Linux
> w/o Debugging, I set it to the following:
>
> CCFLAGS=-O2 -fPIC -I/usr/lib/gcc/i486-linux/3.4.4/include
>
> That differs from what you'll already see there in that I
> added a -I option to point to where some of GCJ's include
> files. Without this I was having issues finding certain
> include files.
>
> In Debian gcj 3.4 is invoked by the command "gcj-3.4". So
> we have to update another part of the Makefile which was
> assuming the command was just "gcj". On lines 202 and 203
> of the Makefile I set the following:
>
> JCC=$(GCJ_HOME)/bin/gcj-3.4
> JCCH=$(GCJ_HOME)/bin/gcjh-3.4
>
> That is, all I did was append "-3.4" to the gcj and gcjh
> commands. This section of the Makefile sets the GCJ
> compiler for operating systems other than FreeBSD.
>
> Now type "make" and everything builds. To run the tests you
> need to use Python 2.4. In Sarge Python 2.4 is run with the
> command "python2.4". To get the tests to run you'll need to
> update the Makefile again.
>
> On lines 792, 795, and 796 change the word "python" to
> "python2.4". Now you should be able to run the tests with
> "make test" and have them all pass.
>
> You should be able to install without any modifications to
> the Makefile. Just "sudo make install". Remember you'll
> need to make sure you're using python2.4 to use PyLucene.
> In Debian Stable /usr/bin/python is 2.3 and that won't work.
>
> I've attached my Makefile diff to this email. I've also
> built a Debian package for this. It's not an official
> package, just something quick I put together. I can put it
> somewhere if people are interested but I suppose 1.9 is a
> moving target and so it is probably of limited value.
>
> FWIW, I have no experience with Java or Lucene and I've only
> done a few small toy things with PyLucene. It doesn't
> segfault, explode, or otherwise appear to malfunction. So,
> WFM, YMMV, etc.
>
> -matthew
> _______________________________________________
> pylucene-dev mailing list
> [email protected]
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>
--- Makefile.original 2006-02-02 10:21:25.000000000 -0500
+++ Makefile 2006-02-02 10:21:35.000000000 -0500
@@ -75,11 +75,11 @@
#ANT=ant
# Linux
-#PREFIX=/usr/local
-#PREFIX_PYTHON=$(PREFIX)
-#SWIG=$(PREFIX)/bin/swig
-#GCJ_HOME=/usr/local
-#GCJ_VER=3
+PREFIX=/usr
+PREFIX_PYTHON=$(PREFIX)
+SWIG=$(PREFIX)/bin/swig
+GCJ_HOME=/usr
+GCJ_VER=3
#DB=$(PYLUCENE)/db-$(DB_VER)
#PREFIX_DB=$(PREFIX)/BerkeleyDB.$(DB_LIB_VER)
#ANT=ant
@@ -156,7 +156,7 @@
CCFLAGS=-O0 -g -fPIC
LDFLAGS=-g
else
-CCFLAGS=-O2 -fPIC
+CCFLAGS=-O2 -fPIC -I/usr/lib/gcc/i486-linux/3.4.4/include
LDFLAGS=
endif
else
@@ -199,8 +199,8 @@
ifneq ($(OS),FreeBSD)
CC=$(GCJ_HOME)/bin/gcc
CXX=$(GCJ_HOME)/bin/g++
-JCC=$(GCJ_HOME)/bin/gcj
-JCCH=$(GCJ_HOME)/bin/gcjh
+JCC=$(GCJ_HOME)/bin/gcj-3.4
+JCCH=$(GCJ_HOME)/bin/gcjh-3.4
endif
ifeq ($(GCJ_VER),3)
@@ -789,11 +789,11 @@
endif
samples/LuceneInAction/index:
- cd samples/LuceneInAction; python index.py
+ cd samples/LuceneInAction; python2.4 index.py
test: samples/LuceneInAction/index
- find test -name 'test_*.py' | xargs -n 1 python
- ls samples/LuceneInAction/*Test.py | xargs -n 1 python
+ find test -name 'test_*.py' | xargs -n 1 python2.4
+ ls samples/LuceneInAction/*Test.py | xargs -n 1 python2.4
distrib::
tar --exclude .svn \
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev