All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] xenomai 2.6.3 build failure on armhf
@ 2014-03-17 15:59 Lennart Sorensen
  2014-03-17 16:10 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Sorensen @ 2014-03-17 15:59 UTC (permalink / raw)
  To: xenomai

I saw armhf had been added to debian/control in the xenomai-2.6 tree,
and since I am trying to get it running there I figured it was worth
pulling that version.  Unfortunately it fails to build with the same
error as 2.6.3 does.

So any idea what this error means:

assert_context.c: In function 'assert_nrt_inner':
assert_context.c:43:1: error: r7 cannot be used in asm here

I am compiling on Debian wheezy armhf.

The command line it used appears to be:
/bin/bash ../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../src/include  -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -Werror-implicit-function-declaration -pipe -D__XENO__ -D__IN_XENO__ -Wstrict-prototypes -I../../../include -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer -MT libxenomai_la-assert_context.lo -MD -MP -MF .deps/libxenomai_la-assert_context.Tpo -c -o libxenomai_la-assert_context.lo `test -f 'assert_context.c' || echo './'`assert_context.c

Debian armhf uses thumb2 mode by default targeting armv7 with VFP3-D16,
in case that is relevant.

-- 
Len Sorensen


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

* Re: [Xenomai] xenomai 2.6.3 build failure on armhf
  2014-03-17 15:59 [Xenomai] xenomai 2.6.3 build failure on armhf Lennart Sorensen
@ 2014-03-17 16:10 ` Gilles Chanteperdrix
  2014-03-17 16:27   ` Lennart Sorensen
  0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2014-03-17 16:10 UTC (permalink / raw)
  To: Lennart Sorensen; +Cc: xenomai

On 03/17/2014 04:59 PM, Lennart Sorensen wrote:
> I saw armhf had been added to debian/control in the xenomai-2.6
> tree, and since I am trying to get it running there I figured it was
> worth pulling that version.  Unfortunately it fails to build with the
> same error as 2.6.3 does.
>
> So any idea what this error means:
>
> assert_context.c: In function 'assert_nrt_inner':
> assert_context.c:43:1: error: r7 cannot be used in asm here
>
> I am compiling on Debian wheezy armhf.
>
> The command line it used appears to be: /bin/bash ../../../libtool
> --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I../../../src/include  -O2 -D_GNU_SOURCE -D_REENTRANT -Wall
> -Werror-implicit-function-declaration -pipe -D__XENO__ -D__IN_XENO__
> -Wstrict-prototypes -I../../../include -D_FORTIFY_SOURCE=2  -g -O2
> -fstack-protector --param=ssp-buffer-size=4 -Wformat
> -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer
> -MT libxenomai_la-assert_context.lo -MD -MP -MF
> .deps/libxenomai_la-assert_context.Tpo -c -o
> libxenomai_la-assert_context.lo `test -f 'assert_context.c' || echo
> './'`assert_context.c
>
> Debian armhf uses thumb2 mode by default targeting armv7 with
> VFP3-D16, in case that is relevant.
>

Could you show us the assembly that the assembler is trying to assemble?
(gcc -S)

I do not see anything at line 43, but the end of the function itself, 
but from the look of it, I would say that your build options are 
incompatible with our macro syscalls. Most probably the
-fno-omit-frame-pointer, as I believe r7 is the frame-pointer with thumb 
(this would have to be checked). If that is true, it will be difficult 
to fix, as there is no way to detect (at least, last time I checked on 
x86) at compilation time if omit-frame-pointer is enabled or not, to use 
different syscall macros.

FWIW, as I already said, I routinely compile Xenomai with armhf 
compilers, and with default options, I have no problems.

-- 
					    Gilles.


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

* Re: [Xenomai] xenomai 2.6.3 build failure on armhf
  2014-03-17 16:10 ` Gilles Chanteperdrix
@ 2014-03-17 16:27   ` Lennart Sorensen
  2014-03-17 16:30     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Sorensen @ 2014-03-17 16:27 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On Mon, Mar 17, 2014 at 05:10:16PM +0100, Gilles Chanteperdrix wrote:
