Thread: Compile fails on AIX 6.1

Compile fails on AIX 6.1

From
"Lars Ewald (web.de)"
Date:
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Lars Ewald
Your email address      : l.ewald@web.de


System Configuration:
---------------------
  Architecture (example: Intel Pentium)         : ppc

  Operating System (example: Linux 2.4.18)      : AIX 6.1.0.0

  PostgreSQL version (example: PostgreSQL 9.3.4):  PostgreSQL 9.3.4

  Compiler used (example: gcc 3.3.5)            : gcc 4.8.0


Please enter a FULL description of your problem:
------------------------------------------------
As already described in the Mailing list I got the following error while running
"make" on AIX.

http://www.postgresql.org/message-id/521236DA.5040607@ahastie.net

/tmp//ccJHanGQ.s: line 19688: 1252-142 Syntax error.
/tmp//ccJHanGQ.s: line 19689: 1252-142 Syntax error.
/tmp//ccJHanGQ.s: line 19690: 1252-142 Syntax error.
/tmp//ccJHanGQ.s: line 19693: 1252-142 Syntax error.
/tmp//ccJHanGQ.s: line 20040: 1252-142 Syntax error.
/tmp//ccJHanGQ.s: line 20043: 1252-142 Syntax error.
/tmp//ccJHanGQ.s: line 20044: 1252-142 Syntax error.
/tmp//ccJHanGQ.s: line 20045: 1252-142 Syntax error.
/tmp//ccJHanGQ.s: line 20046: 1252-142 Syntax error.
/tmp//ccJHanGQ.s: line 20049: 1252-142 Syntax error.
<builtin>: recipe for target 'xlog.o' failed
make[4]: *** [xlog.o] Error 1
make[4]: Leaving directory
'/opt/compile/postgresql-9.3.4/src/backend/access/transam'
../../../src/backend/common.mk:41: recipe for target 'transam-recursive' failed
make[3]: *** [transam-recursive] Error 2
make[3]: Leaving directory '/opt/compile/postgresql-9.3.4/src/backend/access'
common.mk:41: recipe for target 'access-recursive' failed
make[2]: *** [access-recursive] Error 2
make[2]: Leaving directory '/opt/compile/postgresql-9.3.4/src/backend'
Makefile:34: recipe for target 'all-backend-recurse' failed
make[1]: *** [all-backend-recurse] Error 2
make[1]: Leaving directory '/opt/compile/postgresql-9.3.4/src'
GNUmakefile:11: recipe for target 'all-src-recurse' failed
make: *** [all-src-recurse] Error 2

What shall I do, to compile PostgreSQL on AIX? Do I need additional libraries or
another compiler
to avoid the error above?

Thank you in advance.

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
recompile


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
-

Re: Compile fails on AIX 6.1

From
Tom Lane
Date:
"Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
>   Architecture (example: Intel Pentium)         : ppc

PPC what exactly?

>   Operating System (example: Linux 2.4.18)      : AIX 6.1.0.0
>   PostgreSQL version (example: PostgreSQL 9.3.4):  PostgreSQL 9.3.4
>   Compiler used (example: gcc 3.3.5)            : gcc 4.8.0

> /tmp//ccJHanGQ.s: line 19688: 1252-142 Syntax error.
> /tmp//ccJHanGQ.s: line 19689: 1252-142 Syntax error.
> /tmp//ccJHanGQ.s: line 19690: 1252-142 Syntax error.
> /tmp//ccJHanGQ.s: line 19693: 1252-142 Syntax error.
> /tmp//ccJHanGQ.s: line 20040: 1252-142 Syntax error.
> /tmp//ccJHanGQ.s: line 20043: 1252-142 Syntax error.
> /tmp//ccJHanGQ.s: line 20044: 1252-142 Syntax error.
> /tmp//ccJHanGQ.s: line 20045: 1252-142 Syntax error.
> /tmp//ccJHanGQ.s: line 20046: 1252-142 Syntax error.
> /tmp//ccJHanGQ.s: line 20049: 1252-142 Syntax error.
> <builtin>: recipe for target 'xlog.o' failed

