Re: libpq.so.3 not found - Mailing list pgsql-interfaces

From Philip Yarra
Subject Re: libpq.so.3 not found
Date
Msg-id 200309100956.10770.philip@utiba.com
Whole thread Raw
In response to Re: libpq.so.3 not found  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
On Tue, 9 Sep 2003 01:55 pm, Tom Lane wrote:
> In that case I'm out of ideas :-(.  Anyone else care to take a swing?

I'm game - I hit a similar problem on my old Sparc box last night (not related
to libpq specifically). I did this:

$ uname -a
SunOS sparc4 5.6 Generic_105181-05 sun4m sparc SUNW,SPARCstation-4
$ gcc -lpthread test.c # this is Bruce's thread test app
Undefined                       first referencedsymbol                             in file
gethostbyname                       /var/tmp/cc31rpyq.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
$ gcc -lpthread -lnsl test.c # this works

libnsl contains the gethostbyname function... why on earth I had to tell the
linker to actually link against it, I do not know, especially since I didn't
need to tell it -L/usr/lib to locate the .so... maybe if you're still stuck,
try telling it to link against absolutely everything.

Regards, Philip.


pgsql-interfaces by date:

Previous
From: Michael Meskes
Date:
Subject: Re: ECPG Problem (Bug?)
Next
From: Caroline Yong
Date:
Subject: Replicate database