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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-interfaces by date

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