Re: Fixed directory locations in installs

From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixed directory locations in installs
Date: 2004-05-03 11:38:00
Message-ID: 3408.24.211.141.25.1083584280.squirrel@www.dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Claudio Natoli said:
>
>
> Peter Eisentraut wrote:
>> Claudio Natoli wrote:
>> > I'm yet to see a convincing argument for why we can't adopt the
>> > "binary-location/../share" approach as submitted late March. AFAICS,
>> > it was rejected on the basis that it was not platform independent
>> > (no arguments there) and that we could not rely on the ".."
>> > approach.
>>
>> The only objection was that it hardcodes the layout already in the
>> source, which gives us no flexibility at all to try out different
>> installation layouts. If you want to compute the relative paths from
>> bindir to libdir etc. at build time based on actual configure
>> options, then I see no problem with that.
>
> But we want to resolve the locations at run-time, not build or
> configure time. For win32, I'm yet to see why this approach is
> egregious.
>
> Do you have an alternative solution to propose?
>

I hope we are at cross purposes here, or else Peter's suggestion won't
fly - we need to be able to decouple some of these things from
configure/build time and defer them to installation/runtime. Any other
result will have us attracting curses from on high from the whole Windows
community, and other binary packagers won't get what I understand some
want.

How about if we have a configuration flag --enable-relocation which would
require a fixed layout based on an indeterminate root. This would have the
following effects:

. if prefix did not contain 'postgres' or 'pgsql' then 'postgresql' would
be appended.
. all *dir configure options would be forbidden - they would be based on
the prefix as now, and since it would contain 'postgres' the simple layout
we want would be used.
. binaries would have a DEFINE which would mean they would know they
should look for other binaries and shared files in locations which are
fixed relative to their own location rather than in the hardcoded
locations.

None of this should need a single #ifdef WIN32 :-)

(Would we need to turn off rpath for Unix in such a case? I suspect we
would.)

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-03 13:04:48 Re: ANALYZE locks pg_listener in EXCLUSIVE for long time?
Previous Message jihuang 2004-05-03 10:12:21 ERROR: heapgettup: failed ReadBuffer

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Merlin Moncure 2004-05-03 12:05:28 Re: win32 build and test issues
Previous Message Peter Eisentraut 2004-05-03 07:30:28 Re: Fixed directory locations in installs

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-05-03 13:25:46 Re: mingw regression test fixes
Previous Message Magnus Hagander 2004-05-03 10:17:49 Re: win32 service proposal