From: | Bob Ippolito <bob(at)redivi(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Making PostgreSQL 7.4 (CVS) work properly on OS X 10.3 (7B85) |
Date: | 2003-11-08 00:43:10 |
Message-ID: | 86CF16BD-1184-11D8-92AB-000A95686CD8@redivi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Here's my notes on how to build PostgreSQL 7.4 (CVS) on OS X 10.3
(7B85) with (seems to be working, but I haven't really ran any tests)
python, tcl, perl, readline. I noticed today that you guys are just
about to release, so I figure I should bring this up right now. Please
feel free to email me if you have any questions/comments, copy me
off-list if possible because I probably won't stay subscribed for very
long.
Notes:
----------
* CVS co pgsql at about Nov 7 2003 5pm EST
* These instructions PROBABLY DO NOT WORK ON 10.2! If these changes to
into a configure script, make sure to trap them against darwin >= 7.0.0
* downloaded and built static readline
* downloaded and built latest bison 1.875
* /usr/local/bin comes before /usr/bin in my path! (this matters for
bison, probably)
* Probably a good idea to include kerberos support as well, since OS X
Server 10.3 uses it a lot, but I don't know enough about it to try..
* I have set env MAC_OS_X_DEPLOYMENT_TARGET 10.3
* I ditched the system.c hack, assuming Apple has fixed them by 10.3 --
because it breaks tcl and python if you do.. I did:
#include <AccessibilityMacros.h>
#ifdef MAC_OS_X_10_3
... original code
#endif
This can be done nicer, of course.
It seems that you can't sysctl some things after they've been set
once.. so I had to sudo vi /etc/rc file, changed the following two
parameters
sysctl -w kern.sysv.shmmax=167772160
sysctl -w kern.sysv.shmall=65536
Then rebooted.
Shell commands:
------------------------
cd pgsql
mkdir build_osx
cd build_osx
../configure --with-tcl --without-tk
--with-tclconfig=/Library/Frameworks/Tcl.framework/Versions/8.4
--with-perl --with-python --without-java --with-rendezvous
--with-openssl
make
Problems:
--------------
*** Cannot build PL/Python because libpython is not a shared library.
*** You might have to rebuild your Python installation. Refer to
*** the documentation for details.
Ok, that's not quite true, so:
I edited src/Makefile.global to have
python_libspec = -framework Python
You could probably just grep the LINKFORSHARED line out of
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/
config/Makefile, but it links to things that aren't necessary for the
plugin bundle.
Then I edited src/pl/plpython/Makefile and changed the "ifneq" that
makes it not build to "ifneq (justbuildit, ....." so it would try and
build it anyways. This is a stupid hack.
These things should be fixed in the configure process, but I'm too lazy
to hack that at the moment.
Shell commands:
------------------------
make
sudo make install
Shell commands:
------------------------
sudo mkdir /usr/local/pgsql/data
sudo chown mysql /usr/local/pgsql/data
sudo -u mysql /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
sudo -u mysql /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l
/usr/local/pgsql/data/postgres.log start
sudo -u mysql /usr/local/pgsql/bin/createdb test
sudo -u mysql /usr/local/pgsql/bin/createlang pltcl test
sudo -u mysql /usr/local/pgsql/bin/createlang plpythonu test
sudo -u mysql /usr/local/pgsql/bin/createlang plperl test
Notes:
---------
* Yes I know it's blasphemous to use mysql as the username, but OS X
comes with a mysql account, just think of it as an "easy to use uid
74". Yes, I'm lazy.
* Yes, my only test is createlang.. but that crashes for tcl and
python w/o the system fix.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-11-08 01:16:16 | Re: What do you want me to do? |
Previous Message | Andrew Dunstan | 2003-11-07 23:41:45 | Re: What do you want me to do? |