> On 03/17/2014 04:59 PM, Lennart Sorensen wrote:
> >I saw armhf had been added to debian/control in the xenomai-2.6
> >tree, and since I am trying to get it running there I figured it was
> >worth pulling that version.  Unfortunately it fails to build with the
> >same error as 2.6.3 does.
> >
> >So any idea what this error means:
> >
> >assert_context.c: In function 'assert_nrt_inner':
> >assert_context.c:43:1: error: r7 cannot be used in asm here
> >
> >I am compiling on Debian wheezy armhf.
> >
> >The command line it used appears to be: /bin/bash ../../../libtool
> >--tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
> >-I../../../src/include  -O2 -D_GNU_SOURCE -D_REENTRANT -Wall
> >-Werror-implicit-function-declaration -pipe -D__XENO__ -D__IN_XENO__
> >-Wstrict-prototypes -I../../../include -D_FORTIFY_SOURCE=2  -g -O2
> >-fstack-protector --param=ssp-buffer-size=4 -Wformat
> >-Werror=format-security -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer
> >-MT libxenomai_la-assert_context.lo -MD -MP -MF
> >.deps/libxenomai_la-assert_context.Tpo -c -o
> >libxenomai_la-assert_context.lo `test -f 'assert_context.c' || echo
> >'./'`assert_context.c
> >
> >Debian armhf uses thumb2 mode by default targeting armv7 with
> >VFP3-D16, in case that is relevant.
> >
> 
> Could you show us the assembly that the assembler is trying to assemble?
> (gcc -S)
> 
> I do not see anything at line 43, but the end of the function
> itself, but from the look of it, I would say that your build options
> are incompatible with our macro syscalls. Most probably the
> -fno-omit-frame-pointer, as I believe r7 is the frame-pointer with
> thumb (this would have to be checked). If that is true, it will be
> difficult to fix, as there is no way to detect (at least, last time
> I checked on x86) at compilation time if omit-frame-pointer is
> enabled or not, to use different syscall macros.
> 
> FWIW, as I already said, I routinely compile Xenomai with armhf
> compilers, and with default options, I have no problems.

Hmm, so Debian's version of debian/rules has this:

# necessary from GCC 4.6 on
CFLAGS += -fno-omit-frame-pointer

I wonder if they are wrong.

-- 
Len Sorensen


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

* Re: [Xenomai] xenomai 2.6.3 build failure on armhf
  2014-03-17 16:27   ` Lennart Sorensen
@ 2014-03-17 16:30     ` Gilles Chanteperdrix
  2014-03-17 16:34       ` Lennart Sorensen
  0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2014-03-17 16:30 UTC (permalink / raw)
  To: Lennart Sorensen; +Cc: xenomai

On 03/17/2014 05:27 PM, Lennart Sorensen wrote:
> On Mon, Mar 17, 2014 at 05:10:16PM +0100, Gilles Chanteperdrix wrote:
>> On 03/17/2014 04:59 PM, Lennart Sorensen wrote:
>>> I saw armhf had been added to debian/control in the xenomai-2.6
>>> tree, and since I am trying to get it running there I figured it was
>>> worth pulling that version.  Unfortunately it fails to build with the
>>> same error as 2.6.3 does.
>>>
>>> So any idea what this error means:
>>>
>>> assert_context.c: In function 'assert_nrt_inner':
>>> assert_context.c:43:1: error: r7 cannot be used in asm here
>>>
>>> I am compiling on Debian wheezy armhf.
>>>
>>> The command line it used appears to be: /bin/bash ../../../libtool
>>> --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
>>> -I../../../src/include  -O2 -D_GNU_SOURCE -D_REENTRANT -Wall
>>> -Werror-implicit-function-declaration -pipe -D__XENO__ -D__IN_XENO__
>>> -Wstrict-prototypes -I../../../include -D_FORTIFY_SOURCE=2  -g -O2
>>> -fstack-protector --param=ssp-buffer-size=4 -Wformat
>>> -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer
>>> -MT libxenomai_la-assert_context.lo -MD -MP -MF
>>> .deps/libxenomai_la-assert_context.Tpo -c -o
>>> libxenomai_la-assert_context.lo `test -f 'assert_context.c' || echo
>>> './'`assert_context.c
>>>
>>> Debian armhf uses thumb2 mode by default targeting armv7 with
>>> VFP3-D16, in case that is relevant.
>>>
>>
>> Could you show us the assembly that the assembler is trying to assemble?
>> (gcc -S)
>>
>> I do not see anything at line 43, but the end of the function
>> itself, but from the look of it, I would say that your build options
>> are incompatible with our macro syscalls. Most probably the
>> -fno-omit-frame-pointer, as I believe r7 is the frame-pointer with
>> thumb (this would have to be checked). If that is true, it will be
>> difficult to fix, as there is no way to detect (at least, last time
>> I checked on x86) at compilation time if omit-frame-pointer is
>> enabled or not, to use different syscall macros.
>>
>> FWIW, as I already said, I routinely compile Xenomai with armhf
>> compilers, and with default options, I have no problems.
>
> Hmm, so Debian's version of debian/rules has this:
>
> # necessary from GCC 4.6 on
> CFLAGS += -fno-omit-frame-pointer
>
> I wonder if they are wrong.

Here we maintain our version of debian/rules, not Debian's, which 
unfortunately contains a lot of cruft like this.

-- 
					    Gilles.


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

* Re: [Xenomai] xenomai 2.6.3 build failure on armhf
  2014-03-17 16:30     ` Gilles Chanteperdrix
