Building

Some of the blevex packages require C/C++ libraries.

In general, bleve expects these libraries to be built and installed in the standard system locations. If not, it is up to you to set the appropriate CGO_… environment variables so that the libraries and headers can be found.

Platform Specific Instructions

The following sections are user-contributed instructions for satisfying dependencies on particular platforms.

Ubuntu 14.04 LTS (Trusty Tahr)

  1. $ sudo apt-get install libleveldb-dev libstemmer-dev libicu-dev svn build-essential
  2. $ go get -u -v github.com/blevesearch/bleve
  3. $ cd $GOPATH/src/github.com/blevesearch/bleve/analysis/token_filters/cld2
  4. $ svn co http://cld2.googlecode.com/svn/trunk cld2-read-only
  5. $ cd cld2-read-only/internal/
  6. $ ./compile_libs.sh
  7. $ sudo cp *.so /usr/local/lib
  8. $ go get -u -v -tags full github.com/blevesearch/bleve

OS X (hacky, but similar to Ubuntu 14.04)

  1. $ brew install leveldb icu4c svn # etc?
  2. $ export CGO_LDFLAGS=-L/usr/local/opt/icu4c/lib
  3. $ export CGO_CFLAGS=-I/usr/local/opt/icu4c/include
  4. $ go get -u -v github.com/blevesearch/bleve
  5. $ cd $GOPATH/src/github.com/blevesearch/bleve/analysis/token_filters/cld2
  6. $ svn co http://cld2.googlecode.com/svn/trunk cld2-read-only
  7. $ cd cld2-read-only/internal/
  8. # if you feel gutsy run:
  9. $ perl -p -i -e 's/soname=/install_name,/' compile_libs.sh
  10. # otherwise, just change soname= to install_name, in the two spots in compile_libs.sh
  11. $ ./compile_libs.sh
  12. $ sudo cp *.so /usr/local/lib
  13. $ go get -u -v -tags full github.com/blevesearch/bleve