Re: writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rob_pg" <robert7390(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect
Date: 2011-10-25 20:43:28
Message-ID: 28131.1319575408@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Rob_pg" <robert7390(at)comcast(dot)net> writes:
> I've been working on creating a foreign data wrapper for hdfs on using version
> 9.1.0. This is my first time creating C functions against postgres, so
> hopefully this falls under the 'newbie' category and is easy to solve.

> The source code code does compile resulting in a shared library:

> file mylibrary.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
> dynamically linked, not stripped

> ldd mylibrary.so
> linux-vdso.so.1 => (0x00007fff40fff000)
> libc.so.6 => /lib/libc.so.6 (0x00007f3adb8cc000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f3adbe72000)

The reason it's not working is that libhdfs.so isn't listed as a
requirement for mylibrary.so. You did not show us your link command
for mylibrary.so, but most likely there needs to be a -lhdfs in it.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Hammond 2011-10-25 20:47:27 missing chunk 0 for toast value ...
Previous Message Rob_pg 2011-10-25 20:16:20 writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect