Re: 64 bit PostgreSQL 8.3.6 build on AIX 5300-09-02-0849 with IBM XL C/C++ 10.1.0.1 - initdb fails (could not dump unrecognized node type: 650) - Mailing list pgsql-hackers

From Mihai Criveti
Subject Re: 64 bit PostgreSQL 8.3.6 build on AIX 5300-09-02-0849 with IBM XL C/C++ 10.1.0.1 - initdb fails (could not dump unrecognized node type: 650)
Date
Msg-id 22c159aa0902090138i58d3c929t151af6990a6650b1@mail.gmail.com
Whole thread Raw
In response to Re: 64 bit PostgreSQL 8.3.6 build on AIX 5300-09-02-0849 with IBM XL C/C++ 10.1.0.1 - initdb fails (could not dump unrecognized node type: 650)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
OK, I've managed to compile a 32 bit PostgreSQL successfully and it runs. I'm not yet sure if the issues are due to using the C++ compiler to compile C code, optimization flags or 64 bit builts, but I'll rebuilt it a few times to pinpoint the real issue.

Either way, I think it was my mistake to use xlC_r instead of xlc_r. Thanks a lot for the support.
If I get these issues sorted out, I'll see if I can add the machine to the buildfarm.

I've recompiled it with clean environment variables (no CC defined, etc), using xlc (/usr/vac/bin/xlc_r), the C compiler instead of using xlC_r (the C++ compiler). No -q64 (64 bit build) and using:

CFLAGS='-qnooptimize' ./configure --enable-cassert --enable-debug --with-includes=/opt/freeware/include --with-libraries=/opt/freeware/lib --enable-thread-safety

I see gmake using:
xlc -qnooptimize -qnoansialias -g -I../../../src/include -I/opt/freeware/include  -c -o pg_enum.o pg_enum.c

Now initdb runs fine.

phobos$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.
The default database encoding has accordingly been set to LATIN1.
The default text search configuration will be set to "english".

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
or
    /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start


On Mon, Feb 9, 2009 at 9:40 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Mihai Criveti <cmihai@boreas.ro> writes:
> So if this is a compiler bug, it certainly isn't an obvious one. I'll dig
> deeper to see how I can convince configure to use -qnooptimize.

Set CFLAGS in its environment.  The default is set in src/template/aix
     CFLAGS="-O2 -qmaxmem=16384 -qsrcmsg -qlonglong"

> When I've used the build farm scripts, configure gives xlC_r these flags:
> configure:7117: xlC_r -q64 -o conftest -O2 -qmaxmem=16384 -qsrcmsg
> -qlonglong -g  -I/opt/freeware/include/libxml2   -L/opt/freeware/lib
> conftest.c -lm  >&5

Dunno where the -q64 came from ...

> 1506-396 (W) Option -qlonglong is incompatible with option -qlanglvl=extc99
> and is ignored.

Seems like these switches might need a revisit for latest AIX.

                       regards, tom lane



--
Criveti Mihai
http://unixsadm.blogspot.com

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Synch Replication
Next
From: Zeugswetter Andreas OSB sIT
Date:
Subject: Re: 64 bit PostgreSQL 8.3.6 build on AIX 5300-09-02-0849 with IBM XL C/C++ 10.1.0.1 - initdb fails (could not dump unrecognized node type: 650)