pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Philip Yarra <philip@utiba.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Xinyu Hua <xhua@cse.ucsc.edu>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: libpq.so.3 not found
Date: Wed, 10 Sep 2003 09:56:10 +1000
Message-ID: <200309100956.10770.philip@utiba.com> (raw)
In-Reply-To: <20777.1063079749@sss.pgh.pa.us>
References: <Pine.GSO.4.44.0309082050050.990-100000@sundance.cse.ucsc.edu>
	<20777.1063079749@sss.pgh.pa.us>

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.



view thread (8+ messages)

Message-ID: <200309100956.10770.philip@utiba.com>
Permalink:  ../200309100956.10770.philip@utiba.com/
Also on:    postgresql.org/message-id/200309100956.10770.philip@utiba.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: philip@utiba.com, tgl@sss.pgh.pa.us, xhua@cse.ucsc.edu
  Subject: Re: libpq.so.3 not found
  In-Reply-To: <200309100956.10770.philip@utiba.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox