pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Compile fails on AIX 6.1
30+ messages / 7 participants
[nested] [flat]

* Compile fails on AIX 6.1
@ 2014-07-10 14:37  Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  0 siblings, 2 replies; 30+ messages in thread

From: Lars Ewald (web.de) @ 2014-07-10 14:37 UTC (permalink / raw)
  To: pgsql-bugs

============================================================================
                        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:
---------------------------------------------------------------------
-

^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-10 19:41  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  1 sibling, 1 reply; 30+ messages in thread

From: Tom Lane @ 2014-07-10 19:41 UTC (permalink / raw)
  To: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; +Cc: pgsql-bugs

"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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-11 14:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 30+ messages in thread

From: Tom Lane @ 2014-07-11 14:55 UTC (permalink / raw)
  To: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; +Cc: pgsql-bugs

[ 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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-11 16:39  Merlin Moncure <mmoncure@gmail.com>
  parent: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  1 sibling, 2 replies; 30+ messages in thread

From: Merlin Moncure @ 2014-07-11 16:39 UTC (permalink / raw)
  To: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; +Cc: pgsql-bugs

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-11 17:05  Larry Rosenman <ler@lerctr.org>
  parent: Merlin Moncure <mmoncure@gmail.com>
  1 sibling, 0 replies; 30+ messages in thread

From: Larry Rosenman @ 2014-07-11 17:05 UTC (permalink / raw)
  To: Merlin Moncure <mmoncure@gmail.com>; +Cc: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; pgsql-bugs; pgsql-bugs-owner@postgresql.org

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-14 05:55  Rainer Tammer <pgsql@spg.schulergroup.com>
  parent: Merlin Moncure <mmoncure@gmail.com>
  1 sibling, 1 reply; 30+ messages in thread

From: Rainer Tammer @ 2014-07-14 05:55 UTC (permalink / raw)
  To: Merlin Moncure <mmoncure@gmail.com>; Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; +Cc: pgsql-bugs

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
>
>



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-14 14:58  Rainer Tammer <pgsql@spg.schulergroup.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 30+ messages in thread

From: Rainer Tammer @ 2014-07-14 14:58 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; +Cc: pgsql-bugs

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
>
>



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-14 15:01  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Rainer Tammer <pgsql@spg.schulergroup.com>
  0 siblings, 1 reply; 30+ messages in thread

From: Tom Lane @ 2014-07-14 15:01 UTC (permalink / raw)
  To: Rainer Tammer <pgsql@spg.schulergroup.com>; +Cc: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; pgsql-bugs

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-14 15:14  Merlin Moncure <mmoncure@gmail.com>
  parent: Rainer Tammer <pgsql@spg.schulergroup.com>
  0 siblings, 2 replies; 30+ messages in thread

From: Merlin Moncure @ 2014-07-14 15:14 UTC (permalink / raw)
  To: Rainer Tammer <pgsql@spg.schulergroup.com>; +Cc: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; pgsql-bugs

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-14 15:18  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Merlin Moncure <mmoncure@gmail.com>
  1 sibling, 1 reply; 30+ messages in thread

From: Tom Lane @ 2014-07-14 15:18 UTC (permalink / raw)
  To: Merlin Moncure <mmoncure@gmail.com>; +Cc: Rainer Tammer <pgsql@spg.schulergroup.com>; Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; pgsql-bugs

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-14 15:22  Rainer Tammer <pgsql@spg.schulergroup.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 30+ messages in thread

From: Rainer Tammer @ 2014-07-14 15:22 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; pgsql-bugs

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
>
>



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-14 15:23  Christopher Browne <cbbrowne@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 30+ messages in thread

From: Christopher Browne @ 2014-07-14 15:23 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Merlin Moncure <mmoncure@gmail.com>; Rainer Tammer <pgsql@spg.schulergroup.com>; Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; pgsql-bugs

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?"


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-14 15:55  Rainer Tammer <pgsql@spg.schulergroup.com>
  parent: Merlin Moncure <mmoncure@gmail.com>
  1 sibling, 0 replies; 30+ messages in thread

From: Rainer Tammer @ 2014-07-14 15:55 UTC (permalink / raw)
  To: Merlin Moncure <mmoncure@gmail.com>; +Cc: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; pgsql-bugs

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
>
>



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Fwd: Re: Compile fails on AIX 6.1
@ 2014-07-15 16:51  Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  0 siblings, 3 replies; 30+ messages in thread

From: Lars Ewald (web.de) @ 2014-07-15 16:51 UTC (permalink / raw)
  To: pgsql-bugs; +Cc: Tom Lane <tgl@sss.pgh.pa.us>

Sorry, here is my message for the mailing list.

> ---------- Ursprüngliche Nachricht ----------
>  Von: "Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de>
>  An: Tom Lane <tgl@sss.pgh.pa.us>
>  Datum: 14. Juli 2014 um 17:23
>  Betreff: Re: [BUGS] Compile fails on AIX 6.1
> 
>  Hello Tom,
> 
>  > >> PPC what exactly?
> 
>  PowerPC_POWER5:
>  System Model: IBM,9110-51A
>  Machine Serial Number: *********
>  Processor Type: PowerPC_POWER5
>  Processor Implementation Mode: POWER 5
>  Processor Version: PV_5_2
>  Number Of Processors: 4
>  Processor Clock Speed: 1499 MHz
>  CPU Type: 64-bit
>  Kernel Type: 64-bit
>  LPAR Info: 1 **********
>  Memory Size: 7936 MB
>  Good Memory Size: 7936 MB
>  Platform Firmware level: SF240_418
>  Firmware Version: IBM,SF240_418
>  Full Core: false
> 
> 
> 
>  Would it help to use a POWER7 system as followed?
>  System Model: IBM,8202-E4C
>  Machine Serial Number: *********
>  Processor Type: PowerPC_POWER7
>  Processor Implementation Mode: POWER 7
>  Processor Version: PV_7_Compat
>  Number Of Processors: 4
>  Processor Clock Speed: 3024 MHz
>  CPU Type: 64-bit
>  Kernel Type: 64-bit
>  LPAR Info: 15 ************
>  Memory Size: 8192 MB
>  Good Memory Size: 8192 MB
>  Platform Firmware level: AL740_126
>  Firmware Version: IBM,AL740_100
>  Full Core: false
> 
> 
>  > 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.
> 
>  [...]
>  /* Define to 1 if you have the POSIX signal interface. */
>  #define HAVE_POSIX_SIGNALS /**/
> 
>  /* Define to 1 if the assembler supports PPC's LWARX mutex hint bit. */
>  #define HAVE_PPC_LWARX_MUTEX_HINT 1
> 
>  /* Define to 1 if you have the `pstat' function. */
>  /* #undef HAVE_PSTAT */
> 
>  /* Define to 1 if the PS_STRINGS thing exists. */
>  /* #undef HAVE_PS_STRINGS */
>  [...]
> 
> 
> 
>  > 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.
> 
>  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.
> 
> 
>  Best regards
>  Lars
> 
> 
> 
>  > Tom Lane <tgl@sss.pgh.pa.us> hat am 11. Juli 2014 um 16:55 geschrieben:
>  >
>  >
>  > [ 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
> 

^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Compile fails on AIX 6.1
@ 2014-07-15 19:19  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 30+ messages in thread

From: Tom Lane @ 2014-07-15 19:19 UTC (permalink / raw)
  To: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; +Cc: pgsql-bugs

[ 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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Fwd: Re: Compile fails on AIX 6.1
@ 2014-07-16 13:56  Rainer Tammer <pgsql@spg.schulergroup.com>
  parent: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  2 siblings, 0 replies; 30+ messages in thread

From: Rainer Tammer @ 2014-07-16 13:56 UTC (permalink / raw)
  To: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; pgsql-bugs; +Cc: Tom Lane <tgl@sss.pgh.pa.us>

Hello,
could you try IBM XLC/C++ instead of gcc?

Bye
  Rainer

On 15.07.2014 18:51, Lars Ewald (web.de) wrote:
> Sorry, here is my message for the mailing list.
>> ---------- Ursprüngliche Nachricht ----------
>> Von: "Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de>
>> An: Tom Lane <tgl@sss.pgh.pa.us>
>> Datum: 14. Juli 2014 um 17:23
>> Betreff: Re: [BUGS] Compile fails on AIX 6.1
>>
>> Hello Tom,
>>  
>> > >> PPC what exactly?
>>  
>> PowerPC_POWER5:
>> System Model: IBM,9110-51A
>> Machine Serial Number: *********
>> Processor Type: PowerPC_POWER5
>> Processor Implementation Mode: POWER 5
>> Processor Version: PV_5_2
>> Number Of Processors: 4
>> Processor Clock Speed: 1499 MHz
>> CPU Type: 64-bit
>> Kernel Type: 64-bit
>> LPAR Info: 1 **********
>> Memory Size: 7936 MB
>> Good Memory Size: 7936 MB
>> Platform Firmware level: SF240_418
>> Firmware Version: IBM,SF240_418
>> Full Core: false
>>  
>>  
>>  
>> Would it help to use a POWER7 system as followed?
>> System Model: IBM,8202-E4C
>> Machine Serial Number: *********
>> Processor Type: PowerPC_POWER7
>> Processor Implementation Mode: POWER 7
>> Processor Version: PV_7_Compat
>> Number Of Processors: 4
>> Processor Clock Speed: 3024 MHz
>> CPU Type: 64-bit
>> Kernel Type: 64-bit
>> LPAR Info: 15 ************
>> Memory Size: 8192 MB
>> Good Memory Size: 8192 MB
>> Platform Firmware level: AL740_126
>> Firmware Version: IBM,AL740_100
>> Full Core: false
>>  
>>  
>> > 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.
>>  
>> [...]
>> /* Define to 1 if you have the POSIX signal interface. */
>> #define HAVE_POSIX_SIGNALS /**/
>>
>> /* Define to 1 if the assembler supports PPC's LWARX mutex hint bit. */
>> #define HAVE_PPC_LWARX_MUTEX_HINT 1
>>
>> /* Define to 1 if you have the `pstat' function. */
>> /* #undef HAVE_PSTAT */
>>
>> /* Define to 1 if the PS_STRINGS thing exists. */
>> /* #undef HAVE_PS_STRINGS */
>> [...]
>>  
>>  
>>  
>> > 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.
>>  
>> 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.
>>  
>>  
>> Best regards
>> Lars
>>  
>>  
>>
>> > Tom Lane <tgl@sss.pgh.pa.us> hat am 11. Juli 2014 um 16:55
>> geschrieben:
>> >
>> >
>> > [ 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
>
>  

^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Fwd: Re: Compile fails on AIX 6.1
@ 2014-07-25 19:59  Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  parent: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  2 siblings, 1 reply; 30+ messages in thread

From: Lars Ewald (web.de) @ 2014-07-25 19:59 UTC (permalink / raw)
  To: pgsql-bugs; +Cc: Tom Lane <tgl@sss.pgh.pa.us>

Hello Tom,

today I was able to do some tests compiling Postgres on our AIX machine.

And...it worked! :-) Configuring without spinlocks and readline worked fine for
me and did not abort after compiling xlog.o/xlog.c.
Any ideas why it does not work with spinlocks?



Best regards,
Lars

p. s. Compiling against xlC did not work. I think our xlC installation is a bit
curious. :-(





> "Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> hat am 15. Juli 2014 um
> 18:51 geschrieben:
> 
>  Sorry, here is my message for the mailing list.
> 
>   > > ---------- Ursprüngliche Nachricht ----------
> >   Von: "Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de>
> >   An: Tom Lane <tgl@sss.pgh.pa.us>
> >   Datum: 14. Juli 2014 um 17:23
> >   Betreff: Re: [BUGS] Compile fails on AIX 6.1
> > 
> >   Hello Tom,
> > 
> >   > >> PPC what exactly?
> > 
> >   PowerPC_POWER5:
> >   System Model: IBM,9110-51A
> >   Machine Serial Number: *********
> >   Processor Type: PowerPC_POWER5
> >   Processor Implementation Mode: POWER 5
> >   Processor Version: PV_5_2
> >   Number Of Processors: 4
> >   Processor Clock Speed: 1499 MHz
> >   CPU Type: 64-bit
> >   Kernel Type: 64-bit
> >   LPAR Info: 1 **********
> >   Memory Size: 7936 MB
> >   Good Memory Size: 7936 MB
> >   Platform Firmware level: SF240_418
> >   Firmware Version: IBM,SF240_418
> >   Full Core: false
> > 
> > 
> > 
> >   Would it help to use a POWER7 system as followed?
> >   System Model: IBM,8202-E4C
> >   Machine Serial Number: *********
> >   Processor Type: PowerPC_POWER7
> >   Processor Implementation Mode: POWER 7
> >   Processor Version: PV_7_Compat
> >   Number Of Processors: 4
> >   Processor Clock Speed: 3024 MHz
> >   CPU Type: 64-bit
> >   Kernel Type: 64-bit
> >   LPAR Info: 15 ************
> >   Memory Size: 8192 MB
> >   Good Memory Size: 8192 MB
> >   Platform Firmware level: AL740_126
> >   Firmware Version: IBM,AL740_100
> >   Full Core: false
> > 
> > 
> >   > 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.
> > 
> >   [...]
> >   /* Define to 1 if you have the POSIX signal interface. */
> >   #define HAVE_POSIX_SIGNALS /**/
> > 
> >   /* Define to 1 if the assembler supports PPC's LWARX mutex hint bit. */
> >   #define HAVE_PPC_LWARX_MUTEX_HINT 1
> > 
> >   /* Define to 1 if you have the `pstat' function. */
> >   /* #undef HAVE_PSTAT */
> > 
> >   /* Define to 1 if the PS_STRINGS thing exists. */
> >   /* #undef HAVE_PS_STRINGS */
> >   [...]
> > 
> > 
> > 
> >   > 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.
> > 
> >   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.
> > 
> > 
> >   Best regards
> >   Lars
> > 
> > 
> > 
> >   > Tom Lane <tgl@sss.pgh.pa.us> hat am 11. Juli 2014 um 16:55 geschrieben:
> >   >
> >   >
> >   > [ 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
> > 
> >  > 
> 
> 

^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Fwd: Re: Compile fails on AIX 6.1
@ 2014-07-25 22:32  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  0 siblings, 2 replies; 30+ messages in thread

From: Tom Lane @ 2014-07-25 22:32 UTC (permalink / raw)
  To: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; +Cc: pgsql-bugs

"Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
> Hello Tom,
> today I was able to do some tests compiling Postgres on our AIX machine.

> And...it worked! :-) Configuring without spinlocks and readline worked fine for
> me and did not abort after compiling xlog.o/xlog.c.
> Any ideas why it does not work with spinlocks?

Well, spinlocks are what uses the assembler code that you're having
trouble with.

Note that while you can build with --disable-spinlocks, performance is
not likely to be acceptable.  We don't really consider a platform
supported unless it's got working spinlocks.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Fwd: Re: Compile fails on AIX 6.1
@ 2014-07-28 05:58  Rainer Tammer <pgsql@spg.schulergroup.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 30+ messages in thread

From: Rainer Tammer @ 2014-07-28 05:58 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; +Cc: pgsql-bugs

Hello,
What PostgreSQl exact version are you trying to compile?
I like to test this with the IBM compiler.

Bye
  Rainer

On 26.07.2014 00:32, Tom Lane wrote:
> "Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
>> Hello Tom,
>> today I was able to do some tests compiling Postgres on our AIX machine.
>> And...it worked! :-) Configuring without spinlocks and readline worked fine for
>> me and did not abort after compiling xlog.o/xlog.c.
>> Any ideas why it does not work with spinlocks?
> Well, spinlocks are what uses the assembler code that you're having
> trouble with.
>
> Note that while you can build with --disable-spinlocks, performance is
> not likely to be acceptable.  We don't really consider a platform
> supported unless it's got working spinlocks.
>
> 			regards, tom lane
>
>



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Fwd: Re: Compile fails on AIX 6.1
@ 2014-08-01 17:59  Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 2 replies; 30+ messages in thread

From: Lars Ewald (web.de) @ 2014-08-01 17:59 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Hello Tom

> We don't really consider a platform
> supported unless it's got working spinlocks.

I am a little bit confused about that.

On the page "supported platforms" there is written that PowerPC or PowerPC 64 is
a supported
platform, so that I can compile postgres WITH spinlocks.
http://www.postgresql.org/docs/9.3/static/supported-platforms.html

Or is there a problem on the specific machine? Or is there something disabled
in the kernel?

Best regards
Lars

> Tom Lane <tgl@sss.pgh.pa.us> hat am 26. Juli 2014 um 00:32 geschrieben:
>
>
> "Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
> > Hello Tom,
> > today I was able to do some tests compiling Postgres on our AIX machine.
>
> > And...it worked! :-) Configuring without spinlocks and readline worked fine
> > for
> > me and did not abort after compiling xlog.o/xlog.c.
> > Any ideas why it does not work with spinlocks?
>
> Well, spinlocks are what uses the assembler code that you're having
> trouble with.
>
> Note that while you can build with --disable-spinlocks, performance is
> not likely to be acceptable. We don't really consider a platform
> supported unless it's got working spinlocks.
>
> regards, tom lane

^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Fwd: Re: Compile fails on AIX 6.1
@ 2014-08-01 18:00  Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  parent: Rainer Tammer <pgsql@spg.schulergroup.com>
  0 siblings, 0 replies; 30+ messages in thread

From: Lars Ewald (web.de) @ 2014-08-01 18:00 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Rainer Tammer <pgsql@spg.schulergroup.com>; +Cc: pgsql-bugs

Hello Rainer,

> What PostgreSQl exact version are you trying to compile?
9.3.4

Bye,
Lars

> Rainer Tammer <pgsql@spg.schulergroup.com> hat am 28. Juli 2014 um 07:58
> geschrieben:
>
>
> Hello,
> What PostgreSQl exact version are you trying to compile?
> I like to test this with the IBM compiler.
>
> Bye
> Rainer
>
> On 26.07.2014 00:32, Tom Lane wrote:
> > "Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
> >> Hello Tom,
> >> today I was able to do some tests compiling Postgres on our AIX machine.
> >> And...it worked! :-) Configuring without spinlocks and readline worked fine
> >> for
> >> me and did not abort after compiling xlog.o/xlog.c.
> >> Any ideas why it does not work with spinlocks?
> > Well, spinlocks are what uses the assembler code that you're having
> > trouble with.
> >
> > Note that while you can build with --disable-spinlocks, performance is
> > not likely to be acceptable. We don't really consider a platform
> > supported unless it's got working spinlocks.
> >
> > regards, tom lane
> >
> >
>

^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Fwd: Re: Compile fails on AIX 6.1
@ 2014-08-02 15:09  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  1 sibling, 0 replies; 30+ messages in thread

From: Tom Lane @ 2014-08-02 15:09 UTC (permalink / raw)
  To: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; +Cc: pgsql-bugs

"Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
>> We don't really consider a platform
>> supported unless it's got working spinlocks.

> I am a little bit confused about that.

Well, so are we.

> Or is there a problem on the specific machine? Or is there something disabled
> in the kernel?

It seems to be a toolchain problem, ie, compiler or assembler doing
something unexpected with our PPC spinlock code.  But we don't really
have enough info to diagnose.  I can think of a bunch of ways it might
have gone wrong, but we seem to have eliminated all those theories :-(

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: Fwd: Re: Compile fails on AIX 6.1
@ 2014-08-04 05:56  Rainer Tammer <pgsql@spg.schulergroup.com>
  parent: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  1 sibling, 0 replies; 30+ messages in thread

From: Rainer Tammer @ 2014-08-04 05:56 UTC (permalink / raw)
  To: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Hello,
Please try the IBM C/C++ compiler.

Could you use 9.3.5? This is the latest 9.3.x version.
I have tested 9.3.5 on AIX 6.1 and AIX 7.1 without a compilation/test
failure.

Please could you post your exact ./configure call?

Bye
  Rainer

On 01.08.2014 19:59, Lars Ewald (web.de) wrote:
> Hello Tom
>  
> > We don't really consider a platform
> > supported unless it's got working spinlocks.
>  
> I am a little bit confused about that.
>  
> On the page "supported platforms" there is written that PowerPC or
> PowerPC 64 is a supported
> platform, so that I can compile postgres WITH spinlocks.
> http://www.postgresql.org/docs/9.3/static/supported-platforms.html
>  
> Or is there a problem on the specific machine? Or is there something
> disabled
> in the kernel?
>  
> Best regards
> Lars
>
> > Tom Lane <tgl@sss.pgh.pa.us> hat am 26. Juli 2014 um 00:32 geschrieben:
> >
> >
> > "Lars Ewald (web.de)" <l.ewald-web@lars-ewald.de> writes:
> > > Hello Tom,
> > > today I was able to do some tests compiling Postgres on our AIX
> machine.
> >
> > > And...it worked! :-) Configuring without spinlocks and readline
> worked fine for
> > > me and did not abort after compiling xlog.o/xlog.c.
> > > Any ideas why it does not work with spinlocks?
> >
> > Well, spinlocks are what uses the assembler code that you're having
> > trouble with.
> >
> > Note that while you can build with --disable-spinlocks, performance is
> > not likely to be acceptable. We don't really consider a platform
> > supported unless it's got working spinlocks.
> >
> > regards, tom lane

^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: [BUGS] Compile fails on AIX 6.1
@ 2015-08-27 14:36  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
  2 siblings, 1 reply; 30+ messages in thread

From: Tom Lane @ 2015-08-27 14:36 UTC (permalink / raw)
  To: pgsql-hackers@postgreSQL.org

A year ago we had a thread about assembler syntax errors on AIX, but it
died off when the original complainant stopped responding.  I was recently
contacted off-list by Steve Underwood, who was seeing the same symptoms
on AIX 7.1.  After some investigation, we found that the problem is that
IBM's assembler doesn't understand the "local symbol" notation supported
by the GNU assembler ("bne 1f" referencing the next occurrence of "1:").
So s_lock.h's PowerPC assembly code works if you have gcc configured to
use gas as backend, but not if it's configured to use the native AIX
assembler.  Steve says the latter configuration is pretty common.

Curiously, our build goes through just fine if you use the gcc 4.2.0
build available from IBM's website.  But it turns out it's using the
"generic AIX" stanza of s_lock.h, ie _check_lock(), rather than the
lwarx assembly code.  AFAICS this must mean that that gcc build does
not define __ppc__ --- very weird.  But a bit offtopic.

So now that we know what is happening, what do we want to do about it?
AFAICS there are two plausible ways to fix it:

1. Add a configure-time test to see if the assembler supports local
symbols.  If not, don't try to use the lwarx assembly stanza, but let
it fall through to using _check_lock().  This would be simple but
there would presumably be some performance hit.

2. Don't rely on local symbols in the PPC spinlock assembly code.  This
is a bit ugly, because the only way to do that is to hard-code branch
offsets, as in the attached draft patch.  If there were any likelihood
that we'd be changing the PPC spinlock code in future, I would regard
this as unmaintainable ... but really, that code is pretty static.
So I think this is a viable alternative.

Comments?

			regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

no-local-asm-symbols.patch (text/x-diff, 1.4K) download diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index ef66644..9e709f8 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -447,6 +447,12 @@ typedef unsigned int slock_t; * NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002, * an isync is a sufficient synchronization barrier after a lwarx/stwcx loop. * On newer machines, we can use lwsync instead for better performance. + * + * Ordinarily, we'd code the branches here using GNU-style local symbols, that + * is "1f" referencing "1:" and so on. But some people run gcc on AIX with + * IBM's assembler as backend, and IBM's assembler doesn't do local symbols. + * So hand-code the branch offsets; fortunately, all PPC instructions are + * exactly 4 bytes each, so it's not too hard to count. */ static __inline__ int tas(volatile slock_t *lock) @@ -461,20 +467,18 @@ tas(volatile slock_t *lock) " lwarx %0,0,%3 \n" #endif " cmpwi %0,0 \n" -" bne 1f \n" +" bne .+16 \n" /* branch to li %1,1 */ " addi %0,%0,1 \n" " stwcx. %0,0,%3 \n" -" beq 2f \n" -"1: li %1,1 \n" -" b 3f \n" -"2: \n" +" beq .+12 \n" /* branch to lwsync/isync */ +" li %1,1 \n" +" b .+12 \n" /* branch to end of asm sequence */ #ifdef USE_PPC_LWSYNC " lwsync \n" #else " isync \n" #endif " li %1,0 \n" -"3: \n" : "=&r"(_t), "=r"(_res), "+m"(*lock) : "r"(lock)
^ permalink raw reply [nested|flat] 30+ messages in thread

* Re: [BUGS] Compile fails on AIX 6.1
@ 2015-08-28 07:02  Noah Misch <noah@leadboat.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 30+ messages in thread

From: Noah Misch @ 2015-08-28 07:02 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers@postgreSQL.org

On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote:
> the problem is that
> IBM's assembler doesn't understand the "local symbol" notation supported
> by the GNU assembler ("bne 1f" referencing the next occurrence of "1:").
> So s_lock.h's PowerPC assembly code works if you have gcc configured to
> use gas as backend, but not if it's configured to use the native AIX
> assembler.  Steve says the latter configuration is pretty common.

These days, the latter configuration is all but universal.  Per the GCC
installation instructions, "The GNU Assembler has not been updated to support
AIX 6 or AIX 7."

> So now that we know what is happening, what do we want to do about it?
> AFAICS there are two plausible ways to fix it:
> 
> 1. Add a configure-time test to see if the assembler supports local
> symbols.  If not, don't try to use the lwarx assembly stanza, but let
> it fall through to using _check_lock().  This would be simple but
> there would presumably be some performance hit.
> 
> 2. Don't rely on local symbols in the PPC spinlock assembly code.  This
> is a bit ugly, because the only way to do that is to hard-code branch
> offsets, as in the attached draft patch.  If there were any likelihood
> that we'd be changing the PPC spinlock code in future, I would regard
> this as unmaintainable ... but really, that code is pretty static.
> So I think this is a viable alternative.

A third option is to use __sync intrinsics, like we do on ARM.  I like (2).


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: [BUGS] Compile fails on AIX 6.1
@ 2015-08-28 13:58  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Noah Misch <noah@leadboat.com>
  0 siblings, 2 replies; 30+ messages in thread

From: Tom Lane @ 2015-08-28 13:58 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: pgsql-hackers@postgresql.org

Noah Misch <noah@leadboat.com> writes:
> On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote:
>> the problem is that
>> IBM's assembler doesn't understand the "local symbol" notation supported
>> by the GNU assembler ("bne 1f" referencing the next occurrence of "1:").
>> So s_lock.h's PowerPC assembly code works if you have gcc configured to
>> use gas as backend, but not if it's configured to use the native AIX
>> assembler.  Steve says the latter configuration is pretty common.

> These days, the latter configuration is all but universal.  Per the GCC
> installation instructions, "The GNU Assembler has not been updated to support
> AIX 6 or AIX 7."

Ouch.  I'm surprised we've not gotten more complaints.

>> 2. Don't rely on local symbols in the PPC spinlock assembly code.  This
>> is a bit ugly, because the only way to do that is to hard-code branch
>> offsets, as in the attached draft patch.  If there were any likelihood
>> that we'd be changing the PPC spinlock code in future, I would regard
>> this as unmaintainable ... but really, that code is pretty static.
>> So I think this is a viable alternative.

> A third option is to use __sync intrinsics, like we do on ARM.  I like (2).

I've been waiting to hear confirmation from Steve that the proposed patch
works with IBM's assembler.  (For all I know, it uses "*" rather than ".",
or some other randomness.)  He's not responded yet though.  Are you in
a position to test the patch?

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: [BUGS] Compile fails on AIX 6.1
@ 2015-08-28 22:01  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 30+ messages in thread

