Ironholds / poster

Address parsing and normalisation through libpostal
MIT License
59 stars 9 forks source link

linux installation failure #9

Closed stoddn closed 7 years ago

stoddn commented 7 years ago

Hi,

Failing to install on Fedora 25 , R 3.4.0 and Ubuntu 17.04 R 3.3.2 with same result:

** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/usr/local/lib/R/site-library/poster/libs/poster.so': libpostal.so.1: cannot open shared object file: No such file or directory Error: loading failed Execution halted ERROR: loading failed

Thanks, Todd

Ironholds commented 7 years ago

Hey Todd. Did you install and link libpostal separately before installing poster?

stoddn commented 7 years ago

Hi Oliver,

I did install libpostal separately, and have verified that it works using command line in bash.

Please clarify 'link' though.

Thanks

Ironholds commented 7 years ago

sudo ldconfig in this case!

What are the outputs of:

pkg-config --cflags libpostal    
pkg-config --libs libpostal    

?

stoddn commented 7 years ago

Away, but will get back to you in an hour or so.

Ironholds commented 7 years ago

Cool!

stoddn commented 7 years ago

ldconfig appears to be the fix for Ubuntu, here's output:

ldconfig -p | grep libpostal libpostal.so.1 (libc6,x86-64) => /usr/local/lib/libpostal.so.1 libpostal.so (libc6,x86-64) => /usr/local/lib/libpostal.so pkg-config --libs libpostal
-L/usr/local/lib -lpostal pkg-config --cflags libpostal -I/usr/local/include

Still working on Fedora ...

Ironholds commented 7 years ago

Neat! Lemme know what happens with Fedora and what the pkg-config results look like there.

stoddn commented 7 years ago

Here's what's needed for Fedora:

  1. create or edit /etc/ld.so.conf.d/local.conf and a line: add /usr/local/lib
  2. then run ldconfig
  3. then ldconfig -p | grep libpostal shows:

    libpostal.so.1 (libc6,x86-64) => /usr/local/lib/libpostal.so.1 libpostal.so (libc6,x86-64) => /usr/local/lib/libpostal.so

For whatever reason the pkg-config commands won't find libpostal. But the install works anyway despite the warnings:

Package libpostal was not found in the pkg-config search path. Perhaps you should add the directory containing `libpostal.pc' to the PKG_CONFIG_PATH environment variable No package 'libpostal' found

Setting PKG_CONFIG_PATH does allow pkg-config to find libpostal.

Thanks again, Todd

Ironholds commented 7 years ago

No problem!