Skip to content

Commit

Permalink
Merge pull request openvenues#26 from openvenues/jaewoongchoi1-patch-1
Browse files Browse the repository at this point in the history
Reverting Travis images to Precise, adding section on pkg-config
  • Loading branch information
albarrentine authored Nov 9, 2017
2 parents 0364c0d + 6fd2ce9 commit 60a8b6f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: precise
language: java
branches:
only:
Expand All @@ -15,6 +16,10 @@ addons:
- libsnappy-dev
- realpath
before_install:
- cat /etc/hosts # optionally check the content *before*
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
- cat /etc/hosts # optionally check the content *after*
- export CC="gcc-4.8"
- mkdir deps
- git clone https://github.com/openvenues/libpostal
Expand Down
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ sudo yum install curl autoconf automake libtool pkgconfig

**On Mac OSX**
```
sudo brew install curl autoconf automake libtool pkg-config
brew install curl autoconf automake libtool pkg-config
```

**Installing libpostal**

```
```shell
git clone https://github.com/openvenues/libpostal
cd libpostal
./bootstrap.sh
./configure --datadir=[...some dir with a few GB of space...]

make
sudo make install

Expand All @@ -79,6 +80,29 @@ sudo ldconfig

Note: libpostal >= v0.3.3 is required to use this binding.

Make sure pkg-config can find libpostal
---------------------------------------

Some users have reported issues with the jpostal build related to pkg-config.

For jpostal to build, make sure this command runs without any errors:

```shell
pkg-config --cflags --libs libpostal
```

If you get a message like `No package 'libpostal' found`, try the following:

```shell
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
```

Try the `pkg-config --cflags --libs libpostal` command again. If it still can't find libpostal, return to the libpostal checkout directory and try:

```shell
export PKG_CONFIG_PATH=$(pwd)
```

Building jpostal
----------------

Expand All @@ -90,8 +114,6 @@ Only one command is needed:

This will implicitly run [build.sh](./build.sh) which automatically runs the Autotools build for the JNI/C portion of the library and installs the resulting shared libraries in the expected location for java.library.path

On RHEL it might be necessary to set ```PKG_CONFIG_PATH=/usr/lib/pkgconfig``` before running the gradle build.

Usage in a Java project
-----------------------

Expand Down

0 comments on commit 60a8b6f

Please sign in to comment.