From: Tom Lane @ 2015-08-28 22:01 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: pgsql-hackers@postgresql.org

I wrote:
> Noah Misch <noah@leadboat.com> writes:
>> On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote:
>>> 2. Don't rely on local symbols in the PPC spinlock assembly code.

>> A third option is to use __sync intrinsics, like we do on ARM.  I like (2).

> I've been waiting to hear confirmation from Steve that the proposed patch
> works with IBM's assembler.  (For all I know, it uses "*" rather than ".",
> or some other randomness.)  He's not responded yet though.  Are you in
> a position to test the patch?

Steve got back to me with the news that AIX's assembler thinks that "."
is an ordinary symbol, not the current location.  Some googling says that
that assembler likes "$" for current location.  I did a quick check on my
oldest OS X PPC box, and it seems to be happy with "$" as well, so maybe
we can use that --- though I see nothing about "$" in the GNU Assembler
manual, which makes me a bit worried about whether it works on all PPC
systems.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: [BUGS] Compile fails on AIX 6.1
@ 2015-08-28 22:34  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 30+ messages in thread

From: Tom Lane @ 2015-08-28 22:34 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: pgsql-hackers@postgresql.org

I wrote:
> ... that assembler likes "$" for current location.  I did a quick check on my
> oldest OS X PPC box, and it seems to be happy with "$" as well, so maybe
> we can use that --- though I see nothing about "$" in the GNU Assembler
> manual, which makes me a bit worried about whether it works on all PPC
> systems.

