X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D77B7529EA for ; Wed, 29 Jun 2005 08:15:55 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27625-05 for ; Wed, 29 Jun 2005 11:15:50 +0000 (GMT) Received: from charlie.ekt.com (ns.elkomtech.com.pl [62.233.147.142]) by svr1.postgresql.org (Postfix) with ESMTP id DD6AF528C1 for ; Wed, 29 Jun 2005 08:15:44 -0300 (ADT) Received: from [192.168.1.55] (eljot.ekt.com [192.168.1.55]) by charlie.ekt.com (8.12.11/8.12.11) with ESMTP id j5TC1rVF023907 for ; Wed, 29 Jun 2005 14:01:53 +0200 Message-ID: <42C28486.1060807@elkomtech.com.pl> Date: Wed, 29 Jun 2005 13:22:46 +0200 From: eljot User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Re: unresolved externals when linking app with libpq References: <42C10512.60100@elkomtech.com.pl> <14766.1119967285@sss.pgh.pa.us> In-Reply-To: <14766.1119967285@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/68 X-Sequence-Number: 5636 Tom Lane wrote: >eljot 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