pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #6331: Cross compile error/aborts. Works if '--disable-spinlock' is used
4+ messages / 3 participants
[nested] [flat]

* BUG #6331: Cross compile error/aborts. Works if '--disable-spinlock' is used
@ 2011-12-12 09:09  vbberdin@yahoo.com
  0 siblings, 1 reply; 4+ messages in thread

From: vbberdin@yahoo.com @ 2011-12-12 09:09 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      6331
Logged by:          Victor Berdin
Email address:      vbberdin@yahoo.com
PostgreSQL version: 8.4.9
Operating system:   Linux (Ubuntu/Linaro 4.5.2-8ubuntu4)
Description:        

- Cross Compiler: 
  arm-linux-gnueabi-*(Ubuntu/Linaro 4.5.2-8ubuntu3) 4.5.2

- Configure options: 
  ./configure --host=arm-linux CC=arm-linux-gnueabi-gcc
AR=arm-linux-gnueabi-ar CPP=arm-linux-gnueabi-cpp --without-readline
--without-zlib

- make error:
make[4]: Entering directory
`/mnt/sdb1/EXYBOS/net-resource/postgresql-8.4.9/src/backend/access/transam'
arm-linux-gnueabi-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
-I../../../../src/include -D_GNU_SOURCE   -c -o clog.o clog.c
arm-linux-gnueabi-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
-I../../../../src/include -D_GNU_SOURCE   -c -o transam.o transam.c
arm-linux-gnueabi-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
-I../../../../src/include -D_GNU_SOURCE   -c -o varsup.o varsup.c
arm-linux-gnueabi-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
-I../../../../src/include -D_GNU_SOURCE   -c -o xact.o xact.c
arm-linux-gnueabi-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
-I../../../../src/include -D_GNU_SOURCE   -c -o xlog.o xlog.c
/tmp/cclQLJ69.s: Assembler messages:
/tmp/cclQLJ69.s:645: Error: selected processor does not support Thumb mode
`swpb r3,r3,[r0]'
/tmp/cclQLJ69.s:6821: Error: selected processor does not support Thumb mode
`swpb r2,r2,[r0]'
...
...
/tmp/cclQLJ69.s:14730: Error: selected processor does not support Thumb mode
`swpb r3,r3,[r0]'
make[4]: *** [xlog.o] Error 1
make[4]: Leaving directory
`/mnt/sdb1/EXYBOS/net-resource/postgresql-8.4.9/src/backend/access/transam'
make[3]: *** [transam-recursive] Error 2
make[3]: Leaving directory
`/mnt/sdb1/EXYBOS/net-resource/postgresql-8.4.9/src/backend/access'
make[2]: *** [access-recursive] Error 2





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

* Re: BUG #6331: Cross compile error/aborts. Works if '--disable-spinlock' is used
@ 2011-12-13 00:26  Craig Ringer <ringerc@ringerc.id.au>
  parent: vbberdin@yahoo.com
  0 siblings, 1 reply; 4+ messages in thread

From: Craig Ringer @ 2011-12-13 00:26 UTC (permalink / raw)
  To: vbberdin@yahoo.com; +Cc: pgsql-bugs

On 12/12/2011 5:09 PM, vbberdin@yahoo.com wrote:
> The following bug has been logged on the website:
>
> Bug reference:      6331
> Logged by:          Victor Berdin
> Email address:      vbberdin@yahoo.com
> PostgreSQL version: 8.4.9
> Operating system:   Linux (Ubuntu/Linaro 4.5.2-8ubuntu4)
> Description:
>
> arm-linux-gnueabi-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
> -I../../../../src/include -D_GNU_SOURCE   -c -o xlog.o xlog.c
> /tmp/cclQLJ69.s: Assembler messages:
> /tmp/cclQLJ69.s:645: Error: selected processor does not support Thumb mode
> `swpb r3,r3,[r0]'
> /tmp/cclQLJ69.s:6821: Error: selected processor does not support Thumb mode
> `swpb r2,r2,[r0]'
>