A look into the current gas sources finds this in config/tc-ppc.h:

/* $ is used to refer to the current location.  */
#define DOLLAR_DOT

so apparently this is indeed standard behavior for gas on PPC.  There's
no indication that you could turn it off without manually hacking this
config header.

Source code access to one's tools is so pleasant ...

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 30+ messages in thread

* Re: [BUGS] Compile fails on AIX 6.1
@ 2015-08-29 05:42  Noah Misch <noah@leadboat.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 30+ messages in thread

From: Noah Misch @ 2015-08-29 05:42 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers@postgresql.org

On Fri, Aug 28, 2015 at 09:58:46AM -0400, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
> > On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote:
> >> So s_lock.h's PowerPC assembly code works if you have gcc configured to
> >> use gas as backend, but not if it's configured to use the native AIX
> >> assembler.  Steve says the latter configuration is pretty common.
> 
> > These days, the latter configuration is all but universal.  Per the GCC
> > installation instructions, "The GNU Assembler has not been updated to support
> > AIX 6 or AIX 7."
> 
> Ouch.  I'm surprised we've not gotten more complaints.

That surprised me, too.  Perhaps almost everyone has used either xlc or that
IBM-provided gcc you wrote about.

> >> 2. Don't rely on local symbols in the PPC spinlock assembly code.

