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 21:50:18
Message-ID: 29474.1319579418@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:
> Thanks for the tip, I altered the gcc invocation as follows:

> Here are the two gcc invocations originally creating the shared library:

> gcc -Wall -fPIC -c mylibrary.c -o mylibrary.o \
> -I $(A) -I $(B) -I $(C) -I $(E) -lhdfs

> gcc -I $(A) -I $(B) -I $(C) -I $(E) -shared\
> -Wl,-soname,mylibrary.so -o mylibrary.so mylibrary.o

> Here's the new invocations: I added "-lhdfs" to the second gcc invocation.

Yeah, -l is useless when building a .o file; gcc will just ignore it.
(Conversely, there's not much point in -I switches in a link step.)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Hammond 2011-10-25 22:12:27 Re: missing chunk 0 for toast value ...
Previous Message david.sahagian 2011-10-25 21:28:40 explicit deadlock-victim-priority mechanism