Percona-Lab / clickhousedb_fdw

PostgreSQL's Foreign Data Wrapper For ClickHouse
Other
201 stars 24 forks source link

How to install? #5

Closed tozoj closed 5 years ago

tozoj commented 5 years ago

Hi, I'm having trouble installing this. I'm on ubuntu 18.04 PostgreSQL 11. After building odbc and clickhousedb_fdw, in psql when running: create extension clickhousedb_fdw; I get

ERROR:  could not load library "/usr/lib/postgresql/11/lib/clickhousedb_fdw.so": /usr/lib/postgresql/11/lib/clickhousedb_fdw.so: undefined symbol: odbc_fetch
ibrarahmad commented 5 years ago

Have you installed using

make USE_PGXS=1 install

If yes, then locate libclickhouse-1.0.so file and set the LD_LIBRARY_PATH.

On Mon, Apr 8, 2019 at 7:53 PM tozoj notifications@github.com wrote:

Hi, I'm having trouble installing this. I'm on ubuntu 18.04 PostgreSQL 11. After building odbc and clickhousedb_fdw, in psql when running: create extension clickhousedb_fdw; I get

ERROR: could not load library "/usr/lib/postgresql/11/lib/clickhousedb_fdw.so": /usr/lib/postgresql/11/lib/clickhousedb_fdw.so: undefined symbol: odbc_fetch

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Percona-Lab/clickhousedb_fdw/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/ADbS8nHEzMDIeIpR_SKWHVRzV1E5oFEdks5ve1fMgaJpZM4ciYyK .

-- Ibrar Ahmed

tozoj commented 5 years ago

Thank you. Is libclickhouse-1.0.so the file that results from building clickhouse-odbc ?

ibrarahmad commented 5 years ago

No, its actually the wrapper library over odbc, part of clickhousedb_fdw.

On Mon, Apr 8, 2019 at 8:54 PM tozoj notifications@github.com wrote:

Thank you. Is libclickhouse-1.0.so the file that results from building clickhouse-odbc ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Percona-Lab/clickhousedb_fdw/issues/5#issuecomment-480891288, or mute the thread https://github.com/notifications/unsubscribe-auth/ADbS8o2yM2hkLGJ4UDrNdvH1AHiaRVZHks5ve2Y-gaJpZM4ciYyK .

-- Ibrar Ahmed

tozoj commented 5 years ago

Thank you for that. I am still getting the same error.

Here is the built .so file.

ls -la -ltr /usr/lib/x86_64-linux-gnu/libclickhouse-1.0.so 
-rwxr-xr-x 1 root root 189520 Apr  8 10:50 /usr/lib/x86_64-linux-gnu/libclickhouse-1.0.so

And here is the postgres user's env

postgres@computer:~$ printenv
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib/x86_64-linux-gnu
LANG=en_US.UTF-8
...
tozoj commented 5 years ago

Never mind, I just had to clean and rebuild. Thank you.