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)

Поиск
Список
Период
Сортировка
Mihai Criveti <cmihai@boreas.ro> writes:
> OK, I've compiled a 64 bit optimized version, and it works great! No issues
> what so ever in configure, make or install. Thanks a lot for all the support
> :-).

> PostgreSQL rocks!

> What I've used to build it:

> CC="xlc_r -q64 -qnoansialias"

Hmm.  I think -qnoansialias corresponds to gcc's -fno-strict-aliasing,
which we *know* is necessary to build a working Postgres on recent gcc
versions.  I have not checked the exact symptoms of -fstrict-aliasing
recently, but what you're reporting is definitely consistent with the
idea that the compiler is improperly reordering some assignments, which
is basically what the aliasing business is about.  So that switch seems
like the critical issue here.

I see that configure knows about that switch, but it only tries to use
it if CC = xlc:

elif test x"${CC}" = x"xlc"; then # AIX xlc has to have strict aliasing turned off too
PGAC_PROG_CC_CFLAGS_OPT([-qnoansialias])
fi

So it seems we have a couple of problems here.  Using xlc_r or xlC_r
or adding -q64 to CC (rather than CFLAGS which is where it really
belongs) will confuse this check.  It also seems a bit schizophrenic
to have this bit of knowledge wired into configure itself while there
are some other AIX-specific switches in src/template/aix.

Would it be reasonable to change the test quoted above to

elif test "$PORTNAME" = "aix"; then ...

that is try -qnoansialias anytime the compiler isn't gcc and the
platform is aix?  Is xlc used on any platform other than aix?

Also, has anyone got a clue what the switches selected in
src/template/aix actually do, and whether they still make sense
for modern AIX versions?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS