Re: LibreOffice driver 3: pg_config and linking statically to libpq

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Lionel Elie Mamane <lionel(at)mamane(dot)lu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: LibreOffice driver 3: pg_config and linking statically to libpq
Date: 2011-12-22 20:24:26
Message-ID: CA+Tgmob_70_z-e=stR=EvGqNypXimcgnuFE24OSPggJZycPHBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 13, 2011 at 6:05 AM, Lionel Elie Mamane <lionel(at)mamane(dot)lu> wrote:
>  * On the one hand, it gives too much since LIBS is filtered to only a
>   subset in src/interface/libpq/Makefile.

What is it excluding that it ought to include? I am not quite clear
on why that code is like that, but it appears to be intended that the
filter-list include everything that might be needed.

>  * On the other hand, it does not give enough, since it does not give
>   the value of LDAP_LIBS_FE anywhere, nor say if it is necessary to
>   add PTHREAD_LIBS.
>
> This is not an immediate problem for LibreOffice: I export the value
> of SHLIB_EXPORTS from src/interface/libpq/Makefile as a Makefile
> snippet that gets imported in our build system or (on Microsoft
> Windows) we just proceeded by "trial and error" until the link
> succeeds.
>
> However, I suggest it would be cleaner to give that kind of
> information in pg_config, so that one can basically do something like:
>
>  $LINK_COMMAND -lpq $(pg_config --libpq-dep-libs)
>
> and have it work automatically. You could also provide a pq.pc file
> for pkgconfig, which would give nice nearly-automatic integration for
> projects using e.g. autoconf and friends.

Care to propose a patch?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-12-22 21:18:56 Re: [v9.2] Fix Leaky View Problem
Previous Message Peter Eisentraut 2011-12-22 20:23:37 atexit vs. on_exit