Thread: pgsql on Mac OS X?
Hello, I'd really like to try PostgreSQL on Mac OS X, if it can be made to work. Since it's not listed as a supported platform, I decided to be insane and give it a try myself ;-) The last time I programmed in UNIX was 1987, so I'm really out of date wrt BSD and GNU. I'm also a total newbie to Postgres. But at least I've been coding in C & C++ for 15 years, so I've got some degree of understanding. First question is: does anyone know of a reason why this should *not* work, has it already been tried and abandonded? I've gotten it to compile, partly by making changes correctly, and partly using the "bull in a china shop" technique of directly hacking source files so that they'll work on this platform but not others. I have gotten it down to 1 linker error, the TAS function is missing. (I have to stop for a few days because of a deadline I've got on a project.) I haven't had time to investigate what TAS is; I know where the source files are; I know there's a couple of platform-specific ones and a dummy one. I know that there's a need_tas flag in configure. I have tried building with that flag set to both yes and no; it made no difference. But I had trouble with make not rebuilding after some other changes to configure, which I believe was due to a bug (I think) in OS X having to do with links and modification dates. Any advice or hints? Scott Ribe scott_ribe@killerbytes.com http://www.killerbytes.com/ (303) 665-7007 voice
> First question is: does anyone know of a reason why this should *not* > work, has it already been tried and abandonded? No, all info in the porting comments are much older than MacOS-X. I'm not sure how different it is from other *nixes, but if it is close you should be able to make this work. > I've gotten it to compile, partly by making changes correctly, and partly > using the "bull in a china shop" technique of directly hacking source > files so that they'll work on this platform but not others. You can always clean this up later. > I have gotten it down to 1 linker error, the TAS function is missing. (I > have to stop for a few days because of a deadline I've got on a project.) > I haven't had time to investigate what TAS is; I know where the source > files are; I know there's a couple of platform-specific ones and a dummy > one. I know that there's a need_tas flag in configure. I have tried > building with that flag set to both yes and no; it made no difference. > But I had trouble with make not rebuilding after some other changes to > configure, which I believe was due to a bug (I think) in OS X having to > do with links and modification dates. TAS is "test and set", and is used to delimit critical sections of shared data. You should have appropriate TAS functions available, since we do run on Linux-PPC machines, as long as your assembler is compatible with the code as currently written. If it is not, then you may need to look into touching it up. In either case, the ./configure tests are not identifying your platform and matching up the right TAS code, and/or your compiler is missing a predefined variable (e.g. "__GNU__" or "__PPC__" or ??) which the TAS code uses to #define the right code to compile. - Thomas
Scott Ribe writes: > I'd really like to try PostgreSQL on Mac OS X We already have a patch pending for that. I'm inclined to commit the "safe" sections sometime soon. From what I understood it should be working, if you have a late enough version of the darwin kernel. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/