unresolved externals when linking app with libpq 8.03 - Mailing list pgsql-interfaces

From eljot
Subject unresolved externals when linking app with libpq 8.03
Date
Msg-id 42C10512.60100@elkomtech.com.pl
Whole thread Raw
Responses Re: unresolved externals when linking app with libpq 8.03  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
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



pgsql-interfaces by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: libecpg (8.0 and CVS) hits a gcc bug on powerpc
Next
From: "Ingo Luebken"
Date:
Subject: ADO.net OleDbConnection only available via Port=5432, no other ports are valid