Skip site navigation (1) Skip section navigation (2)

Re: Cygwin PostgreSQL CVS Patch

From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-ports(at)postgresql(dot)org
Subject: Re: Cygwin PostgreSQL CVS Patch
Date: 2001-01-12 15:20:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-ports

On Fri, Jan 12, 2001 at 12:54:07AM +0100, Peter Eisentraut wrote:
> > On Tue, Jan 09, 2001 at 11:39:07PM -0500, Tom Lane wrote:
> > > This is Peter's turf, but I will take care of it if he doesn't get to it
> > > soon.  In the meantime, please work up a final Cygwin patch on the
> > > assumption that configure will be fixed as above.
> >
> > See attached for ChangeLog and patch.  The instructions to apply the
> > patch is as follows:
> The Makefile.shlib patch looks like a hack to me to get the regression
> tests to work.  Surely you don't have to install *all* shared libraries
> into bindir *and* libdir.  Pick one or fix the regression test driver or
> do something else.

My reasons for installing the "shared" libraries, DLLs under Cygwin,
into bindir and libdir are as follows:

    1. All of the DLLs except for plpgsql.dll need to be in the users
    PATH, otherwise Windows cannot start applications that depend on them.
    The canonical example is the regression test (really psql).  However,
    any app that is dependent on ecpg.dll, pgeasy.dll, pq.dll, or pq++.dll
    will have this problem too.  The only exception is plpgsql.dll which
    needs to be in LD_LIBRARY_PATH since it is dlopen-ed into
    postgres.exe, if appropriate.

    2. I would prefer to use symlinks but that would require the real
    files to be installed in bindir and symlinked back to libdir because
    Windows does *not* understand Cygwin symlinks.  Doing so would have
    caused more significant changes to the makefiles which I don't believe
    is desired for just one platform.
    3. I continued to install the DLLs to libdir because I was concerned
    that postgres.exe (or other executables) might be dlopen-ing them.
    If so, then LD_LIBRARY_PATH would have to be set to a different
    value on Cygwin than on other UNIX systems.

The only downside that I can see from installing to both bindir and
libdir is the possibility of the copies from getting out of sync and
wasted disk space.  The wasted disk space is really not an issue since
the total size of the five stripped DLLs on 7.0.3 is ~250K.

I admit that there is a "hacky" aspect to the Makefile.shlib patch.  I am
lucky that plpgsql.dll doesn't get installed to both bindir and libdir.
This is a desired side effect due to plpgsql.dll's install rule overriding
the standard one in Makefile.shlib.

Given more insight into my reasoning, will you reconsider and accept my
Makefile.shlib patch?


Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA                 WWW:

In response to


pgsql-ports by date

Next:From: Peter EisentrautDate: 2001-01-12 15:59:17
Subject: Re: Cygwin PostgreSQL CVS Patch
Previous:From: Bruce MomjianDate: 2001-01-12 04:59:52
Subject: Re: Cygwin PostgreSQL CVS Patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group