Thread: config
Hi, I just got the Mac OS X public beta running on my home computer and want to compile postgresql for it but don't know whereto start. I have installed Postgresql on linux boxes but they always just work because there are configs for them. Since v7.0.2 doesn't know about Mac OS X I'm assuming I need to get my hands dirty to make it compile. Does anyonehave any pointers on where to begin? I don't know where to start. Out of the box when I run config, it says (which is to be expected): checking host system type... configure: error: can not guess host type; you must specify one Thanks for any advice Mike
Well, it uses a Mach kernel. Adam Lang Systems Engineer Rutgers Casualty Insurance Company ----- Original Message ----- From: "Michael Engelhart" <mengelhart@earthtrip.com> To: <pgsql-general@postgresql.org> Sent: Thursday, October 12, 2000 9:31 PM Subject: [GENERAL] config <snip> > Out of the box when I run config, it says (which is to be expected): > > checking host system type... configure: error: can not guess host type; you must specify one > > > Thanks for any advice > > Mike
<fontfamily><param>Helvetica</param>So? That really doesn't help at all. I guess I didn't say it well enough in my postbut I have no idea how to use the template or configure system beyond typing: ./configure and watching it do it's magic. My question is how do I setup a template that does the "right thing" or do a manual installso that i can get it to compile on Mac OS X. Thanks Mike On Friday, October 13, 2000, at 07:57 AM, Adam Lang wrote: <italic>Well, it uses a Mach kernel.</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>Adam Lang</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>Systems Engineer</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>Rutgers Casualty Insurance Company</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>----- Original Message -----</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>From: "Michael Engelhart" <<mengelhart@earthtrip.com></italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>To: <<pgsql-general@postgresql.org></italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>Sent: Thursday, October 12, 2000 9:31 PM</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>Subject: [GENERAL] config</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic><<snip></italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>> Out of the box when I run config, it says (which is to be expected):</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>></italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>> checking host system type... configure: error: can not guess host type;</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>you must specify one</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>></italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>></italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>> Thanks for any advice</italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>></italic><color><param>0000,0000,0000</param> <italic></italic></color><italic>> Mike</italic><color><param>0000,0000,0000</param>
I'm sure someone can answer this better than me... Mac OS X uses the Mach kernel and a version of BSD (can't recall which). Is it possible one of the existing templates may work? I believe sendmail uses the same sort of thing for host ype, and they have sendmail compiled on OS X (comes with it), so if it comes to the point where no one else on the postgres list can help, might be possible to dig up something from sendmail users. As for choosing a template, unfortunately, again, someone else might help you more. Sorry only have ideas on where to look and not any actual solutions. Adam Lang Systems Engineer Rutgers Casualty Insurance Company ----- Original Message ----- From: "Michael Engelhart" <mengelhart@earthtrip.com> To: <pgsql-general@postgresql.org> Sent: Friday, October 13, 2000 9:31 AM Subject: Re: [GENERAL] config So? That really doesn't help at all. I guess I didn't say it well enough in my post but I have no idea how to use the template or configure system beyond typing: ./configure and watching it do it's magic. My question is how do I setup a template that does the "right thing" or do a manual install so that i can get it to compile on Mac OS X. Thanks Mike On Friday, October 13, 2000, at 07:57 AM, Adam Lang wrote: Well, it uses a Mach kernel. Adam Lang Systems Engineer Rutgers Casualty Insurance Company ----- Original Message ----- From: "Michael Engelhart" <mengelhart@earthtrip.com> To: <pgsql-general@postgresql.org> Sent: Thursday, October 12, 2000 9:31 PM Subject: [GENERAL] config <snip> > Out of the box when I run config, it says (which is to be expected): > > checking host system type... configure: error: can not guess host type; you must specify one > > > Thanks for any advice > > Mike
Thanks Adam. Yeah, I know that it uses a mach kernel and variant of freebsd runs atop the kernel. I would attempt theFreeBSD template but the other snag is that it has to compile on PowerPC. I think you have a good idea and I'll downloadthe sendmail source tarball from the darwin site and look into it's build process and see if I can steal any tidbitsfrom it. I'm also going to post on the darwin list. I was just hoping someone here would have already done all thedirty work for me :-) thanks again, mike > I'm sure someone can answer this better than me... > > Mac OS X uses the Mach kernel and a version of BSD (can't recall which). Is > it possible one of the existing templates may work? I believe sendmail uses > the same sort of thing for host ype, and they have sendmail compiled on OS X > (comes with it), so if it comes to the point where no one else on the > postgres list can help, might be possible to dig up something from sendmail > users. > > As for choosing a template, unfortunately, again, someone else might help > you more. > > Sorry only have ideas on where to look and not any actual solutions. >
Michael Engelhart writes: > I just got the Mac OS X public beta running on my home computer and > want to compile postgresql for it Great! First, go to http://subversions.gnu.org/cgi-bin/cvsweb/config/ and try the latest config.guess, to see if it recognizes your platform. I think it should. Then, download a development snapshot from ftp://ftp.postgresql.org/pub/dev/postgresql-snapshot.tar.gz. You can try to get 7.0 to work as well, but we can't make any use of patches against it. Stick the working config.guess (I hope) in place of the existing one. There are several places in the source that need platform specific information: 1. the "template" in src/templates 2. the port makefile in src/makefiles 3. the dynamic loader in src/backend/port/dynloader 4. spinlock code in src/include/storage/s_lock.h Look into the existing files for what kind of things need to be put there. You should probably start from the netbsd ones. Then, you need to go into configure.in and in the big case statement at the top (line 57 in current sources) map the config.guess output to some name that is used by the template files. Probably "macosx" would be a good choice, but maybe "netbsd" would work out of the box? (I've been thinking about merging the openbsd, freebsd, and netbsd templates into one, so maybe macosx doesn't need to be a separate one.) Let us know if you have questions. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
Michael Engelhart <mengelhart@earthtrip.com> writes: > Thanks Adam. Yeah, I know that it uses a mach kernel and variant of > freebsd runs atop the kernel. I would attempt the FreeBSD template > but the other snag is that it has to compile on PowerPC. FreeBSD template seems like it'd be a good starting point. 7.0.* will probably not work on PPC unless you compile with optimization level -O0, so tweak CFLAGS in the template that way before running configure. Otherwise it seems like it'd more or less work --- give it a shot and let us know how it goes. BTW, I think the PPC optimization issues are solved in current sources. From a development perspective it'd be more interesting to hear your report on what happens with a current nightly snapshot instead of 7.0.2. regards, tom "didn't order my OS X yet :-(" lane
Thanks to everyone for giving me a starting point. here's what I tried so far: changed the CFLAGS in the src/template/freebsd file to: CFLAGS='-O0 -pipe' did ./configure --with-template=freebsd configure succeeded. Did a make and started to build. During the build, there were a ton of messages of this type: ../../../../src/include/catalog/pg_type.h:414: stray '\' in program make exited with this: cc -c -I../../../src/include -O0 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -o dynloader.o dynloader.c dynloader.c:42: header file 'link.h' not found dynloader.c:43: header file 'dlfcn.h' not found ../../../src/include/dynloader.h:19: header file 'link.h' not found make[3]: *** [dynloader.o] Error 1 make[2]: *** [port-recursive] Error 2 make[1]: *** [all] Error 2 make: *** [all] Error 2 Not sure if configure didn't move the correct files or if there was something else wrong. I was using the lastest developersnapshot for testing. I also tried it on a stock 7.0.2 source but got the same error. Any ideas? I'm willing to try and get this working but unfortunately my grasp of the process is pretty weak. Mike On Friday, October 13, 2000, at 11:42 PM, Tom Lane wrote: Michael Engelhart <mengelhart@earthtrip.com> writes: > Thanks Adam. Yeah, I know that it uses a mach kernel and variant of > freebsd runs atop the kernel. I would attempt the FreeBSD template > but the other snag is that it has to compile on PowerPC. FreeBSD template seems like it'd be a good starting point. 7.0.* will probably not work on PPC unless you compile with optimization level -O0, so tweak CFLAGS in the template that way before running configure. Otherwise it seems like it'd more or less work --- give it a shot and let us know how it goes. BTW, I think the PPC optimization issues are solved in current sources. From a development perspective it'd be more interesting to hear your report on what happens with a current nightly snapshot instead of 7.0.2. regards, tom "didn't order my OS X yet :-(" lane
Michael Engelhart writes: > ./configure --with-template=freebsd FWIW, you should probably start with "netbsd" rather than "freebsd" because the FreeBSD code might be rather surprised at finding itself running on a PPC. (But then again, the *bsd codes are mostly the same anyway.) > Did a make and started to build. During the build, there were a ton of messages of this type: > ../../../../src/include/catalog/pg_type.h:414: stray '\' in program Oh man, they didn't take that old NeXTstep C preprocessor for MacOS X? ;-) > cc -c -I../../../src/include -O0 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -o dynloader.o dynloader.c > dynloader.c:42: header file 'link.h' not found > dynloader.c:43: header file 'dlfcn.h' not found > ../../../src/include/dynloader.h:19: header file 'link.h' not found > make[3]: *** [dynloader.o] Error 1 > make[2]: *** [port-recursive] Error 2 > make[1]: *** [all] Error 2 > make: *** [all] Error 2 The MacOS X dynloader seems to be somewhat different than FreeBSD's. Try NetBSD's, or if all fails you can copy over the QNX dynloader files. That platform doesn't support dynamic loading at all (actually, I think it does now, but we haven't gotten around to supporting it) so the stub files should get you to compile at least. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/