|
Jiang Fung Wong
2011-11-13, 10:10
Andi Vajda
2011-11-13, 18:20
Jiang Fung Wong
2011-11-14, 03:15
Andi Vajda
2011-11-14, 03:20
Jiang Fung Wong
2011-11-15, 02:13
Bill Janssen
2011-11-19, 19:27
|
-
pylucene compilation error - reserved keywordsJiang Fung Wong 2011-11-13, 10:10
Dear All,
I tried to compile pylucene on ArchLinux. JCC compilation was fine. When I tried to make. I got this error: In file included from build/_lucene/org/apace/lucene/util/mutable/MutableValueFloat.h:4:0, from build/_lucene/__wrap01__.cpp:17795: build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:27: error: expected identifier before []mutable[] build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:35: error: expected unqualified-id before []([] token It seems that a reserved keyword 'mutable' has been used in the code. Any idea how to solve it? Which distro, ant version, python version, gcc version do you recommend, for compilation of the latest pyLucene? Regards, WJF
-
Re: pylucene compilation error - reserved keywordsAndi Vajda 2011-11-13, 18:20
On Nov 13, 2011, at 2:10, Jiang Fung Wong <[EMAIL PROTECTED]> wrote: > I tried to compile pylucene on ArchLinux. JCC compilation was fine. > When I tried to make. I got this error: > > In file included from > build/_lucene/org/apace/lucene/util/mutable/MutableValueFloat.h:4:0, > from build/_lucene/__wrap01__.cpp:17795: > build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:27: > error: expected identifier before []mutable[] > build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:35: > error: expected unqualified-id before []([] token > > It seems that a reserved keyword 'mutable' has been used in the code. What version of Lucene are you using ? I haven't seen this error yet with 3.x. > Any idea how to solve it? Yes, add mutable to the reserved word list by adding --reserved mutable to the jcc command line. > Which distro, ant version, python version, gcc version do you > recommend, for compilation of the latest pyLucene? distro: nothing in particular ant: whatever works for Lucene python: 2.x, x >= 4 gcc: whatever's current on your system Andi.. > > Regards, > WJF
-
Re: pylucene compilation error - reserved keywordsJiang Fung Wong 2011-11-14, 03:15
Thanks for the reply.
> What version of Lucene are you using ? I checked out from pylucene svn trunk, it's 4.0 Other info: latest ArchLinux 3.1.0-4-ARCH openjdk6 6.b22_1.10.4-1 gcc: 4.6.2 python: 2.6.7 jcc 2.11 ant 1.8.2-2 NO_SHARED Shall I use lucene 3.x ? > Yes, add mutable to the reserved word list by adding --reserved mutable to the jcc command line. Tried. It didn't help. I think the point is we need to make 'mutable' *not* a reserved word, so that the compiler does not complain. On Mon, Nov 14, 2011 at 2:20 AM, Andi Vajda <[EMAIL PROTECTED]> wrote: > > On Nov 13, 2011, at 2:10, Jiang Fung Wong <[EMAIL PROTECTED]> wrote: > >> I tried to compile pylucene on ArchLinux. JCC compilation was fine. >> When I tried to make. I got this error: >> >> In file included from >> build/_lucene/org/apace/lucene/util/mutable/MutableValueFloat.h:4:0, >> from build/_lucene/__wrap01__.cpp:17795: >> build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:27: >> error: expected identifier before []mutable[] >> build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:35: >> error: expected unqualified-id before []([] token >> >> It seems that a reserved keyword 'mutable' has been used in the code. > > What version of Lucene are you using ? > I haven't seen this error yet with 3.x. > >> Any idea how to solve it? > > Yes, add mutable to the reserved word list by adding --reserved mutable to the jcc command line. > >> Which distro, ant version, python version, gcc version do you >> recommend, for compilation of the latest pyLucene? > > distro: nothing in particular > ant: whatever works for Lucene > python: 2.x, x >= 4 > gcc: whatever's current on your system > > Andi.. > >> >> Regards, >> WJF >
-
Re: pylucene compilation error - reserved keywordsAndi Vajda 2011-11-14, 03:20
On Mon, 14 Nov 2011, Jiang Fung Wong wrote: > Thanks for the reply. > >> What version of Lucene are you using ? > > I checked out from pylucene svn trunk, it's 4.0 That's a bit bleeding edge due to the rapidly changing nature of Lucene's trunk 4.0. You should really use PyLucene's 3.x branch or 3.4 release. There is quite a bit of work involved in getting PyLucene to work with Lucene 4.0, mostly in porting all the samples and unit tests again since the API has changed a lot. I'm waiting for things to settle down a bit before embarking on this. FYI, a Lucene 3.5 release seems to be planned for the near future. > Other info: > latest ArchLinux 3.1.0-4-ARCH > openjdk6 6.b22_1.10.4-1 > gcc: 4.6.2 > python: 2.6.7 > jcc 2.11 > ant 1.8.2-2 > NO_SHARED > > Shall I use lucene 3.x ? Yes. That's the so-called stable trunk :-) Andi.. >> Yes, add mutable to the reserved word list by adding --reserved mutable to the jcc command line. > Tried. It didn't help. I think the point is we need to make 'mutable' > *not* a reserved word, so that the compiler does not complain. > > On Mon, Nov 14, 2011 at 2:20 AM, Andi Vajda <[EMAIL PROTECTED]> wrote: >> >> On Nov 13, 2011, at 2:10, Jiang Fung Wong <[EMAIL PROTECTED]> wrote: >> >>> I tried to compile pylucene on ArchLinux. JCC compilation was fine. >>> When I tried to make. I got this error: >>> >>> In file included from >>> build/_lucene/org/apace/lucene/util/mutable/MutableValueFloat.h:4:0, >>> from build/_lucene/__wrap01__.cpp:17795: >>> build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:27: >>> error: expected identifier before []mutable[] >>> build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:35: >>> error: expected unqualified-id before []([] token >>> >>> It seems that a reserved keyword 'mutable' has been used in the code. >> >> What version of Lucene are you using ? >> I haven't seen this error yet with 3.x. >> >>> Any idea how to solve it? >> >> Yes, add mutable to the reserved word list by adding --reserved mutable to the jcc command line. >> >>> Which distro, ant version, python version, gcc version do you >>> recommend, for compilation of the latest pyLucene? >> >> distro: nothing in particular >> ant: whatever works for Lucene >> python: 2.x, x >= 4 >> gcc: whatever's current on your system >> >> Andi.. >> >>> >>> Regards, >>> WJF >> >
-
Re: pylucene compilation error - reserved keywordsJiang Fung Wong 2011-11-15, 02:13
On Mon, Nov 14, 2011 at 11:20 AM, Andi Vajda <[EMAIL PROTECTED]> wrote:
> > On Mon, 14 Nov 2011, Jiang Fung Wong wrote: > >> Thanks for the reply. >> >>> What version of Lucene are you using ? >> >> I checked out from pylucene svn trunk, it's 4.0 > > That's a bit bleeding edge due to the rapidly changing nature of Lucene's > trunk 4.0. You should really use PyLucene's 3.x branch or 3.4 release. > > There is quite a bit of work involved in getting PyLucene to work with > Lucene 4.0, mostly in porting all the samples and unit tests again since the > API has changed a lot. I'm waiting for things to settle down a bit before > embarking on this. > > FYI, a Lucene 3.5 release seems to be planned for the near future. > Hi I have successfully installed on Debian. I encountered linker error on Arch that I couldn't solve. I wrote a guide. Below are the versions of various tools used when the pyLucene for this guide was compiled. Debian 6.0 Lucene 3.4 openjdk6 6b18 ant 1.8.0 gcc: 4.4.5 (!) python: 2.6.6 jcc 2.11 The Steps: 1. Upgrade the memory of the system to at least 1.25GB RAM. 2. update the index of package manager. apt-get update 3. install necessary packages using package manager apt-get install build-essential ant subversion python-dev openjdk-6-jdk python-setuptools 4. svn checkout http://svn.apache.org/repos/asf/lucene/pylucene/tags/pylucene_3_4_0 pylucene 5. cd pylucene/jcc 6. vi setup.py, review according to http://lucene.apache.org/pylucene/jcc/documentation/install.html (usually no change). 7. patch setuptools, you can skip this to trigger an error, and get the command hint: su -c 'patch -d /usr/lib/python2.6/dist-packages -Nup0 < /home/kakarukeys/pylucene/jcc/jcc/patches/<RELEVANT PATCH>' (might have errors) 8. python setup.py build 9. su -c 'python setup.py install' 10. cd .. 11. vi Makefile, configure prefixes, choose optional contrib modules # Debian Linux PREFIX_PYTHON=/usr ANT=ant PYTHON=$(PREFIX_PYTHON)/bin/python JCC=$(PYTHON) -m jcc.__main__ --shared NUM_FILES=3 ...... # comment/uncomment the desired/undesired optional contrib modules below JARS+=$(ANALYZERS_JAR) # many language analyzers JARS+=$(MEMORY_JAR) # single-document memory index JARS+=$(HIGHLIGHTER_JAR) # needs memory contrib JARS+=$(EXTENSIONS_JAR) # needs highlighter contrib JARS+=$(QUERIES_JAR) # regex and other contrib queries JARS+=$(SMARTCN_JAR) # smart chinese analyzer JARS+=$(SPATIAL_JAR) # spatial lucene JARS+=$(GROUPING_JAR) # grouping module JARS+=$(JOIN_JAR) # join module 12. make 13. su -c 'make install' 14. su -c 'make test' 15. run this in python console to test: import lucene lucene.initVM() 16. reinstall setuptools to reverse the patching: apt-get --reinstall install python-setuptools >> Other info: >> latest ArchLinux 3.1.0-4-ARCH >> openjdk6 6.b22_1.10.4-1 >> gcc: 4.6.2 >> python: 2.6.7 >> jcc 2.11 >> ant 1.8.2-2 >> NO_SHARED >> >> Shall I use lucene 3.x ? > > Yes. That's the so-called stable trunk :-) > > Andi.. > > >>> Yes, add mutable to the reserved word list by adding --reserved mutable >>> to the jcc command line. >> >> Tried. It didn't help. I think the point is we need to make 'mutable' >> *not* a reserved word, so that the compiler does not complain. >> >> On Mon, Nov 14, 2011 at 2:20 AM, Andi Vajda <[EMAIL PROTECTED]> wrote: >>> >>> On Nov 13, 2011, at 2:10, Jiang Fung Wong <[EMAIL PROTECTED]> >>> wrote: >>> >>>> I tried to compile pylucene on ArchLinux. JCC compilation was fine. >>>> When I tried to make. I got this error: >>>> >>>> In file included from >>>> build/_lucene/org/apace/lucene/util/mutable/MutableValueFloat.h:4:0, >>>> from build/_lucene/__wrap01__.cpp:17795: >>>> build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:27: >>>> error: expected identifier before []mutable[] >>>> build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:35:
-
Re: pylucene compilation error - reserved keywordsBill Janssen 2011-11-19, 19:27
Jiang Fung Wong <[EMAIL PROTECTED]> wrote:
> I tried to compile pylucene on ArchLinux. JCC compilation was fine. > When I tried to make. I got this error: > > In file included from > build/_lucene/org/apace/lucene/util/mutable/MutableValueFloat.h:4:0, > from build/_lucene/__wrap01__.cpp:17795: > build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:27: > error: expected identifier before []mutable[] > build/_lucene/org/apace/lucene/util/mutable/MutableValue.h:19:35: > error: expected unqualified-id before []([] token > > It seems that a reserved keyword 'mutable' has been used in the code. > > Any idea how to solve it? I wanted to try out some Lucene 4.0 features, so I built the pylucene trunk yesterday. I had to comment out EXTENSIONS_JAR and QUERIES_JAR; they wouldn't compile (in Java). I had to add the "--reserved mutable" flag to the GENERATE macro. After that it built and installed, and seems to work properly. Hand-coding queries is a bit tedious, but works. Bill |