pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: eljot <eljot@elkomtech.com.pl>
To: pgsql-interfaces@postgresql.org
Subject: Re: unresolved externals when linking app with libpq
Date: Wed, 29 Jun 2005 13:22:46 +0200
Message-ID: <42C28486.1060807@elkomtech.com.pl> (raw)
In-Reply-To: <14766.1119967285@sss.pgh.pa.us>
References: <42C10512.60100@elkomtech.com.pl>
	<14766.1119967285@sss.pgh.pa.us>

Tom Lane wrote:

>eljot <eljot@elkomtech.com.pl> writes:
>  
>
>>I was able to link my postgresql apps successfully when I was using 
>>PostgreSQL version 8.0.1 or earlier. Now (v. 8.0.3) the linker tells me 
>>there is many unresolved externals.
>>    
>>
>Apparently you've configured the new Postgres build with SSL and
>Kerberos support, which you didn't have in your 8.0.1 build.  
>
No, I didn't change anything. The only thing I did is I had copied the 
proper .h files and libpq.a file to specified directories on my 
development machine. I must compile my apps for various versions of 
postgres (and some other rdbms as well) in the same time, so I can't 
directly use c-interface files installed by postgresql itself. I didn't 
change my makefile at all. So I think the problem may be with 
compilation of files included in new version of libpq.a  (PostgreSQL 
8.0.3 from FC4).

>[...]
>Alternatively, look at psql with ldd to find out what libraries it
>depends on.
>  
>
Thanks a lot, it was really helpful. If anybody is interested in this is 
a part of command for linker which has given me a success:

-lpq -lpam -lssl -lcrypto -lkrb5 -lz -lreadline -ltermcap -lcrypt 
-lresolv -lnsl -ldl -lpthread -lgssapi_krb5 -lcom_err -lk5crypto 
-lkrb5support -lgcc_eh

For postgresql 8.0.1 and earlier linking only with with -lpq was sufficient.

The executable file growed fom 1.0MB (8.0.1) to 2.3MB (8.0.3) and I'm 
afraid it may not work without recompiling under other Linux 
distributions (I will test it's behaviour on FC3, RH9 & SUSE 9.3 soon) 
due to many additional shared libraries used. So I'd like to get rid of 
extra libs if it is possible of course, and still have no idea how to do 
this.

Than's again for your help.

>			regards, tom lane
>
>  
>

-- 
Regards
Jarek Lubczynski

There are 10 kinds of people:
Those who understand binary and those who don't




view thread (3+ messages)

Message-ID: <42C28486.1060807@elkomtech.com.pl>
Permalink:  ../42C28486.1060807@elkomtech.com.pl/
Also on:    postgresql.org/message-id/42C28486.1060807@elkomtech.com.pl

 · 

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: eljot@elkomtech.com.pl
  Subject: Re: unresolved externals when linking app with libpq
  In-Reply-To: <42C28486.1060807@elkomtech.com.pl>

* 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