Thread: Building PostgreSQL 8.3.1 on OpenVMS 8.3 AXP

Building PostgreSQL 8.3.1 on OpenVMS 8.3 AXP

From
"Mihai Criveti"
Date:
I am trying to build PostgreSQL 8.3.1 on OpenVMS 8.3 Alpha, patched to UPDATE v6.0 ECO:<br />DEC AXPVMS VMS83A_UPDATE
V6.0       Patch       Install     Val 14-MAR-2008<br /><br />Using the HP C compilers:<br />HP C Version 7.3 for
OpenVMSAlpha Systems<br /> HP C++ Version V7.3 for OpenVMS Alpha Systems<br /><br />And the GNU (GNV) POSIX
userland:<br/>DEC AXPVMS GNV V2.1-2                Full LP     Install     Val 22-MAR-2008<br /><br />$ gcc
--version<br/>GNV Dec 10 2007 16:40:09<br /> HP C V7.3-009 on OpenVMS Alpha V8.3<br /><br />$ make --version<br />GNU
Makeversion 3.78.1, by Richard Stallman and Roland McGrath.<br />Built for VMS<br /><br /><br />Anyway, I've setup the
POSIXenvironment and fired up ./configure (I've tried various templates for starters, since there isn't a default one
forOpenVMS):<br /> What I've seen is that GNU autotools will create an empty conftest.c file, and attempt compilation.
Whilean empty file *does* compile to a.out, it won't return 0, but 179.<br />bash$ gcc conftest.c<br /><br /><br />
^<br/> %CC-W-EMPTYFILE, Source file does not contain any declarations.<br /> at line number 1 in file
SYS$SYSROOT:[SYSMGR.VIM.GNU.ALPHA.POSTGRESQL-8_3_1]CONF<br/> TEST.C;1<br /> %LINK-W-WRNERS, compilation warnings<br />
       in module CONFTEST file SYS$SYSROOT:[SYSMGR.VIM.GNU.ALPHA.POSTGRESQL-8_3<br /> _1]CONFTEST.O;2<br />
%LINK-W-USRTFR,image SYS$SYSROOT:[SYSMGR.VIM.GNU.ALPHA.POSTGRESQL-8_3_1]A.OUT;3<br />  has no user transfer address<br
/><br/>bash$ ./a.out<br />%DCL-E-NOTFR, no transfer address<br />bash$ echo $?<br />154<br /><br />Of course, since
configurewill rewrite that file a *lot* of times, a simple echo "#include <stdio.h> int main() { return 0 }" >
conftest.cwon't fix the issue.<br /><br />I've had similar issues / results on the z/OS / AS/390 platform, using
c89.<br/><br />Any other way around this then digging deep into autotools? Also, are there any previous OpenVMS ports
ofPostgreSQL I could make use of?<br /><br /><br />BUILD LOGS:<br />==========<br /><br />bash$ ./configure
--with-template=AIX<br/>%DCL-W-PARMDEL, invalid parameter delimiter - check use of special characters<br /> \.SH\<br
/>%DCL-W-IVVERB,unrecognized command verb - check validity and spelling<br />  \HOSTINFO\<br />checking build system
type...alpha-dec-vms<br />checking host system type... alpha-dec-vms<br />checking which template to use... AIX<br
/>checkingwhether to build with 64-bit integer date/time support... no<br /> checking whether NLS is wanted... no<br
/>checkingfor default port number... 5432<br />checking for gcc... gcc<br />checking for C compiler default output file
name...a.out<br />checking whether the C compiler works...<br />%DCL-E-NOTFR, no transfer address<br /> configure:
error:cannot run C compiled programs.<br />If you meant to cross compile, use `--host'.<br />See `config.log' for more
details.<br/><br /><br /><br />$ TYPE config.log<br />PATH: /bin<br />PATH: /gnu/bin<br />PATH: /GNU/BIN<br /> PATH:
/usr/bin<br/>PATH: /usr/local/bin<br />PATH: .<br />configure:1414: checking build system type<br />configure:1432:
result:alpha-dec-vms<br />configure:1440: checking host system type<br />configure:1454: result: alpha-dec-vms<br />
configure:1464:checking which template to use<br />configure:1564: result: AIX<br />configure:1706: checking whether to
buildwith 64-bit integer date/time support<br />configure:1738: result: no<br />configure:1745: checking whether NLS is
wanted<br/> configure:1780: result: no<br />configure:1788: checking for default port number<br />configure:1818:
result:5432<br />configure:2197: checking for gcc<br />configure:2197: found /gnu/bin/gcc<br />configure:2197: result:
gcc<br/>configure:2208: checking for C compiler version<br /> configure:2214: gcc --version </dev/null >&5<br
/>GNVDec 10 2007 16:40:09<br />HP C V7.3-009 on OpenVMS Alpha V8.3<br />configure:2214: $? = 0<br />configure:2219: gcc
-v</dev/null >&5<br />? cc: No support for switch -v<br /> %LINK-F-NOMODS, no input modules specified (or
found)<br/>configure:2219: $? = 2<br />configure:2224: gcc -V </dev/null >&5<br />GNV Dec 10 2007 16:40:09<br
/>HPC V7.3-009 on OpenVMS Alpha V8.3<br />configure:2224: $? = 0<br /> configure:2246: checking for C compiler default
outputfile name<br />configure:2295: gcc    conftest.c  >&5<br /><br /><br />--<br />Criveti Mihai<br /><a
href="http://unixsadm.blogspot.com/">http://unixsadm.blogspot.com/</a>- <span>UNIX, OpenVMS and Windows System
Administration,Digital Forensics, High Performance Computing, Clustering and Distributed Systems.<br /></span>In girum
imusnocte, ecce et consumimur igni.<br /><h1 class="title"></h1><span></span> 

