Re: pgxs and pginstaller - Mailing list pgsql-hackers
From | Thomas Hallgren |
---|---|
Subject | Re: pgxs and pginstaller |
Date | |
Msg-id | thhal-0iG4PBLdj8bQ5IBXZHAed+XHnxhsnP6@mailblocks.com Whole thread Raw |
In response to | Re: pgxs and pginstaller ("Dave Page" <dpage@vale-housing.co.uk>) |
List | pgsql-hackers |
Dave Page wrote: > > > > >>-----Original Message----- >>From: Thomas Hallgren [mailto:thhal@mailblocks.com] >>Sent: 23 September 2005 10:49 >>To: Dave Page >>Cc: pgsql-hackers@postgresql.org >>Subject: Re: pgxs and pginstaller >> >>Dave Page wrote: >> >> >>> >>>In the case of PostgreSQL itself, it's built in >>> >>> >>/usr/local/src/postgresql-8.x, >> > installed to /usr/local/pgsql and then packaged up from there. >> >> >>Perhaps you should build it in the directory that the >>installer suggests >>as default for the installation? That way, most of the installations >>will work out of the box. If you should try that, be careful >>to use the >>Windows short representation (i.e. C:/Progra~1/PostgreSQL). >>Whitespace >>doesn't play well with most makefiles. >> >> > >You can't because we build it under Msys which uses the Unix style >paths. GCC has a tendancy to barf horribly on Windows style paths as >well, as we found when trying to use pg_config with Slony. > >I know little about pgxs, so if you can detail what settings need to >hacked during installation in the bug you opened I'd appreciate it. It >should be relatively trivial to rewrite in a custom action. > >Regards, Dave > > It's two things basically. One I think that the installer team can fix, the other is IMHO an error in the Makefile.global.in and should be fixed there. The first thing is the lib/pgxs/src/Makefile.global that is installed. It contains two paths that needs to change. The abs_top_srcdir and the prefix. In my patched file I use these settings: abs_top_srcdir = /c/Progra~1/PostgreSQL/8.1-beta2/src/postgresql-8.1beta2 prefix := /c/Progra~1/PostgreSQL/8.1-beta2 That seems to work fine. The second problem is that when I made that change, I also had to change code that appends 'postgresql' to all paths unless the path contains the word 'pgsql' or 'postgres'. A comment statest that this is to avoid 'directory clutter'. A better check would perhaps be to hardcode rules that explicitly avoids some well known directories (/usr/include etc.). That would give the user a better freedom to choose prefix without having this side-effect. My temporary patch for this was to remove all lines staring with 'ifeq' or 'endif' between line 66 and 102. A very different solution to the whole problem would be to let the installer make extra checks when the development package is selected. It could for instance ask the user what directory he plan to use as the '/usr/local' (suggest 'C:\msys\local' perhaps?) and then use 'pgsql' in that directory as the location for the installation. Regards, Thomas Hallgren
pgsql-hackers by date: