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: unresolved externals when linking app with libpq 8.03
Date: Tue, 28 Jun 2005 10:06:42 +0200
Message-ID: <42C10512.60100@elkomtech.com.pl> (raw)

Hi everybody,

I have got some problems with linking my postgres application on Linux

Environment: Fedora core 4, PostgreSQL 8.0.3

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. I believe it's due to new version of 
libpq library (which has been announced with pgsql ver. 8.0.2). But I 
can't realize which additional libraries I should put to linker to get 
success.

There are examples of unresoved symbols when using -lpq option to linker:

lib/sql/postgresql/ver803/lib/linux/libpq.a(fe-misc.o)(.text+0x68a):
In function  'pqSocketCheck':  
/usr/src/build/565044-i386/BUILD/postgresql-8.0.3/src/interfaces/libpq/fe-misc.c
:974: undefined reference to `SSL_pending'

undefined reference to `PEM_read_DHparams'
undefined reference to `DH_size'
undefined reference to `PEM_read_bio_DHparams'
undefined reference to `BIO_free'
undefined reference to `SSL_read'
undefined reference to `X509_NAME_oneline'
undefined reference to `CRYPTO_num_locks'
undefined reference to `krb5_cc_get_principal'
undefined reference to `error_message'

(66 unresolved symbols in total)

when I added -lkrb5 (kerberos library as I guess) to linker some 
unresolved symbols vanishes whereas the others appeared, for example

lib/sql/postgresql/ver803/lib/linux/libkrb5.a(init_ctx.o)(.text+0x221):
In function `get_profile_etype_list':: undefined reference to 
`krb5_string_to_enctype'

(114 unresolved externals in total)

adding -lkrb5support to linking doesn't help

So, my question is which libraries I shoud add to the linker command 
line and in which sequence to get my app linked successfully. I couldn't 
find any examples in Web till now.

Thanks in advance.

-- 
Regards
Jarek Lubczynski

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




view thread (3+ messages)  latest in thread

Message-ID: <42C10512.60100@elkomtech.com.pl>
Permalink:  ../42C10512.60100@elkomtech.com.pl/
Also on:    postgresql.org/message-id/42C10512.60100@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 8.03
  In-Reply-To: <42C10512.60100@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