Re: libpq and libecpg problems on MacOs-X (Panther/10.3.3) - Mailing list pgsql-ports

From Bruce Momjian
Subject Re: libpq and libecpg problems on MacOs-X (Panther/10.3.3)
Date
Msg-id 200405201659.i4KGxqF26819@candle.pha.pa.us
Whole thread Raw
In response to libpq and libecpg problems on MacOs-X (Panther/10.3.3)  (Richard Frith-Macdonald <richard@brainstorm.co.uk>)
Responses Re: libpq and libecpg problems on MacOs-X (Panther/10.3.3)
List pgsql-ports
[ Will exclude thead stuff becaues it is not needed anymore.]

Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------


Richard Frith-Macdonald wrote:
> When trying to use postgresql on my MacOS-X system (10.3.3) I
> encountered the problem that the libecpg and libpq dynamic libraries
> could not be linked into my applications.
>
> Upon investigation, it turns out that the postgresql libraries on
> MacOS-X/Darwin are being built as 'bundles' ... which means that you
> can dynamically load them into a running program using the dlopen()
> api, but you can't link them at application build time.  This may be
> correct behavior for some of the modules in postgres (eg the perl
> module), but is certainly wrong for libecpg and libpq ... which are
> meant to be linked with C (and other language) applications.
>
> I attach a patch which fixes this for MacOS-X 10.3.3, by altering the
> makefiles to understand the two ways of building a library/bundle and
> having a variable setting 'BUNDLE=no' to day that the normal dynamic
> library should be built rather than a bundle.  The patch alters the
> libecpg and libpq makefiles to set this variable, so these two are
> built as normal dynamic libraries, while the other code continues to be
> built as bundles.
>
> Probably there are other parts of the system which should not be
> bundles either ... but I don't use them so I don't know.
> Possibly behavior differs in older versions of MacOS-X ... again, I
> don't have the old systems so I don't know.
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-ports by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: libpq and libecpg problems on MacOs-X (Panther/10.3.3)
Next
From: Tom Lane
Date:
Subject: Re: libpq and libecpg problems on MacOs-X (Panther/10.3.3)