Re: writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect - Mailing list pgsql-general

From Tom Lane
Subject Re: writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect
Date
Msg-id 29474.1319579418@sss.pgh.pa.us
Whole thread Raw
In response to Re: writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect  ("Rob_pg" <robert7390@comcast.net>)
List pgsql-general
"Rob_pg" <robert7390@comcast.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

pgsql-general by date:

Previous
From:
Date:
Subject: explicit deadlock-victim-priority mechanism
Next
From: Andrew Hammond
Date:
Subject: Re: missing chunk 0 for toast value ...