Both of Oracle Java 1.8 and Apple's Java 1.6 are required. You can download Oracle Java 1.8 from here.
For Apple's Java 1.6, download the package from here and install it.
Set JAVA_HOME
to make Java1.8 as default. Add this line to .baserc
or .bash_profile
,
export JAVA_HOME=`/usr/libexec/java_home`
and reload the configuration
source ~/.bashrc
JCC is a C++ code generator that produces a C++ object interface wrapping a Java library. Build JCC module. JCC requires JDK and C++ compiler.
First download the source file, and build it using python setuptools.
$ cd ~/Downloads
$ svn co http://svn.apache.org/repos/asf/lucene/pylucene/trunk/jcc jcc
$ cd jcc
$ python setup.py build
$ sudo python setup.py install
ANT is a Java library and command-line tool that help building software. Download a binary or source file from here.
$ wget http://mirror.olnevhost.net/pub/apache//ant/binaries/apache-ant-1.10.5-bin.zip
$ unzip apache-ant-1.10.5-bin.zip
$ sudo mv apache-ant-1.10.5-bin.zip /usr/local/
Add the bin
path to the shell environment.
export PATH="/usr/local/apache-ant-1.10.5/bin:${PATH}"
Download the latest PyLucene and compile it.
$ cd ~/Downloads
$ wget http://apache.claz.org/lucene/pylucene/pylucene-7.6.0-src.tar.gz
$ tar zxvf pylucene-7.6.0-src.tar.gz
$ cd pylucene-7.6.0
Change the Makefile appropriately. I modified the settings as below:
PREFIX_PYTHON=/usr/local
ANT=/usr/local/apache-ant-1.10.5/bin/ant
PYTHON=$(PREFIX_PYTHON)/bin/python3
JCC=$(PYTHON) -m jcc --shared --arch x86_64
NUM_FILES=8
Run make
$ make
... It will take a while compiling files
$ make test
$ sudo make install
Check if it runs without a problem.
$ python3 -c "import lucene; lucene.initVM()"
Install Oracle JAVA 1.8
First, add the PPA, and update the package index
sudo add-apt-repository ppa:webupd8team/java
sudo apt update
Install the JAVA installer script
sudo apt install oracle-java8-installer
Check if JAVA 1.8 is installed correctly
javac -version
Set the JAVA environment variables
sudo apt install oracle-java8-set-default
JCC is a C++ code generator that produces a C++ object interface wrapping a Java library. Build JCC module. JCC requires JDK and C++ compiler.
First download the source file, and build it using python setuptools.
$ cd ~/Downloads
$ svn co http://svn.apache.org/repos/asf/lucene/pylucene/trunk/jcc jcc
$ cd jcc
$ python setup.py build
$ sudo python setup.py install
ANT is a Java library and command-line tool that help building software. Download a binary or source file from here.
$ wget http://mirror.olnevhost.net/pub/apache//ant/binaries/apache-ant-1.10.5-bin.zip
$ unzip apache-ant-1.10.5-bin.zip
$ sudo mv apache-ant-1.10.5-bin.zip /usr/local/share/
Add the bin
path to the shell environment.
export PATH="/usr/local/share/apache-ant-1.10.5/bin:${PATH}"
Download the latest PyLucene and compile it.
$ cd ~/Downloads
$ wget http://apache.claz.org/lucene/pylucene/pylucene-7.6.0-src.tar.gz
$ tar zxvf pylucene-7.6.0-src.tar.gz
$ cd pylucene-7.6.0
Change the Makefile appropriately. I modified the settings as below:
PREFIX_PYTHON=/usr/local
ANT=/usr/local/apache-ant-1.10.5/bin/ant
PYTHON=$(PREFIX_PYTHON)/bin/python3
JCC=$(PYTHON) -m jcc --arch x86_64
NUM_FILES=8
Run make
$ make
... It will take a while compiling files
$ make test
$ sudo make install
Check if it runs without a problem.
$ python3 -c "import lucene; lucene.initVM()"
I'm having trouble building this. I suspect it's a problem that involved Python and the Mac and some other thing.
First, is it possible to download this as a binary? That would eliminate my problem (I hope)
Otherwise, sorry for the longish post that follows... any help would be appreciated.
I've encountered this problem while trying to do a build of another project, so I don't think it's pylucene's problem per se. I have tried to search through the source code but I can't find where
arm64
is actually used.My configuration:
With Python 3.8.2 when I build, I get an error msg:
With python 2.7.16
I found some indication that perhaps there is an imcompability that is arising due to clang vs gcc
I also tried:
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
but that resulted in a bunch of different compile errors when using Python 3.8.2 :
I also tried:
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
but that resulted in a bunch of different compile errors when using Python 2.7.16 :
The directory path exists:
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/lib/
but
server
is missing (directory or file?)