I've been trying to get postgresql working on IRIX. It compiles successfully with MIPSPRO, but it comes up with a variety of errors, with the end result being that initdb will not complete. With version 9.1.9, it fails due to a syntax error in the sql commands to init the template database. With 9.0.9, it has a problem with one of the .so files. I didn't try to build a 9.2, because the last time I tried to do this, I had the syntax error problem with all of the 9.2 versions I tried.
However, all is not lost. If one uses the version of gcc off the sgi freeware distro, it works perfectly (or at least version 9.2.4 does (just use CC=gcc for gcc(assuming that /usr/freeware/bin is on your path) and LIBS="-lpthread"(this allows it to pass the thread safety test, which fails unless this is declared)). (I'm sure it will also work with the nekoware gcc, but I was feeling lazy, and I just wanted click and go convenience) So, the point of this post is if you are compiling a modern postgresql, and are tearing your hair out, and cursing at the computer, the problem isn't the code, it's the compiler.
What's going wrong? I'm guessing that since MIPSPRO has better optimization, that is causing the problem. Now, I'm not a computer engineer (nor do I play one on TV) but that would be my best guess as to a problem. If anyone wants to take a look, and chime in with a fix, go ahead. But, I feel that just using gcc is a good enough work around.
However, all is not lost. If one uses the version of gcc off the sgi freeware distro, it works perfectly (or at least version 9.2.4 does (just use CC=gcc for gcc(assuming that /usr/freeware/bin is on your path) and LIBS="-lpthread"(this allows it to pass the thread safety test, which fails unless this is declared)). (I'm sure it will also work with the nekoware gcc, but I was feeling lazy, and I just wanted click and go convenience) So, the point of this post is if you are compiling a modern postgresql, and are tearing your hair out, and cursing at the computer, the problem isn't the code, it's the compiler.
What's going wrong? I'm guessing that since MIPSPRO has better optimization, that is causing the problem. Now, I'm not a computer engineer (nor do I play one on TV) but that would be my best guess as to a problem. If anyone wants to take a look, and chime in with a fix, go ahead. But, I feel that just using gcc is a good enough work around.
_________________
SGI: IBM: OpenPower 710; RS/6000 7046-B50 DEC: VaxStation 4000/90; Personal Workstation 500AU; Dec 3000/500; DECSERVER 200/MC