Skip to content

Instantly share code, notes, and snippets.

@cancerberoSgx
Last active October 30, 2017 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cancerberoSgx/e56725175227446a5018aa0e4e8dc4ed to your computer and use it in GitHub Desktop.
Save cancerberoSgx/e56725175227446a5018aa0e4e8dc4ed to your computer and use it in GitHub Desktop.
how to build [apache lucy](https://lucy.apache.org/), install libraries and includes and then compile and run one of its samples (linux)
# The following shell script demonstrate how to build apache lucy https://lucy.apache.org/
# compile one of its sample and run it in a linux system.
# IMPORTANT: change variables FOLDER and PREFIX according to your system
FOLDER=/home/sg/test
PREFIX=/usr # where includes and libs will be installed in your system
mkdir -p $FOLDER
cd $FOLDER
git clone https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
cd $FOLDER/lucy-clownfish/runtime/c
./configure --prefix=$PREFIX
make
make install
cd $FOLDER/lucy-clownfish/compiler/c
./configure --prefix=$PREFIX
make
make install
cd $FOLDER
git clone https://git-wip-us.apache.org/repos/asf/lucy.git
cd $FOLDER/lucy/c
./configure --prefix=$PREFIX
make
make install
cp -rf $FOLDER/lucy/c/autogen/include/* $PREFIX/include
# now compile a lucy example and run it:
cd $FOLDER/lucy/c/sample
gcc getting_started.c -l clownfish -l lucy -o getting_started.out
./getting_started.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment