Skip to contentSkip to conversation

xenomai 2.6.3 build failure on armhf

Xenomai Lennart Sorensen 2 participants 6 messages Mar 17, 2014

lore
Share & tools
lore
#0 lore raw

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.

Signature · 1 line
Len Sorensen
#1 lore raw
Quoted 24 lines · Lennart Sorensen

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.

(quoted diff) +0 -6
-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

Quoted 3 lines

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.

Signature · 1 line
					    Gilles.
#2 lore raw
Quoted 41 lines · Gilles Chanteperdrix
Quoted 24 lines · Lennart Sorensen

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.

(quoted diff) +0 -6
-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

Quoted 3 lines

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.

Quoted 2 lines

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.

Signature · 1 line
Len Sorensen
#3 lore raw
Quoted 45 lines · Lennart Sorensen
Quoted 41 lines · Gilles Chanteperdrix
Quoted 24 lines · Lennart Sorensen

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.

(quoted diff) +0 -6
-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

Quoted 3 lines

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.

Quoted 2 lines

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

Quoted 6 lines

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.

Signature · 1 line
					    Gilles.
#4 lore raw
Quoted 10 lines · Gilles Chanteperdrix
Quoted 6 lines · Lennart Sorensen

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.

Signature · 1 line
Len Sorensen
#5 lore raw
Quoted 9 lines · Lennart Sorensen
Quoted 8 lines · Gilles Chanteperdrix
Quoted 6 lines · Lennart Sorensen

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.

Quoted 8 lines
Quoted 2 lines

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.

Signature · 1 line
					    Gilles.