postgresql and Mac OS X
Relatively simple question that I hope doesn't start too much "Flame".
I have recently had the opportunity to reformat my macbook hard drive,
many thanks to suggestions from the actual Apple support team. That's
not why I'm writing to the postgres group... But it's related.
I have a fresh slate from which to build my development platform!!
I can get postgresql installed in three flavors:
EnterpriseDB has a dmg package for Mac.
macports has their own package.
fink also has their own package.
I was using macports but got into a cluster-F on versions and multiple
installs. After a spell I had all four versions 8.0 - 8.3 installed in
order to use postgres, ruby, perl, and rails together.
I'm interesting in knowing if this can be avoided by selecting one of
the alternative sources of installation. Any experiences with
differences in installation and long term management from these sources?
I'm more accustomed to using Linux for PostgreSQL, but in this situation
Linux probably won't be my development arena but test/prod. In the
Linux environment I've had great success in getting migrations,
upgrades, and languages to play well with PostgreSQL without the multi
version issue.
Many thanks in advance for all your input!
Tom
On Oct 28, 2008, at 3:41 PM, Tom Allison wrote:
Relatively simple question that I hope doesn't start too much "Flame".
I have recently had the opportunity to reformat my macbook hard
drive, many thanks to suggestions from the actual Apple support
team. That's not why I'm writing to the postgres group... But it's
related.I have a fresh slate from which to build my development platform!!
I can get postgresql installed in three flavors:
EnterpriseDB has a dmg package for Mac.
macports has their own package.
fink also has their own package.
There's also http://www.postgresqlformac.com/ and I think one or two
others.
I was using macports but got into a cluster-F on versions and
multiple installs. After a spell I had all four versions 8.0 - 8.3
installed in order to use postgres, ruby, perl, and rails together.I'm interesting in knowing if this can be avoided by selecting one
of the alternative sources of installation. Any experiences with
differences in installation and long term management from these
sources?I'm more accustomed to using Linux for PostgreSQL, but in this
situation Linux probably won't be my development arena but test/
prod. In the Linux environment I've had great success in getting
migrations, upgrades, and languages to play well with PostgreSQL
without the multi version issue.
I usually install postgresql from source on my macbook. I'm using it
for development, rather than production, so I don't have it starting
automatically via launchd, just start it with pg_ctl manually when I
need it.
Installing from source means I can avoid the fragility of macports or
fink, and know that I've built it in much the same way as the
postgresql or solaris installation I'd be using for production.
I didn't know about the EnterpriseDB dmg, though. I'll take a look at
that.
Cheers,
Steve
On 28 okt 2008, at 23.41, Tom Allison wrote:
I can get postgresql installed in three flavors:
EnterpriseDB has a dmg package for Mac.
macports has their own package.
fink also has their own package.
You also have the fourth, most delicious flavor: build it yourself;
PostgreSQL compiles nicely on Mac OS X. I've never had any reason to
regret not using a package manager yet.
I was using macports but got into a cluster-F on versions and
multiple installs. After a spell I had all four versions 8.0 - 8.3
installed in order to use postgres, ruby, perl, and rails together.
Do you mean that Macports installed different versions of Postgres
because the other packages had different dependencies? Don't know if
compiling from source would help you there, but surely there must be
some way to tell the package manager that a certain dependency
already exists, albeit somewhere else?
Sincerely,
Niklas Johansson
On 28 okt 2008, at 23.41, Tom Allison wrote:
I can get postgresql installed in three flavors:
EnterpriseDB has a dmg package for Mac.
macports has their own package.
fink also has their own package.
You also have the fourth, most delicious flavor: build it yourself;
PostgreSQL compiles nicely on Mac OS X. I've never had any reason to
regret not using a package manager yet.
I was using macports but got into a cluster-F on versions and
multiple installs. After a spell I had all four versions 8.0 - 8.3
installed in order to use postgres, ruby, perl, and rails together.
Do you mean that Macports installed different versions of Postgres
because the other packages had different dependencies? Don't know if
compiling from source would help you there, but surely there must be
some way to tell the package manager that a certain dependency
already exists, albeit somewhere else?
Sincerely,
Niklas Johansson
On Oct 28, 2008, at 4:03 PM, Steve Atkins wrote:
Installing from source means I can avoid the fragility of macports
or fink, and know that I've built it in much the same way as the
postgresql or solaris installation I'd be using for production.
+1
It means I can easily pick the contrib modules I'm interested in.
Niklas Johansson wrote:
On 28 okt 2008, at 23.41, Tom Allison wrote:
I was using macports but got into a cluster-F on versions and multiple
installs. After a spell I had all four versions 8.0 - 8.3 installed
in order to use postgres, ruby, perl, and rails together.Do you mean that Macports installed different versions of Postgres
because the other packages had different dependencies? Don't know if
compiling from source would help you there, but surely there must be
some way to tell the package manager that a certain dependency already
exists, albeit somewhere else?
Yes. Between different programing libraries to access postgresql I was
getting caught up in multiple versions of the database itself. Very
unpleasant.
On Tue, Oct 28, 2008 at 7:10 PM, Christophe <xof@thebuild.com> wrote:
On Oct 28, 2008, at 4:03 PM, Steve Atkins wrote:
Installing from source means I can avoid the fragility of macports or
fink, and know that I've built it in much the same way as the postgresql or
solaris installation I'd be using for production.+1
Make that +2.
My primary development machine is my macbook pro, and I'd definitely
suggest compiling from source. It's quite painless, and it ensures
that you have exactly what you think you have on the machine. Getting
it to start up automatically is pretty trivial, and I'd say that the
benefits *far* outweigh the avoidance of a few annoying system
administration tasks at install time. Saving myself pain over time is
definitely far better than saving a bit of discomfort once, IMO!
--
- David T. Wilson
david.t.wilson@gmail.com
I use postgresql on MBP, current head, for testing and development. Just
from sources, it won't bite :)
you just have to add user postgres to your system, place $PGDATA wherever
you feel you should, and you're done.
On Tue, Oct 28, 2008 at 11:41 PM, Tom Allison <tom@tacocat.net> wrote:
I was using macports but got into a cluster-F on versions and multiple
installs. After a spell I had all four versions 8.0 - 8.3 installed in
order to use postgres, ruby, perl, and rails together.
I use apple's ruby, but have postgres, perl and a lot of other
packages/libraries installed from macports, and am quite happy with
it.
I had the same multiple-version-issues I think you're experiencing at
first, believing that all deactivated ports were still required as
dependencies, but eventually got tired of the mess and did a forced
uninstall of anything inactive. My apps still worked.
Installing a single app from source isn't that much of an issue, but I
have 100+ different ports installed on my dev box. Four(*) commands in
a terminal window keeps them all current.
Isak
*)
sudo port sync # update package info
sudo port selfupdate # update macports
sudo port upgrade installed # upgrade installed ports
sudo port uninstall -f inactive # clean up after upgrade
Grzegorz Jaśkiewicz wrote:
I use postgresql on MBP, current head, for testing and development. Just
from sources, it won't bite :)you just have to add user postgres to your system, place $PGDATA
wherever you feel you should, and you're done.
Yes. I actually started using Nix from Slackware. Which means, by
definition, installation from scratch is "trivial". I can see the value
in doing an installation on your own because you do have absolute
control over the version/options of the packages.
I guess my reluctance against compiling is that I have little interest
in tuning development box and going through the nuances of
configuration. And as such -- plug & chug seems easy.
I think I found my answer though -- DIY. It's the control and knowing I
have all the binaries and source code I need to. now, wish me luck!
I might be back on the list really soon...
:)
- Tom
I feel good about control here, and I certainly don't have any problems. So,
please don't whine :) Especially since I want to run cvs head, and be able
to actually update it from cvs when I want to, that's the only choice.
Postgresql is so easy to get from sources, compared to other software
packages, I can't understand people even with slightest expierence in unix
to have any problems with it.
Grzegorz Jaśkiewicz wrote:
I feel good about control here, and I certainly don't have any problems.
So, please don't whine :)
Especially since I want to run cvs head, and be able to actually update
it from cvs when I want to, that's the only choice. Postgresql is so
easy to get from sources, compared to other software packages, I can't
understand people even with slightest expierence in unix to have any
problems with it.
I tried getting a source install on my mac book yesterday and today.
It's not a normal *nix installation. The location of the files are all
non-standard.
'make' is prefixed by /Developer/usr/bin/.
I added /Developer/usr/bin to PATH and tried ./configure.
checking build system type... i386-apple-darwin9.5.0
checking host system type... i386-apple-darwin9.5.0
checking which template to use... darwin
checking whether to build with 64-bit integer date/time support... no
checking whether NLS is wanted... no
checking for default port number... 5432
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C
compiler cannot create executables
See `config.log' for more details.
config.log shows an exit code of 77 with a statement that compiler
cannot create executables. ???
configure:2213: $? = 0
configure:2215: gcc -v </dev/null >&5
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5488~2/src/configure
--disable-checking -enabl
e-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/includ
e/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9
--with-arch=apple
--with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5488)
configure:2218: $? = 0
configure:2220: gcc -V </dev/null >&5
gcc-4.0: argument to `-V' is missing
configure:2223: $? = 1
configure:2246: checking for C compiler default output file name
configure:2249: gcc conftest.c >&5
ld: library not found for -lcrt1.10.5.o
collect2: ld returned 1 exit status
configure:2252: $? = 1
configure: failed program was:
I think he questin is, what lib was missing so I can go find it and add
it to some path/dir variable?
On 4 nov 2008, at 11.21, Tom Allison wrote:
I tried getting a source install on my mac book yesterday and today.
It's not a normal *nix installation. The location of the files are
all non-standard.
'make' is prefixed by /Developer/usr/bin/.
That's not right. It should definately live in /usr/bin on a normal
Mac OS X install. What versions of Mac OS X and the developer tools
do you have? Did you make some non-standard choice during the
installation of the dev tools?
Sincerely,
Niklas Johansson
On Tue, Nov 4, 2008 at 8:21 AM, Tom Allison <tom@tacocat.net> wrote:
Grzegorz Jaśkiewicz wrote:
I feel good about control here, and I certainly don't have any problems.
So, please don't whine :)
Especially since I want to run cvs head, and be able to actually update it
from cvs when I want to, that's the only choice. Postgresql is so easy to
get from sources, compared to other software packages, I can't understand
people even with slightest expierence in unix to have any problems with it.I tried getting a source install on my mac book yesterday and today.
It's not a normal *nix installation. The location of the files are all
non-standard.
'make' is prefixed by /Developer/usr/bin/.I added /Developer/usr/bin to PATH and tried ./configure.
checking build system type... i386-apple-darwin9.5.0
checking host system type... i386-apple-darwin9.5.0
checking which template to use... darwin
checking whether to build with 64-bit integer date/time support... no
checking whether NLS is wanted... no
checking for default port number... 5432
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C
compiler cannot create executables
See `config.log' for more details.config.log shows an exit code of 77 with a statement that compiler cannot
create executables. ???configure:2213: $? = 0
configure:2215: gcc -v </dev/null >&5
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5488~2/src/configure --disable-checking
-enabl
e-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/includ
e/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9
--with-arch=apple
--with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5488)
configure:2218: $? = 0
configure:2220: gcc -V </dev/null >&5
gcc-4.0: argument to `-V' is missing
configure:2223: $? = 1
configure:2246: checking for C compiler default output file name
configure:2249: gcc conftest.c >&5
ld: library not found for -lcrt1.10.5.o
collect2: ld returned 1 exit status
configure:2252: $? = 1
configure: failed program was:I think he questin is, what lib was missing so I can go find it and add it
to some path/dir variable?
I think you need to install the developer tools.
I compile postgresql from sources with no problem on osx 10.5.4 but I
installed developer tools before.
The library which is missing is the following:
configure:2246: checking for C compiler default output file name
configure:2249: gcc conftest.c >&5
ld: library not found for -lcrt1.10.5.o <---------
crt1.10.5.o
I hope it helps.
--
Regards,
Francisco Figueiredo Jr.
Npgsql Lead Developer
http://fxjr.blogspot.com
http://www.npgsql.org
Francisco Figueiredo Jr. wrote:
On Tue, Nov 4, 2008 at 8:21 AM, Tom Allison <tom@tacocat.net> wrote:
Grzegorz Jaśkiewicz wrote:
I feel good about control here, and I certainly don't have any problems.
So, please don't whine :)
Especially since I want to run cvs head, and be able to actually update it
from cvs when I want to, that's the only choice. Postgresql is so easy to
get from sources, compared to other software packages, I can't understand
people even with slightest expierence in unix to have any problems with it.I tried getting a source install on my mac book yesterday and today.
It's not a normal *nix installation. The location of the files are all
non-standard.
'make' is prefixed by /Developer/usr/bin/.I added /Developer/usr/bin to PATH and tried ./configure.
checking build system type... i386-apple-darwin9.5.0
checking host system type... i386-apple-darwin9.5.0
checking which template to use... darwin
checking whether to build with 64-bit integer date/time support... no
checking whether NLS is wanted... no
checking for default port number... 5432
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C
compiler cannot create executables
See `config.log' for more details.config.log shows an exit code of 77 with a statement that compiler cannot
create executables. ???configure:2213: $? = 0
configure:2215: gcc -v </dev/null >&5
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5488~2/src/configure --disable-checking
-enabl
e-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/includ
e/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9
--with-arch=apple
--with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5488)
configure:2218: $? = 0
configure:2220: gcc -V </dev/null >&5
gcc-4.0: argument to `-V' is missing
configure:2223: $? = 1
configure:2246: checking for C compiler default output file name
configure:2249: gcc conftest.c >&5
ld: library not found for -lcrt1.10.5.o
collect2: ld returned 1 exit status
configure:2252: $? = 1
configure: failed program was:I think he questin is, what lib was missing so I can go find it and add it
to some path/dir variable?I think you need to install the developer tools.
I compile postgresql from sources with no problem on osx 10.5.4 but I
installed developer tools before.The library which is missing is the following:
configure:2246: checking for C compiler default output file name
configure:2249: gcc conftest.c >&5
ld: library not found for -lcrt1.10.5.o <---------crt1.10.5.o
I hope it helps.
It confirms what I'm working through.
crt1.o located at /Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.o
crt1.10.5.0 at /Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.10.5.o
So I'm trying to find how to get these directories included in the
compilation. I thought --with-libs and/or --with-includes would have
helped. But it didn't.
This is what I ran (I'm running this from a script so I can repeat it)
--------------------------------------
cd /Users/tom/src/postgresql-8.3.4
export PATH=$PATH:/Developer/usr/bin/
./configure \
--with-libs=/Developer/SDKs/MacOSX10.5.sdk/usr/lib/ \
--with-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/lib/
But I'm on the same error...
Tom Allison <tom@tacocat.net> writes:
I tried getting a source install on my mac book yesterday and today.
It's not a normal *nix installation. The location of the files are all
non-standard.
'make' is prefixed by /Developer/usr/bin/.
The question is *why* the location is nonstandard. Other people's Macs
are not set up that way (mine seems to have these files in the expected
place, for example).
I added /Developer/usr/bin to PATH and tried ./configure.
That would help configure find the stuff in /Developer/usr/bin, but
it does nothing for files that ought to be in /usr/lib, /usr/include,
etc. I am not sure whether adding these to the configure command
would be sufficient:
--with-includes=/Developer/usr/include --with-libraries=/Developer/usr/lib
On the whole the best thing would be to toss /Developer and reinstall
your devtools in the standard places. The nonstandard location is going
to bite you for every package you work with, not only Postgres.
regards, tom lane
On Nov 4, 2008, at 1:02 PM, Tom Allison wrote:
I tried getting a source install on my mac book yesterday and today.
It's not a normal *nix installation. The location of the files
are all
non-standard.
'make' is prefixed by /Developer/usr/bin/.
It's in /usr/bin/make on my OS X box (as well as in /Developer/usr/bin/
make)
If I recall correctly there's an option during the XCode install to
include the commandline tools, which may be what you're missing
It confirms what I'm working through.
crt1.o located at /Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.o
crt1.10.5.0 at /Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.10.5.oSo I'm trying to find how to get these directories included in the
compilation. I thought --with-libs and/or --with-includes would
have helped. But it didn't.This is what I ran (I'm running this from a script so I can repeat it)
That's the runtime. If that's not being included then your development
environment is utterly broken, and messing with configure flags won't
fix it.
Give up on postgresql/configure for now, reinstall XCode with the
commandline tools and check that you can build hello world from the
commandline. Then start over with a clean postgresql tarball.
Cheers,
Steve
On Nov 4, 2008, at 4:14 PM, Tom Lane wrote:
Tom Allison <tom@tacocat.net> writes:
I tried getting a source install on my mac book yesterday and today.
It's not a normal *nix installation. The location of the files are
all
non-standard.
'make' is prefixed by /Developer/usr/bin/.The question is *why* the location is nonstandard. Other people's
Macs
are not set up that way (mine seems to have these files in the
expected
place, for example).I added /Developer/usr/bin to PATH and tried ./configure.
That would help configure find the stuff in /Developer/usr/bin, but
it does nothing for files that ought to be in /usr/lib, /usr/include,
etc. I am not sure whether adding these to the configure command
would be sufficient:--with-includes=/Developer/usr/include --with-libraries=/Developer/
usr/lib
/Developer/usr/ shouldn't be linked against directly- this is the
location for OS X SDKs, so that binaries can be built and linked which
work on older versions of OS X than one is currently using.
Cheers,
M
Tom Lane wrote:
Tom Allison <tom@tacocat.net> writes:
I tried getting a source install on my mac book yesterday and today.
It's not a normal *nix installation. The location of the files are all
non-standard.
'make' is prefixed by /Developer/usr/bin/.The question is *why* the location is nonstandard. Other people's Macs
are not set up that way (mine seems to have these files in the expected
place, for example).I added /Developer/usr/bin to PATH and tried ./configure.
That would help configure find the stuff in /Developer/usr/bin, but
it does nothing for files that ought to be in /usr/lib, /usr/include,
etc. I am not sure whether adding these to the configure command
would be sufficient:--with-includes=/Developer/usr/include --with-libraries=/Developer/usr/lib
On the whole the best thing would be to toss /Developer and reinstall
your devtools in the standard places. The nonstandard location is going
to bite you for every package you work with, not only Postgres.regards, tom lane
I have installed xcode311_2517_developerdvd that I added after I
installed the Leopard OS. This was an upgrade from Tiger but that puked
so I installed Leopard from scratch.
I will try installing this package again.
(note: Unix Tools is checked)
Running just ./configure....
I got past that part...
And finished the configure.
So, the answer seems to be that I did not install the Unix Tools portion
of the XCode tools. Which naturally is so very obvious for installation
of anything used to unix installations... I did strictly the default
installation.
Sorry to run everyone through these loops. But now we all know
something new about Mac OSX
'make' is prefixed by /Developer/usr/bin/.
The question is *why* the location is nonstandard.
Starting with Xcode 3, all the developer tools get installed under the
Developer directory, in order to allow one to easily have multiple versions
of Xcode installed alongside each other. The question then is why the OP
doesn't also have make in /usr/bin, or why his path is configured so that it
finds /Developer/usr/bin first--*that* is what is non-standard.
--
Scott Ribe
scott_ribe@killerbytes.com
http://www.killerbytes.com/
(303) 722-0567 voice