@ 2014-03-17 16:34       ` Lennart Sorensen
  2014-03-17 16:49         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Sorensen @ 2014-03-17 16:34 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On Mon, Mar 17, 2014 at 05:30:19PM +0100, Gilles Chanteperdrix wrote:
> On 03/17/2014 05:27 PM, Lennart Sorensen wrote:
> >Hmm, so Debian's version of debian/rules has this:
> >
> ># necessary from GCC 4.6 on
> >CFLAGS += -fno-omit-frame-pointer
> >
> >I wonder if they are wrong.
> 
> Here we maintain our version of debian/rules, not Debian's, which
> unfortunately contains a lot of cruft like this.

Well commenting out the line did not appear to break compiling on powerpc
or i386, but it did fix compiling for armhf.

Excellent suggestion.

-- 
Len Sorensen


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

* Re: [Xenomai] xenomai 2.6.3 build failure on armhf
  2014-03-17 16:34       ` Lennart Sorensen
@ 2014-03-17 16:49         ` Gilles Chanteperdrix
  0 siblings, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2014-03-17 16:49 UTC (permalink / raw)
  To: Lennart Sorensen; +Cc: xenomai

On 03/17/2014 05:34 PM, Lennart Sorensen wrote:
> On Mon, Mar 17, 2014 at 05:30:19PM +0100, Gilles Chanteperdrix wrote:
>> On 03/17/2014 05:27 PM, Lennart Sorensen wrote:
>>> Hmm, so Debian's version of debian/rules has this:
>>>
>>> # necessary from GCC 4.6 on
>>> CFLAGS += -fno-omit-frame-pointer
>>>
>>> I wonder if they are wrong.
>>
>> Here we maintain our version of debian/rules, not Debian's, which
>> unfortunately contains a lot of cruft like this.
>
> Well commenting out the line did not appear to break compiling on powerpc
> or i386, but it did fix compiling for armhf.
>
> Excellent suggestion.
>

That is because since 2.6.1 the option is enabled where necessary, i.e. 
on x86_32.

-- 
					    Gilles.


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

end of thread, other threads:[~2014-03-17 16:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17 15:59 [Xenomai] xenomai 2.6.3 build failure on armhf Lennart Sorensen
2014-03-17 16:10 ` Gilles Chanteperdrix
2014-03-17 16:27   ` Lennart Sorensen
2014-03-17 16:30     ` Gilles Chanteperdrix
2014-03-17 16:34       ` Lennart Sorensen
2014-03-17 16:49         ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.