Re: Building PostgreSQL 8.3.1 on OpenVMS 8.3 AXP

From
Tom Lane
Date:
"Mihai Criveti" <cmihai@boreas.ro> writes:
> I am trying to build PostgreSQL 8.3.1 on OpenVMS 8.3 Alpha, patched to
> UPDATE v6.0 ECO:

> $ gcc --version
> GNV Dec 10 2007 16:40:09
> HP C V7.3-009 on OpenVMS Alpha V8.3

Hmmm ... any chance of using a real gcc, instead of HP's compiler doing
a poor job of counterfeiting it?  It's possible that specifying CC=cc
would help by avoiding that particular issue.  However ...

> What I've seen is that GNU autotools will create an empty conftest.c file,
> and attempt compilation. While an empty file *does* compile to a.out, it
> won't return 0, but 179.

An empty file doesn't run (or even compile) on most platforms, eg

$ touch foo.c
$ gcc foo.c
/usr/ccs/bin/ld: Unsatisfied symbols:  main
collect2: ld returned 1 exit status

If the configure script really is building an empty .c file to test
with, then you've got some low-level tools problems you need to solve
before configure will do anything very useful.  It looks to me like
that first test program is built with

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
 ; return 0;
}
_ACEOF

It doesn't get much simpler than that :-(  Either cat doesn't work or
you've got some shell-level incompatibilities.
        regards, tom lane


Re: Building PostgreSQL 8.3.1 on OpenVMS 8.3 AXP

From
Simon Riggs
Date:
On Sat, 2008-03-22 at 22:40 +0200, Mihai Criveti wrote:
> I am trying to build PostgreSQL 8.3.1 on OpenVMS 8.3 Alpha, patched to
> UPDATE v6.0 ECO:
> DEC AXPVMS VMS83A_UPDATE V6.0        Patch       Install     Val
> 14-MAR-2008
> 
> Using the HP C compilers:
> HP C Version 7.3 for OpenVMS Alpha Systems
> HP C++ Version V7.3 for OpenVMS Alpha Systems

Did you ever get this to work?

I notice we don't have an OpenVMS port on the build farm, so a
successful build report would be interesting.

Thanks,

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support