Are you sure you're using the correct assembler?

Try tweaking your PATH so that symlinked names for the ARM toolchain are 
all on your PATH before your host toolchain.

If that's not the issue then its presumably an issue with Pg's configure 
script/Makefiles invoking the wrong tool in a cross-compile situation, 
because AFAIK there's no ARM asm code or ARM gcc intrinsics hidden away 
in Pg, and that'd be the only other way to get those kinds of errors.

--
Craig Ringer



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

* Re: BUG #6331: Cross compile error/aborts. Works if '--disable-spinlock' is used
@ 2011-12-13 00:43  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2011-12-13 00:43 UTC (permalink / raw)
  To: Craig Ringer <ringerc@ringerc.id.au>; +Cc: vbberdin@yahoo.com; pgsql-bugs

Craig Ringer <ringerc@ringerc.id.au> writes:
> On 12/12/2011 5:09 PM, vbberdin@yahoo.com wrote:
>> arm-linux-gnueabi-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
>> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
>> -I../../../../src/include -D_GNU_SOURCE   -c -o xlog.o xlog.c
>> /tmp/cclQLJ69.s: Assembler messages:
>> /tmp/cclQLJ69.s:645: Error: selected processor does not support Thumb mode
>> `swpb r3,r3,[r0]'
>> /tmp/cclQLJ69.s:6821: Error: selected processor does not support Thumb mode
>> `swpb r2,r2,[r0]'

> Are you sure you're using the correct assembler?

> Try tweaking your PATH so that symlinked names for the ARM toolchain are 
> all on your PATH before your host toolchain.

> If that's not the issue then its presumably an issue with Pg's configure 
> script/Makefiles invoking the wrong tool in a cross-compile situation, 
> because AFAIK there's no ARM asm code or ARM gcc intrinsics hidden away 
> in Pg, and that'd be the only other way to get those kinds of errors.

No, you're mistaken about that: we do have inline assembly code in
s_lock.h, and this message does look to be complaining about that code,
because "swpb %0, %0, [%2]" is exactly what the TAS() macro generates
for ARM.

However, unless the OP is prepared to offer some other inline TAS
implementation that is portable to more flavors of ARM than this one is,
we're unlikely to change it.  --disable-spinlocks is exactly what you're
supposed to do if you don't have a supported processor, and his machine
evidently isn't, even if it calls itself an ARM.

It's also possible that his target processor actually can do swpb, but
he needs to use some other gcc flags to persuade gcc of that.

			regards, tom lane



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

* Re: BUG #6331: Cross compile error/aborts. Works if '--disable-spinlock' is used
@ 2011-12-13 01:09  Craig Ringer <ringerc@ringerc.id.au>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Craig Ringer @ 2011-12-13 01:09 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: vbberdin@yahoo.com; pgsql-bugs

On 13/12/11 08:43, Tom Lane wrote:
> Craig Ringer <ringerc@ringerc.id.au> writes:
>> because AFAIK there's no ARM asm code or ARM gcc intrinsics hidden away 
>> in Pg, and that'd be the only other way to get those kinds of errors.
> No, you're mistaken about that: we do have inline assembly code in
> s_lock.h, and this message does look to be complaining about that code,
> because "swpb %0, %0, [%2]" is exactly what the TAS() macro generates
> for ARM.
Ah - my mistake, and thanks for the correction. I really should've seen
that.

--
Craig Ringer



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


end of thread, other threads:[~2011-12-13 01:09 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-12-12 09:09 BUG #6331: Cross compile error/aborts. Works if '--disable-spinlock' is used vbberdin@yahoo.com
2011-12-13 00:26 ` Craig Ringer <ringerc@ringerc.id.au>
2011-12-13 00:43   ` Tom Lane <tgl@sss.pgh.pa.us>
2011-12-13 01:09     ` Craig Ringer <ringerc@ringerc.id.au>

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