Re: pylucene on Ubuntu 18.04

2018-05-30 Thread Jeff Breidenbach
> JCC monkeypatches as needed.

I don't think monkey patching worked on Ubuntu 18.04, for any version of
JCC that I tried. When running make, I ran into errors discussing how JCC
was not built with shared support.

> Does Lucene 4 even build and run with Java 11 ?

No idea. I halted my efforts once I got PyLucene 4.10.1 working with
openjdk-8-jdk.


Re: pylucene on Ubuntu 18.04

2018-05-30 Thread Andi Vajda

> On May 29, 2018, at 22:26, Jeff Breidenbach  wrote:
> 
> I'd previously been using 4.9.0. Making a huge jump in release numbers is 
> scary. Will it invalidate existing indexes?

Yes, Lucene N (where N is a major release) only supports N, N - 1 indexes and 
maybe (?) N - 2 read only (unsure). So yes, your Lucene 4 indexes are dead in 
Lucene 7.

> Has the Lucene API changed a lot? 

Yes, for every major release, there are deprecations and API breakages. Changes 
are well documented but still a pain to migrate to.

> Will I be forced to migrate to python 3?

No, PyLucene (JCC in fact) supports both Python 2 and Python 3. This, since JCC 
3 was released with PyLucene 6. I see no reason to drop support for Python 2.

> That said, I was desperate and tried 
> all the official releases (4.10.1, 6.2.0, 6.4.1, 6.5.0). It just so happened 
> that 
> 4.10.1 was the first thing I got to work.
> 
> Here are things I ran into. Just mentioning them, not asking for changes.
> 
> The distribution packages for python-lucene is totally busted.
> I made the original package, someone else updated it in 2013, 
> but it was all built against openjdk-7-jdk which is long gone.

Nowadays, Java major releases happen a lot faster and Lucene keeps up.

> I think python-setuptools that ship with Ubuntu 18.04 do not include 
> shared support. The jcc/patches no longer apply.  I ended up hacking
> the heck out of it (including copying files from older versions of Ubuntu) 
> to add shared support.

These patch files shouldn't be necessary anymore, JCC monkeypatches as needed.

> I think had some trouble with conflicting JVMs and really only got things 
> working after removing all but one from the system.

Yes, that's expected.

> I got confused by python setup.py build; I kept modifying setup.py and 
> trying to rebuild, but didn't notice it didn't actually rebuild. Ended up 
> doing
> a lot of rm -rf once I realized this.

Yes, rm -rf build is necessary.

> There are a lot of if statements in jcc/setup.py that try to reason about
> shared support. I often got confused what it thought. Ended up removing
> all the ifs and locking everything to shared.

They try to figure what to monkeypatch.

> Due to sleepiness, for a while I mistakenly thought this line was a 
> typo in the Makefile and was supposed to be two separate lines.
> ANT=JAVA_HOME=/usr/lib/jvm/java-8-oracle /usr/bin/ant
> 
> It looks like libjava.so and libjvm.so in openjdk-11-jdk are in different
> directories compared to openjdk-8-jdk.

Quite possibly so, but I haven't tried that version yet. Does Lucene 4 even 
build and run with Java 11 ?

Andi..

> 
> 
> 
> 
> 
> 
> 
> 
> 


Re: pylucene on Ubuntu 18.04

2018-05-29 Thread Jeff Breidenbach
I'd previously been using 4.9.0. Making a huge jump in release numbers is
scary. Will it invalidate existing indexes? Has the Lucene API changed a
lot?
Will I be forced to migrate to python 3? That said, I was desperate and
tried
all the official releases (4.10.1, 6.2.0, 6.4.1, 6.5.0). It just so
happened that
4.10.1 was the first thing I got to work.

Here are things I ran into. Just mentioning them, not asking for changes.

The distribution packages for python-lucene is totally busted.
I made the original package, someone else updated it in 2013,
but it was all built against openjdk-7-jdk which is long gone.

I think python-setuptools that ship with Ubuntu 18.04 do not include
shared support. The jcc/patches no longer apply.  I ended up hacking
the heck out of it (including copying files from older versions of Ubuntu)
to add shared support.

I think had some trouble with conflicting JVMs and really only got things
working after removing all but one from the system.

I got confused by python setup.py build; I kept modifying setup.py and
trying to rebuild, but didn't notice it didn't actually rebuild. Ended up
doing
a lot of rm -rf once I realized this.

There are a lot of if statements in jcc/setup.py that try to reason about
shared support. I often got confused what it thought. Ended up removing
all the ifs and locking everything to shared.

Due to sleepiness, for a while I mistakenly thought this line was a
typo in the Makefile and was supposed to be two separate lines.
ANT=JAVA_HOME=/usr/lib/jvm/java-8-oracle /usr/bin/ant

It looks like libjava.so and libjvm.so in openjdk-11-jdk are in different
directories compared to openjdk-8-jdk.


Re: pylucene on Ubuntu 18.04

2018-05-29 Thread Andi Vajda



On Mon, 28 May 2018, Jeff Breidenbach wrote:


Hi Andi,

I am happy to report that I just got 4.10.1 working, using some
extreme measures. Whew. Will give a clearer report after getting
some sleep.


But I ask again, why the old release ?

Andi..



Jeff



Re: pylucene on Ubuntu 18.04

2018-05-29 Thread Jeff Breidenbach
Hi Andi,

I am happy to report that I just got 4.10.1 working, using some
extreme measures. Whew. Will give a clearer report after getting
some sleep.

Jeff