Return-Path: owner-postman
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id HAA12636 for postgres-redist; Fri, 19 Aug 1994 07:00:43 -0700
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199408191400.HAA12636@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from hellgate.utah.edu (hellgate.utah.edu [128.110.4.25]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id HAA12626 for <postgres@postgres.berkeley.edu>; Fri, 19 Aug 1994 07:00:41 -0700
Received: from chatsubo.cis.com by hellgate.utah.edu (5.65/utah-2.21s-cs)
	id AA18840; Fri, 19 Aug 94 08:00:25 -0600
Received: by cbs.cis.com (AIX 3.2/UCB 5.64/4.03)
          id AA27917; Fri, 19 Aug 1994 08:00:18 -0600
From: egan@cbs.cis.com (Egan F. Ford)
Message-Id: <9408191400.AA27917@cbs.cis.com>
Subject: Bmake build fail on aix3.2.5
To: postgres@postgres.Berkeley.EDU (Postgres Mailing List)
Date: Fri, 19 Aug 94 8:00:18 MDT
X-Mailer: ELM [version 2.4dev PL17]
Resent-To: postgres-redist@postgres.Berkeley.EDU
Resent-Date: Fri, 19 Aug 94 07:00:43 -0700
Resent-XMts: smtp


I've built postgres for linux and now would like to build it for AIX 3.2.5,
the install docs say that it is a tested platform.  I cannot get bmake to
build.

Help.

Thanks.


Here's the make.log:


make started.
	cc  -DUSE_AIA  -D_BSD  -D_PATH_DEFSYSMK=\"`pwd`/mk-proto/sys.mk\"  -D_PATH_DEFSYSPATH=\"`pwd`/mk-proto\" -I. -c arch.c buf.c compat.c cond.c dir.c hash.c job.c main.c make.c  parse.c str.c suff.c targ.c var.c  setenv.c
arch.c:
buf.c:
compat.c:
"compat.c", line 280.20: 1506-021 (S) Expecting struct or union.
"compat.c", line 282.29: 1506-021 (S) Expecting struct or union.
"compat.c", line 293.23: 1506-021 (S) Expecting struct or union.
cond.c:
dir.c:
hash.c:
job.c:
"/usr/include/jfs/fsparam.h", line 27.0: 1506-236 (W) Macro name BSIZE has been redefined.
"job.c", line 575.22: 1506-021 (S) Expecting struct or union.
"job.c", line 577.18: 1506-021 (S) Expecting struct or union.
"job.c", line 577.61: 1506-021 (S) Expecting struct or union.
"job.c", line 607.28: 1506-021 (S) Expecting struct or union.
"job.c", line 625.12: 1506-021 (S) Expecting struct or union.
"job.c", line 626.18: 1506-021 (S) Expecting struct or union.
"job.c", line 626.61: 1506-021 (S) Expecting struct or union.
"job.c", line 642.18: 1506-021 (S) Expecting struct or union.
"job.c", line 661.23: 1506-021 (S) Expecting struct or union.
"job.c", line 1933.25: 1506-021 (S) Expecting struct or union.
"job.c", line 1933.68: 1506-021 (S) Expecting struct or union.
main.c:
make.c:
parse.c:
str.c:
suff.c:
targ.c:
var.c:
setenv.c:
The error code from the last failed command is 1.

Make Quitting.


here's my Makefile.global:


#
# $Header: /usr/local/devel/postgres/src/RCS/Makefile.global,v 1.46 1994/06/30 11:03:42 aoki Exp $
#
# A Makefile.global is seen by the Makefile in the current
# directory and any Makefiles in any subdirectories (assuming
# they .include <postgres.global.mk>).  Also, if there is
# a Makefile.global in the "obj" directory it is included after.
# This allows machines to tailor Makefiles and override default
# setting when sharing a source tree between a number of
# machines.  Note that since the "obj" directories themselves
# are actually symbolic links which are stored on the serving
# machine and visible to all sharing sites, it is not possible to
# change where the "obj" directories point (without changing
# it for everyone).  You can, however, change any of the values
# below simply by altering your private copy of this Makefile
# in the "obj" directory.
#
# Note: if you change any of these defines you probably have to 
#
#	bmake clean; bmake
#
# since no dependecies are created for these. (of course you can 
# be crafty and check what files really depend on them and just remake
# those).
#

#
# == CONFIGURATION SECTION ==
#

#
# The following directories are where the tools necessary to 
# build postgres will be installed.
#
# To bootstrap (that is, if bmake(1) is not installed on your 
# system) you should cd(1) to the src/tools/bmake directory 
# and type
#
#       ./Bootstrap portname
#
# where portname is one of those listed below.  This will install 
# bmake(1) in the TOOLSBINDIR and supporting postgres configuration 
# files in TOOLSLIBDIR.  Then you can go back up to the src/ 
# directory and run "bmake".  You must put the TOOLSBINDIR, whatever 
# that may be, in your PATH before attempting to build postgres.
#
TOOLSBINDIR= /usr/postgres/bin
TOOLSLIBDIR= /usr/postgres/lib

#
# Following are settings pertaining to the postgres build and 
# installation.  The most important one is obviously the name 
# of the port.
#

#
#  The name of the port.  Valid choices are:
#	aix		-	IBM POWER on AIX 3.2.5
#	alpha		-	DEC Alpha AXP on OSF/1 1.3
#	hpux		-	HP PA-RISC on HP-UX 9.00 or 9.01
#	sparc_solaris	-	SUN SPARC on Solaris 2.3
#	sparc		-	SUN SPARC on SunOS 4.1.2 or 4.1.3
#	ultrix4		-	DEC MIPS on Ultrix 4.2, 4.2A or 4.3A
#  Some hooks are provided for
#	linux		-	Intel x86 on Linux 0.99pl11
#	svr4		-	Intel x86 on Intel SVR4
#	next		-	Motorola MC68K or Intel x86 on NeXTSTEP 3.2
#  but these are guaranteed not to work as of yet.
#
#  XXX	Note that you MUST set PORTNAME here (or on the command line) so 
#	that port-dependent variables are correctly set within this file.
#	./obj/Makefile.global does not take effect (for .if purposes) 
#	until after this file is processed!
#
PORTNAME?=	aix

#
# POSTGRESLOGIN is the login name of the user who gets special
# privileges within the database.  By default it is "postgres", but
# you can change it to any existing login name (such as your own 
# login if you are compiling a private version or don't have root
# access).
#
POSTGRESLOGIN=	postgres

#
# For convenience, POSTGRESDIR is where DATADIR, BINDIR, and LIBDIR 
# and other target destinations are rooted.  Of course, each of these is 
# changable separately.  This is usually "/usr/local/postgres" but may be 
# different for the postgres development team and sequoia users.
#
POSTGRESDIR?=	/usr/postgres

#
# DATADIR specifies where the postmaster expects to find its database.
# This may be overridden by command line options or the PGDATA environment
# variable.
#
DATADIR=	${POSTGRESDIR}/data

#
# Where the postgres executables live (changeable by just putting them
# somewhere else and putting that directory in your shell PATH)
#
BINDIR=		${POSTGRESDIR}/bin

#
# Where libpq.a gets installed.  You must put it where your loader will
# look for it if you wish to use the -lpq convention.  Otherwise you
# can just put the absolute pathname to the library at the end of your
# command line.
#
LIBDIR=		${POSTGRESDIR}/lib

#
# Where the man pages (suitable for use with "man") get installed.
#
POSTMANDIR=	${POSTGRESDIR}/man

#
# Where the formatted documents (e.g., the reference manual) get installed.
#
POSTDOCDIR=	${POSTGRESDIR}/doc

#
# Where the header files necessary to build frontend programs get installed.
#
HEADERDIR=	${POSTGRESDIR}/include

#
# == END OF NORMAL CONFIGURATION SECTION ==
#

#
# MACHINE is needed for machine-dependent part of the system mk files.
# (We don't really use this feature.)
#
.if (${PORTNAME} == "alpha" || ${PORTNAME} == "ultrix4")
MACHINE!=machine
.elif (${PORTNAME} == "sparc" || ${PORTNAME} == "sparc_solaris")
MACHINE=sparc
.elif (${PORTNAME} == "hpux")
MACHINE=hppa
.elif (${PORTNAME} == "linux" || ${PORTNAME} == "svr4")
MACHINE=i386
.endif

#
# FEATURES: 
# To disable a feature, comment out the entire definition
# (that is, prepend '#', don't set it to "0" or "no").
#

#
# Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
# multi-byte types to generate a bus error.
#
# Don't turn this on on HP-UX or Alpha unless you want lots of bus errors.
# On other machines it won't make a difference.
#
.if (${PORTNAME} == "ultrix4")
ENFORCE_ALIGNMENT=
.endif

#
# If you don't have the SunPro compiler for Solaris and are using gcc
# instead, define this.  Regular gcc does NOT work for this.  See the
# installation instructions.
#
.if (${PORTNAME} == "sparc_solaris")
#CC=solcc
.endif

#
# The flags we give to install(1) are intended for the BSD version of
# install(1) and not the System V version.
#
# This should probably be in the sys.mk file.
#
.if (${PORTNAME} == "aix" || ${PORTNAME} == "sparc_solaris")
INSTALL=/usr/ucb/install
.endif
.if (${PORTNAME} == "alpha")
INSTALL=/bin/installbsd
.endif
.if (${PORTNAME} == "hpux")
# This is a script from the MIT X11 distribution.  we provide it
# in src/tools/bsdinst if you don't already have it installed.
INSTALL=bsdinst
.endif
.if (${PORTNAME} == "ultrix4" || ${PORTNAME} == "sparc" || ${PORTNAME} == "linux")
INSTALL=/usr/bin/install
.endif

#
# The default bmake rules will strip binaries while installing them.
# This line OVERRIDES the default stripping option in the .mk files.
# You do NOT want to comment out or remove this line.
#
STRIP=

#
# Man pages don't currently live with sources.
# This line OVERRIDES the default action of trying to install man 
# pages from the source directories (which doesn't work).
# You do NOT want to comment out or remove this line.
#
NOMAN=

#
# If this is set, then target "install" depends on "all".
#
ALLINSTALL=

#
# Comment out CDEBUG to turn off debugging and sanity-checking.
#
#	XXX on MIPS, use -g3 if you want to compile with -O
#
#CDEBUG= -g

#
# Comment out PROFILE to disable profiling.
#
#	XXX define on MIPS if you want to be able to use pixie.
#	    note that this disables dynamic loading!
#
#PROFILE=

#
# Comment out OLD_MKDIR if your mkdir has the -p flag or your install
# creates all intermediate directories.
#
.if (${PORTNAME} != "ultrix4" && ${PORTNAME} != "linux")
OLD_MKDIR=
.endif

#
# If you plan to use Kerberos for authentication...
#
# Comment out KRBVERS if you do not use Kerberos.
# 	Set KRBVERS to "4" for Kerberos v4, "5" for Kerberos v5.
#	XXX Edit the default Kerberos variables below!
#
#KRBVERS=	5

#
# Globally pass Kerberos file locations.
#	these are used in the postmaster and all libpq applications.
#
#	Adjust KRBINCS and KRBLIBS to reflect where you have Kerberos
#		include files and libraries installed.
#	PG_KRB_SRVNAM is the name under which POSTGRES is registered in
#		the Kerberos database (KDC).
#	PG_KRB_SRVTAB is the location of the server's keytab file.
#
.ifdef KRBVERS
KRBINCS= -I/usr/athena/include
KRBLIBS= -L/usr/athena/lib
KRBFLAGS+= ${KRBINCS} -DPG_KRB_SRVNAM='"postgres_dbms"'
.   if ${KRBVERS} == "4"
KRBFLAGS+= -DKRB4
KRBFLAGS+= -DPG_KRB_SRVTAB='"/etc/srvtab"'
KRBLIBS+= -lkrb -ldes
.   elif ${KRBVERS} == "5"
KRBFLAGS+= -DKRB5
KRBFLAGS+= -DPG_KRB_SRVTAB='"FILE:/krb5/srvtab.postgres"'
KRBLIBS+= -lkrb5 -lcrypto -lcom_err -lisode
.   endif
.endif


#
# Globally pass debugging/optimization/profiling flags based
# on the options selected above.
#
.ifdef CDEBUG
CFLAGS= ${CDEBUG}
LDFLAGS= ${CDEBUG}
.else
.  if (${PORTNAME} == "linux")
CFLAGS= -O2
.  else
CFLAGS= -O
.  endif
#
# Uncommenting this will make things go a LOT faster, but you will
# also lose a lot of useful error-checking.
#
#CFLAGS+= -DNO_ASSERT_CHECKING
.endif

.ifdef PROFILE
CFLAGS+= ${PROFILE}
LDFLAGS+= ${PROFILE}
.endif

#
# Globally pass PORTNAME
#
CFLAGS+= -DPORTNAME_${PORTNAME}

#
# Globally pass the default TCP port for postmaster(1).
#
CFLAGS+= -DPOSTPORT='"4321"'


#
# == OTHER RANDOM CONFIGURATION ITEMS ==
#

#
# Globally define SEQUOIA for development at Berkeley and other
# Sequoia 2000 Project sites.
#
# This turns on support for the Sony WORM optical disk jukebox
# storage manager, the main memory storage manager, and both
# Jaquith and external large objects.  None of these options
# are supported outside of UC Berkeley.
#
#CFLAGS+= -DSEQUOIA
#ALLOW_PG_GROUP=


#
# This is the time, in seconds, at which a given backend server
# will wait on a lock before deciding to abort the transaction
# (this is what we do in lieu of deadlock detection).
#
# Low numbers are not recommended as they will tend to cause
# false aborts if many transactions are long-lived.
#
CFLAGS+= -DDEADLOCK_TIMEOUT=60


#
# signal(2) handling - this is here because it affects some of 
# the frontend commands as well as the backend server.
#
# Ultrix and SunOS provide BSD signal(2) semantics by default.
#
# SVID2 and POSIX signal(2) semantics differ from BSD signal(2) 
# semantics.  We can use the POSIX sigaction(2) on systems that
# allow us to request restartable signals (SA_RESTART).
#
.if (${PORTNAME} == "alpha" || \
     ${PORTNAME} == "svr4" || \
     ${PORTNAME} == "sparc_solaris")
CFLAGS+= -DUSE_POSIX_SIGNALS
.endif
#
# Some systems don't allow restartable signals at all unless we 
# link to a special BSD library.
#
.if (${PORTNAME} == "aix")
# the -lm is because "pow" is defined in libbsd.a and we want pow(3m)
LDADD+= -lm -lbsd
.endif
.if (${PORTNAME} == "hpux")
LDADD+= -lBSD
.endif
#
# The Linux gnulib #defines the problem away for you and calls 
# the BSD routines if you give it the right flags.
#
.if (${PORTNAME} == "linux")
CFLAGS+= -D__USE_BSD -D__USE_BSD_SIGNAL
LDADD+= -lbsd
.endif
#
# We devoutly hope that there aren't any systems that provide
# neither POSIX signals nor BSD signals.  The alternative 
# is to do signal-handler reinstallation, which doesn't work well 
# at all.
#


#
# NOFIXADE disallows unaligned access.
#	on Ultrix and OSF/1 it invokes an explicit syscall.
#	on HP-UX it turns off certain compiler options.
# This is defined here because a bunch of clients include tmp/c.h,
# which is where the work is done on HP-UX.  It only affects the
# backend on Ultrix and OSF/1.
#
# Don't mess with this.  It's here because it's global, not because
# you're supposed to change anything.
#
.if defined(ENFORCE_ALIGNMENT)
.  if (${PORTNAME} == "ultrix4" || \
       ${PORTNAME} == "alpha" || \
       ${PORTNAME} == "hpux")
CFLAGS+= -DNOFIXADE
.  endif
.else
.  if (${PORTNAME} == "hpux")
HPUX_VERS!=uname -r
HPUX_MAJOR=${HPUX_VERS:R:E}
HPUX_MINOR=${HPUX_VERS:E}
.    if (${HPUX_MAJOR} == "08")
CFLAGS+= +u -DHP_S500_ALIGN
LDFLAGS+= +u
.    elif (${HPUX_MAJOR} == "09")
CFLAGS+= +u4
LDFLAGS+= +u4
.    endif
.  elif (${PORTNAME} == "alpha")
CFLAGS+= -DNOPRINTADE
.  endif
.endif


#
# MAKE_EXPORTS is required for some loaders that want a file of
# symbol names to tell them what to export/import.
#
.if (${PORTNAME} == "aix" || ${PORTNAME} == "svr4")
MAKE_EXPORTS=
.endif


#
# RANLIB is not used on several systems.
#
.if (${PORTNAME} == "hpux" || ${PORTNAME} == "sparc_solaris")
RANLIB=touch
.endif


#
# Other random things that must be passed everywhere to enable 
# everything to compile.  :-/
#
.if (${PORTNAME} == "aix")
#
# The -qmaxmem is because of optimizer limits.
# The HAVE_ANSI_CPP flag indicates that cc isn't ANSI but also doesn't
#  have a Reiser (pcc-style) cpp.
#
CFLAGS+= -qchars=signed -qmaxmem=4000 -DHAVE_ANSI_CPP
.endif
.if (${PORTNAME} == "sparc_solaris")
#
# The extra -I flag is to scoop up extra BSD-emulating headers.
#
CFLAGS+= -DSYSV_DIRENT -I$(POSTGRESDIR)/src/backend/port/sparc_solaris
LDADD+= -lsocket -lnsl
.  if (${CC} != "cc")
#
# This is for gcc.
#
CFLAGS+= -munaligned-doubles
.  endif
.endif
-- 
Egan F. Ford
egan@cbs.cis.com

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