> > A third option is to use __sync intrinsics, like we do on ARM.  I like (2).
> 
> I've been waiting to hear confirmation from Steve that the proposed patch
> works with IBM's assembler.  (For all I know, it uses "*" rather than ".",
> or some other randomness.)  He's not responded yet though.  Are you in
> a position to test the patch?

I tested a gcc 64-bit build.  Consistent with your followup, "b .+12" doesn't
build, but "b $+12" builds and passes "make check".  I am attaching the exact
diff I tested.

On GNU/Linux ppc, I get the same opcodes before and after the change.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

no-local-asm-symbols-dollar.patch (text/plain, 1.4K) download diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index ef66644..b7567c1 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -447,6 +447,12 @@ typedef unsigned int slock_t; * NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002, * an isync is a sufficient synchronization barrier after a lwarx/stwcx loop. * On newer machines, we can use lwsync instead for better performance. + * + * Ordinarily, we'd code the branches here using GNU-style local symbols, that + * is "1f" referencing "1:" and so on. But some people run gcc on AIX with + * IBM's assembler as backend, and IBM's assembler doesn't do local symbols. + * So hand-code the branch offsets; fortunately, all PPC instructions are + * exactly 4 bytes each, so it's not too hard to count. */ static __inline__ int tas(volatile slock_t *lock) @@ -461,20 +467,18 @@ tas(volatile slock_t *lock) " lwarx %0,0,%3 \n" #endif " cmpwi %0,0 \n" -" bne 1f \n" +" bne $+16 \n" /* branch to li %1,1 */ " addi %0,%0,1 \n" " stwcx. %0,0,%3 \n" -" beq 2f \n" -"1: li %1,1 \n" -" b 3f \n" -"2: \n" +" beq $+12 \n" /* branch to lwsync/isync */ +" li %1,1 \n" +" b $+12 \n" /* branch to end of asm sequence */ #ifdef USE_PPC_LWSYNC " lwsync \n" #else " isync \n" #endif " li %1,0 \n" -"3: \n" : "=&r"(_t), "=r"(_res), "+m"(*lock) : "r"(lock)
^ permalink raw reply [nested|flat] 30+ messages in thread

