Skip site navigation (1) Skip section navigation (2)

AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem
Date: 2000-12-30 03:36:24
Message-ID: 200012300336.eBU3aOC23546@hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Travis Pouarz (twp1(at)duke(dot)edu) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
AIX 4.3.1, 7.0.3 build annoyances: C++ comments, make all, macro problem

Long Description
select version(): PostgreSQL 7.0.3 on rs6000-ibm-aix4.3.1.0, compiled by xlc 

Building Postgres 7.0.3 on AIX 4.3.1 using xlc (__IBMC__ = 436).
GNU Make version 3.77
Ran ./configure with '--with-tcl' (as well as other stuff)

I ran into the following three problems during build.  I found workarounds to all three problems.

---- [1]
I needed to 'make all' explicitly.  'make' alone resulted in this behavior:

> make
Making postgres.imp
./backend/port/aix/mkldexport.sh postgres /.../pkg/postgresql-7.0.3/bin > postgres.imp
nm: postgres: 0654-200 Cannot open the specified file.
nm: No such file or directory
xlc -Wl,-bE:./backend/postgres.imp -o postgres  ../utils/version.o -L/.../lib -ltcl8.0  -L/.../readline-4.1/lib -lPW -lcrypt -lld -lnsl -ldl -lm -lreadline -ltermcap -lcurses 
xlc: 1501-228 input file ../utils/version.o not found
make: *** [postgres.imp] Error 252

---- [2]
interfaces/odbc/pgtypes.h
 
has a single C++ comment.  I would guess this is an error.  Rather than changing the source I added '-qcpluscmt' to my compiler flags so the c compiler would accept C++ comments.

Actually, I see in http://www.postgresql.org/docs/devhistory2.html that this is intentional "We switched to C++ so we could use those nifty // single line comments." :-)

---- [3]
interfaces/odbc/dlg_specific.h

I had to make the following change in dlg_specific.h:
 
#if 0
#define xstr(s)         str(s)
#define str(s)          #s
#define ODBCINST_INI    xstr(ODBCINST) "/odbcinst.ini"
#endif
#define ODBCINST_INI    "/odbcinst.ini"

To fix errors of this type:

xlc -I../../include -I../../backend -I/.../include -I/.../pkg/readline-4.1/include -qmaxmem=16384 -qhalt=w -qsrcmsg -qlanglvl=extended -qlonglong -qcpluscmt -I. -DHAVE_CONFIG_H   -c psqlodbc.c -o psqlodbc.o
      106 |         getGlobalDefaults("PostgreSQL", "" "/odbcinst.ini", 0);
            .....................................a.........................
  a - 1506-010 (W) Macro str invoked with a null argument for parameter s.
----


Sample Code


No file was uploaded with this report


Responses

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2000-12-30 03:40:44
Subject: AIX 4.3.1 build, need to manually copy postgres.imp for tcl linking
Previous:From: Peter EisentrautDate: 2000-12-30 00:35:13
Subject: Re: /bin/sh: !: not found

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group