Skip site navigation (1) Skip section navigation (2)

Re: libpq.so.3 not found

From: Philip Yarra <philip(at)utiba(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Xinyu Hua <xhua(at)cse(dot)ucsc(dot)edu>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq.so.3 not found
Date: 2003-09-09 23:56:10
Message-ID: 200309100956.10770.philip@utiba.com (view raw or flat)
Thread:
Lists: 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 referenced
 symbol                             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.

In response to

pgsql-interfaces by date

Next:From: Home (E-mail)Date: 2003-09-10 19:29:23
Subject: Trigger updates MS SQL table
Previous:From: Michael MeskesDate: 2003-09-09 10:55:08
Subject: Re: ECPG Problem (Bug?)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group