I think the odds are pretty high that the problem here is that we tried to
use the "mutex hint" option in our PPC spinlock assembly code, and the
system's assembler doesn't recognize that.  However, we only try to use
that option after the configure script has confirmed that the syntax is
accepted, so it's not real clear how you got this result.  Perhaps you
tried to change compilers without redoing the configure run?

            regards, tom lane

Re: Compile fails on AIX 6.1

From
Tom Lane
Date:
[ please keep the mailing list cc'd ]

"Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
> Thank you for answering very fast.

>> PPC what exactly?

> chrp with 64-bit.
> MACHINE_ARCHITECTURE:                   chrp
> HARDWARE_BITMODE:                       64

> Do you need further information regarding the system?

Yes, please; CHRP is pretty non-specific as regards the processor
generation.  However, it's probably *old* since CHRP wasn't too
successful according to Wikipedia.  If the CPU predates POWER6 or
thereabouts, then lack of LWARX hint support in the assembler
wouldn't be surprising.

Still, configure should have caught that.  Does configure end up
defining HAVE_PPC_LWARX_MUTEX_HINT in src/include/pg_config.h?

Hmm ... looking at s_lock.h some more, I wonder if maybe it's
LWSYNC and not LWARX that's causing the problem.  We currently
set USE_PPC_LWSYNC for any PPC64 build (see pg_config_manual.h).
IIRC we knew that there were a few machines for which that heuristic
would fail, but we didn't think anybody would be using Postgres
on them.

Assuming that HAVE_PPC_LWARX_MUTEX_HINT is *not* getting set,
I'd suggest commenting out the #define for USE_PPC_LWSYNC in
pg_config_manual.h and see if it gets better.  If that is the
answer then I guess we will need a configure-time test for lwsync
support after all.

>> I think the odds are pretty high that the problem here is that we tried to
>> use the "mutex hint" option in our PPC spinlock assembly code, and the
>> system's assembler doesn't recognize that.

> Would it help to use another compiler, e.g. XL C?

It'd be worth trying if you have another one at hand, but it's
hard to say what the results would be.

Note that there's a question here not only as to whether it will
build, but whether it will run on your hardware.  I'd definitely
try "make check" before believing that you have a working build.

>> However, we only try to use that option after the configure script has
>> confirmed that the syntax is
>> accepted, so it's not real clear how you got this result. Perhaps you
>> tried to change compilers without redoing the configure run?

> No. I did not change the compiler. By the way, I always run "make clean" and
> then re"configure"
> to recompile the code.

That might be good enough, but personally I always do "make distclean"
before reconfiguring.

            regards, tom lane

Re: Compile fails on AIX 6.1

From
Merlin Moncure
Date:
On Thu, Jul 10, 2014 at 9:37 AM, Lars Ewald (web.de)
<l.ewald-web@lars-ewald.de> wrote:
> ============================================================================
>                         POSTGRESQL BUG REPORT TEMPLATE
> ============================================================================
>
>
> Your name               : Lars Ewald
> Your email address      : l.ewald@web.de
>
>
> System Configuration:
> ---------------------
>   Architecture (example: Intel Pentium)         : ppc
>
>   Operating System (example: Linux 2.4.18)      : AIX 6.1.0.0
>
>   PostgreSQL version (example: PostgreSQL 9.3.4):  PostgreSQL 9.3.4
>
>   Compiler used (example: gcc 3.3.5)            : gcc 4.8.0

somewhat offtopic note:  we are very underweight AIX on the buildfarm
-- if you've got any machines to spare for that purpose, it'd be
great...thanks.

merlin

Re: Compile fails on AIX 6.1

From
Larry Rosenman
Date:
On 2014-07-11 11:39, Merlin Moncure wrote:
> On Thu, Jul 10, 2014 at 9:37 AM, Lars Ewald (web.de)
> <l.ewald-web@lars-ewald.de> wrote:
>> ============================================================================
>>                         POSTGRESQL BUG REPORT TEMPLATE
>> ============================================================================
>>
>>
>> Your name               : Lars Ewald
>> Your email address      : l.ewald@web.de
>>
>>
>> System Configuration:
>> ---------------------
>>   Architecture (example: Intel Pentium)         : ppc
>>
>>   Operating System (example: Linux 2.4.18)      : AIX 6.1.0.0
>>
>>   PostgreSQL version (example: PostgreSQL 9.3.4):  PostgreSQL 9.3.4
>>
>>   Compiler used (example: gcc 3.3.5)            : gcc 4.8.0
>
> somewhat offtopic note:  we are very underweight AIX on the buildfarm
> -- if you've got any machines to spare for that purpose, it'd be
> great...thanks.
>
> merlin
When I was at IBM, I tried(!) to get some machines for the buildfarm, to
no success......


--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640 (c)     E-Mail: ler@lerctr.org
US Mail: 108 Turvey Cove, Hutto, TX 78634-5688

Re: Compile fails on AIX 6.1

From
Rainer Tammer
Date:
Hello,
Just a short info:

I will setup a AIX buildfarm member, but unfortunately I had no time to
do so in the last weeks.
I think that I can setup the machine in the next weeks.

I am not sure if I should setup a AIX 7.1 or 6.1 box... any wishes?

Bye
  Rainer

On 11.07.2014 18:39, Merlin Moncure wrote:
> On Thu, Jul 10, 2014 at 9:37 AM, Lars Ewald (web.de)
> <l.ewald-web@lars-ewald.de> wrote:
>> ============================================================================
>>                         POSTGRESQL BUG REPORT TEMPLATE
>> ============================================================================
>>
>>
>> Your name               : Lars Ewald
>> Your email address      : l.ewald@web.de
>>
>>
>> System Configuration:
>> ---------------------
>>   Architecture (example: Intel Pentium)         : ppc
>>
>>   Operating System (example: Linux 2.4.18)      : AIX 6.1.0.0
>>
>>   PostgreSQL version (example: PostgreSQL 9.3.4):  PostgreSQL 9.3.4
>>
>>   Compiler used (example: gcc 3.3.5)            : gcc 4.8.0
> somewhat offtopic note:  we are very underweight AIX on the buildfarm
> -- if you've got any machines to spare for that purpose, it'd be
> great...thanks.
>
> merlin
>
>

Re: Compile fails on AIX 6.1

From
Rainer Tammer
Date:
Hello,
Even the Power 8 does run as CHAP. The discontinued platform was PREP
and MCA.

CHRP = Common H/W Reference Platform

This is from the PowerVM server part of a S824 / 24 core / 192 threads /
1TB memory.

OS has 8 PowerPC_POWER8 (64 bit) CPUs with 8 CPUs active SMT=4
CPU Speed 4116.0 MHz         SerialNumber=213B6EV MachineType=IBM,8286-42A
Logical partition=Dynamic    HMC-LPAR-Number&Name=1,p8srv01vio1
Virtual I/O Server Version=2.2.3.3 Kernel=64 bit Multi-Processor
Power Saving=Static
Hardware-Type(NIM)=CHRP=Common H/W Reference Platform Bus-Type=PCI
CPU Architecture  =PowerPC Implementation=POWER7_COMPAT_mode
SubProcessor Mode
CPU Level 1 Cache is Combined Instruction=32768 bytes & Data=65536 bytes
    Level 2 Cache size=524288          Node=p8srv01vio1


Bye
  Rainer

On 11.07.2014 16:55, Tom Lane wrote:
> [ please keep the mailing list cc'd ]
>
> "Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
>> Thank you for answering very fast.
>>> PPC what exactly?
>> chrp with 64-bit.
>> MACHINE_ARCHITECTURE:                   chrp
>> HARDWARE_BITMODE:                       64
>> Do you need further information regarding the system?
> Yes, please; CHRP is pretty non-specific as regards the processor
> generation.  However, it's probably *old* since CHRP wasn't too
> successful according to Wikipedia.  If the CPU predates POWER6 or
> thereabouts, then lack of LWARX hint support in the assembler
> wouldn't be surprising.
>
> Still, configure should have caught that.  Does configure end up
> defining HAVE_PPC_LWARX_MUTEX_HINT in src/include/pg_config.h?
>
> Hmm ... looking at s_lock.h some more, I wonder if maybe it's
> LWSYNC and not LWARX that's causing the problem.  We currently
> set USE_PPC_LWSYNC for any PPC64 build (see pg_config_manual.h).
> IIRC we knew that there were a few machines for which that heuristic
> would fail, but we didn't think anybody would be using Postgres
> on them.
>
> Assuming that HAVE_PPC_LWARX_MUTEX_HINT is *not* getting set,
> I'd suggest commenting out the #define for USE_PPC_LWSYNC in
> pg_config_manual.h and see if it gets better.  If that is the
> answer then I guess we will need a configure-time test for lwsync
> support after all.
>
>>> I think the odds are pretty high that the problem here is that we tried to
>>> use the "mutex hint" option in our PPC spinlock assembly code, and the
>>> system's assembler doesn't recognize that.
>> Would it help to use another compiler, e.g. XL C?
> It'd be worth trying if you have another one at hand, but it's
> hard to say what the results would be.
>
> Note that there's a question here not only as to whether it will
> build, but whether it will run on your hardware.  I'd definitely
> try "make check" before believing that you have a working build.
>
>>> However, we only try to use that option after the configure script has
>>> confirmed that the syntax is
>>> accepted, so it's not real clear how you got this result. Perhaps you
>>> tried to change compilers without redoing the configure run?
>> No. I did not change the compiler. By the way, I always run "make clean" and
>> then re"configure"
>> to recompile the code.
> That might be good enough, but personally I always do "make distclean"
> before reconfiguring.
>
>             regards, tom lane
>
>

Re: Compile fails on AIX 6.1

From
Tom Lane
Date:
Rainer Tammer <pgsql@spg.schulergroup.com> writes:
> This is from the PowerVM server part of a S824 / 24 core / 192 threads /
> 1TB memory.

> OS has 8 PowerPC_POWER8 (64 bit) CPUs with 8 CPUs active SMT=4
> CPU Speed 4116.0 MHz         SerialNumber=213B6EV MachineType=IBM,8286-42A
> Logical partition=Dynamic    HMC-LPAR-Number&Name=1,p8srv01vio1
> Virtual I/O Server Version=2.2.3.3 Kernel=64 bit Multi-Processor
> Power Saving=Static
> Hardware-Type(NIM)=CHRP=Common H/W Reference Platform Bus-Type=PCI
> CPU Architecture  =PowerPC Implementation=POWER7_COMPAT_mode
> SubProcessor Mode
> CPU Level 1 Cache is Combined Instruction=32768 bytes & Data=65536 bytes
>     Level 2 Cache size=524288          Node=p8srv01vio1

Hm, it would be useful to see a similar printout for Lars' machine.
What command did you use to get this?

            regards, tom lane

Re: Compile fails on AIX 6.1

From
Merlin Moncure
Date:
On Mon, Jul 14, 2014 at 12:55 AM, Rainer Tammer
<pgsql@spg.schulergroup.com> wrote:
> Hello,
> Just a short info:
>
> I will setup a AIX buildfarm member, but unfortunately I had no time to
> do so in the last weeks.
> I think that I can setup the machine in the next weeks.
>
> I am not sure if I should setup a AIX 7.1 or 6.1 box... any wishes?

Ideally both, but if you had to choose I'd go for the newer one.
Looking at buildfarm page -- we have *zero* AIX coverage -- all the
ppc/power are running linux.   Doing this would be fabulous.

merlin

Re: Compile fails on AIX 6.1

From
Tom Lane
Date:
Merlin Moncure <mmoncure@gmail.com> writes:
> On Mon, Jul 14, 2014 at 12:55 AM, Rainer Tammer
>> I am not sure if I should setup a AIX 7.1 or 6.1 box... any wishes?

> Ideally both, but if you had to choose I'd go for the newer one.
> Looking at buildfarm page -- we have *zero* AIX coverage -- all the
> ppc/power are running linux.   Doing this would be fabulous.

Yeah ... there used to be an AIX member (grebe) but it was retired
a year or so ago.  Looks like it had been running 5.3 :-(

            regards, tom lane

Re: Compile fails on AIX 6.1

From
Rainer Tammer
Date:
Hello,
This is from "nmon".

# nmon

-> hit "r"

Bye
  Rainer

On 14.07.2014 17:01, Tom Lane wrote:
> Rainer Tammer <pgsql@spg.schulergroup.com> writes:
>> This is from the PowerVM server part of a S824 / 24 core / 192 threads /
>> 1TB memory.
>> OS has 8 PowerPC_POWER8 (64 bit) CPUs with 8 CPUs active SMT=4
>> CPU Speed 4116.0 MHz         SerialNumber=213B6EV MachineType=IBM,8286-42A
>> Logical partition=Dynamic    HMC-LPAR-Number&Name=1,p8srv01vio1
>> Virtual I/O Server Version=2.2.3.3 Kernel=64 bit Multi-Processor
>> Power Saving=Static
>> Hardware-Type(NIM)=CHRP=Common H/W Reference Platform Bus-Type=PCI
>> CPU Architecture  =PowerPC Implementation=POWER7_COMPAT_mode
>> SubProcessor Mode
>> CPU Level 1 Cache is Combined Instruction=32768 bytes & Data=65536 bytes
>>     Level 2 Cache size=524288          Node=p8srv01vio1
> Hm, it would be useful to see a similar printout for Lars' machine.
> What command did you use to get this?
>
>             regards, tom lane
>
>

Re: Compile fails on AIX 6.1

From
Christopher Browne
Date:
On Mon, Jul 14, 2014 at 11:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Merlin Moncure <mmoncure@gmail.com> writes:
>> On Mon, Jul 14, 2014 at 12:55 AM, Rainer Tammer
>>> I am not sure if I should setup a AIX 7.1 or 6.1 box... any wishes?
>
>> Ideally both, but if you had to choose I'd go for the newer one.
>> Looking at buildfarm page -- we have *zero* AIX coverage -- all the
>> ppc/power are running linux.   Doing this would be fabulous.
>
> Yeah ... there used to be an AIX member (grebe) but it was retired
> a year or so ago.  Looks like it had been running 5.3 :-(

I set up grebe once upon a time; unfortunately, we retired our AIX
hardware, and that actually involved getting rid of the boxes.  They
didn't get shifted to QA or such (as was once a common practice
for old production hardware).
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"

Re: Compile fails on AIX 6.1

From
Rainer Tammer
Date:
Hello,
OK, I have to look how big the impact is.
If the machine is not to heavily loaded I can maybe setup two members.

Would I be enough to smoke the HEAD once or twice a week?

Bye
  Rainer

On 14.07.2014 17:14, Merlin Moncure wrote:
> On Mon, Jul 14, 2014 at 12:55 AM, Rainer Tammer
> <pgsql@spg.schulergroup.com> wrote:
>> Hello,
>> Just a short info:
>>
>> I will setup a AIX buildfarm member, but unfortunately I had no time to
>> do so in the last weeks.
>> I think that I can setup the machine in the next weeks.
>>
>> I am not sure if I should setup a AIX 7.1 or 6.1 box... any wishes?
> Ideally both, but if you had to choose I'd go for the newer one.
> Looking at buildfarm page -- we have *zero* AIX coverage -- all the
> ppc/power are running linux.   Doing this would be fabulous.
>
> merlin
>
>

Re: Compile fails on AIX 6.1

From
Tom Lane
Date:
[ again, please keep the mailing list cc'd ]

"Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
>> PPC what exactly?

> PowerPC_POWER5:
> System Model: IBM,9110-51A
> Machine Serial Number: *********
> Processor Type: PowerPC_POWER5
> Processor Implementation Mode: POWER 5

Huh.  POWER5 certainly ought to be good with lwsync.  I think the lwarx
hint bit doesn't do anything on POWER5, but it's not supposed to cause
problems either.

> Would it help to use a POWER7 system as followed?

If you can try the same build there and see whether it works, that would
be useful information; but we'd like PG to work on POWER5 too ...

>> Still, configure should have caught that. Does configure end up
>> defining HAVE_PPC_LWARX_MUTEX_HINT in src/include/pg_config.h?

> Yes, I HAVE_PPC_LWARX_MUTEX_HINT was defined.
> Commenting out USE_PPC_LWSYNC did not help. Also, commenting
> USE_PPC_LWSYNC out and set HAVE_PPC_LWARX_MUTEX_HINT to "0", was
> not successful.

I'm stumped then.  Maybe the problem is something else entirely.
Could you look at the assembler output file and see exactly what
lines it's complaining about?  If the temp file is not left
behind by a normal build, do the failing gcc call over again
manually, substituting -S for -c so you get a .s file as output.

            regards, tom lane