On Wed, 28 Mar 2012, Caleb Burns wrote:

According to
http://lucene.apache.org/pylucene/jcc/install#shared_mode_support_for_the_code--sharedcode_flag
(or
doc/jcc/documentation/install.html#shared from pylucene tarball), I can set
the `--shared` flag in order to compile JCC as a shared object instead of a
static one. There's also mention about applying a patch to setuptools on
Linux (I'm running Ubuntu 11.04). I'm confused as to how exactly one is
supposed to do this.

If I run `python setup.py build` from "jcc/" I'm greeted with a message
saying shared mode is disabled and setuptools patch.43.0.6c11 must be
applied to enable it. So I apply the patch with the friendly help from the
displayed message: `sudo patch -d /usr/lib/python2.7/dist-packages -Nup0 <
/home/caleb/Exclude/Downloads/pylucene-3.4.0-1/jcc/jcc/patches/patch.43.0.6c11`.
Then if I try to build again with `python setup.py build`, it builds
successfully but I get "libjcc.a" under "jcc/build/lib.linux-x86_64-2.7/"
instead of "libjcc.so". If I pass `--shared` to `python setup.py build` I
simply get "error: option --shared not recognized". If I apply
"patch.43.0.6c7" instead of "patch.43.0.6c11" on a fresh reinstall of
setuptools and then build with `python setup.py build`, the resulting build
has "libjcc.so" instead of "libjcc.a". Is this supposed to work this way?
Where is the `--shared` flag involved? And why does `setup.py` say to
use "patch.43.0.6c11" to enabled shared mode when only "patch.43.0.6c7"
seems to enable it?

The suggested patch version is figured out from the version of setuptools you have. If you have a setuptools version < 0.6c11, it suggests you use patch.43.0.6c7, otherwise patch.43.0.6c11. If a new version of setuptools appeared that breaks this logic or were to need a new patch, all bets are off, of course.

What version of setuptools do you have installed ?
Did the patch patch.43.0.6c7 install cleanly ?

Andi..

The reason I'm asking is because I working on a Python C++ module for
performing quick calculations that interacts with Lucene (specifically
PyLucene).


--
Caleb Burns
Developer | Riders Discount
866.931.6644 x851 | www.RidersDiscount.com <http://www.ridersdiscount.com/>
[image: image.png] <http://www.facebook.com/ridersdiscount> [image:
image.png] <https://twitter.com/#!/ridersdiscount>
Deal of the Day <http://www.twitter.com/#!/rd_dealoftheday>

Reply via email to