* Re: [BUGS] Compile fails on AIX 6.1
@ 2015-08-29 13:10  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 30+ messages in thread

From: Tom Lane @ 2015-08-29 13:10 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: pgsql-hackers@postgresql.org

Noah Misch <noah@leadboat.com> writes:
> I tested a gcc 64-bit build.  Consistent with your followup, "b .+12" doesn't
> build, but "b $+12" builds and passes "make check".  I am attaching the exact
> diff I tested.
> On GNU/Linux ppc, I get the same opcodes before and after the change.

Thanks for checking!  I have some other business to attend to today, but
I'll get this committed soon.

Please consider spinning up a gcc buildfarm critter on the machine running
hornet & mandrill.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 30+ messages in thread


end of thread, other threads:[~2015-08-29 13:10 UTC | newest]

Thread overview: 30+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-07-10 14:37 Compile fails on AIX 6.1 Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
2014-07-10 19:41 ` Tom Lane <tgl@sss.pgh.pa.us>
2014-07-11 14:55   ` Tom Lane <tgl@sss.pgh.pa.us>
2014-07-14 14:58     ` Rainer Tammer <pgsql@spg.schulergroup.com>
2014-07-14 15:01       ` Tom Lane <tgl@sss.pgh.pa.us>
2014-07-14 15:22         ` Rainer Tammer <pgsql@spg.schulergroup.com>
2014-07-15 19:19     ` Tom Lane <tgl@sss.pgh.pa.us>
2014-07-11 16:39 ` Merlin Moncure <mmoncure@gmail.com>
2014-07-11 17:05   ` Larry Rosenman <ler@lerctr.org>
2014-07-14 05:55   ` Rainer Tammer <pgsql@spg.schulergroup.com>
2014-07-14 15:14     ` Merlin Moncure <mmoncure@gmail.com>
2014-07-14 15:18       ` Tom Lane <tgl@sss.pgh.pa.us>
2014-07-14 15:23         ` Christopher Browne <cbbrowne@gmail.com>
2014-07-14 15:55       ` Rainer Tammer <pgsql@spg.schulergroup.com>
2014-07-15 16:51 Fwd: Re: Compile fails on AIX 6.1 Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
2014-07-16 13:56 ` Rainer Tammer <pgsql@spg.schulergroup.com>
2014-07-25 19:59 ` Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
2014-07-25 22:32   ` Tom Lane <tgl@sss.pgh.pa.us>
2014-07-28 05:58     ` Rainer Tammer <pgsql@spg.schulergroup.com>
2014-08-01 18:00       ` Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
2014-08-01 17:59     ` Lars Ewald (web.de) <l.ewald-web@lars-ewald.de>
2014-08-02 15:09       ` Tom Lane <tgl@sss.pgh.pa.us>
2014-08-04 05:56       ` Rainer Tammer <pgsql@spg.schulergroup.com>
2015-08-27 14:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-08-28 07:02   ` Noah Misch <noah@leadboat.com>
2015-08-28 13:58     ` Tom Lane <tgl@sss.pgh.pa.us>
2015-08-28 22:01       ` Tom Lane <tgl@sss.pgh.pa.us>
2015-08-28 22:34         ` Tom Lane <tgl@sss.pgh.pa.us>
2015-08-29 05:42       ` Noah Misch <noah@leadboat.com>
2015-08-29 13:10         ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox