Compiler Errors with User Space Tools for 2.4.6.1
Hello,
I am working on getting Xenomai 2.4.6.1 working on a custom board with an Atmel AT91SAM9260 processor. The IPIPE patch I used was adeos-ipipe-2.6.25-arm-1.9-02.patch. My kernel patches, compiles, and runs on the board.
However, when compiling the user space tools, make fails when it gets the pSOS+ skin with an error of PTHREAD_STACK_MIN being undeclared. PTHREAD_STACK_MIN is not defined as the include/posix/pthread.h does not appear correctly included in the path for the src/ programs.
This are the configure and make commands I used:
configure CC="arm-linux-gnueabi-gcc -v" CXX=arm-linux-gnueabi-gcc
AR=arm-linux-gnueabi-ar LD=arm-linux-gnueabi-ld \
--build=i686-pc-linux-gnu \
--host=arm-linux \
--enable-arm-mach=at91sam926x \
--enable-arm-eabi \
--enable-arm-tscmake DESTDIR=/projects/som9260/xenomai/_install install
These options worked correctly with Xenomai 2.4.3 and I did not see any changes from the current configure help or from README.INSTALL. If someone could point out what I am doing wrong here, I would appreciate the assistance.
Compiler error dump:
#include "..." search starts here:
#include <...> search starts here:
.
/projects/som9260/xenomai/xenomai-2.4.6.1/src/skins/psos+
../../../src/include
/projects/som9260/xenomai/xenomai-2.4.6.1/include /opt/oe/EMAC-OE/tmp/cross/lib/gcc/arm-linux-gnueabi/4.1.1/include /opt/oe/EMAC-OE/tmp/cross/lib/gcc/arm-linux-gnueabi/4.1.1/../../../../arm-linux-gnueabi/include
End of search list. /projects/som9260/xenomai/xenomai-2.4.6.1/src/skins/psos+/task.c:1:
warning: target CPU does not support interworking
GNU C version 4.1.1 (arm-linux-gnueabi)
compiled by GNU C version 4.1.2 20061115 (prerelease) (Debian
4.1.1-21).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d6cc0668abea2ae9cf06e099757012f4 /projects/som9260/xenomai/xenomai-2.4.6.1/src/skins/psos+/task.c: In function 't_create':
/projects/som9260/xenomai/xenomai-2.4.6.1/src/skins/psos+/task.c:146:
error: 'PTHREAD_STACK_MIN' undeclared (first use in this function) /projects/som9260/xenomai/xenomai-2.4.6.1/src/skins/psos+/task.c:146:
error: (Each undeclared identifier is reported only once /projects/som9260/xenomai/xenomai-2.4.6.1/src/skins/psos+/task.c:146:
error: for each function it appears in.)
make[3]: *** [libpsos_la-task.lo] Error 1
make[3]: Leaving directory `/projects/som9260/xenomai/build-2.6.25-20090121r1/src/skins/psos+' make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/projects/som9260/xenomai/build-2.6.25-20090121r1/src/skins' make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/projects/som9260/xenomai/build-2.6.25-20090121r1/src'
make: *** [install-recursive] Error 1
Thank you in advance,
Greg Bentley
Quoted 21 lines · Greg Bentley
Hello,
I am working on getting Xenomai 2.4.6.1 working on a custom board with an Atmel AT91SAM9260 processor. The IPIPE patch I used was adeos-ipipe-2.6.25-arm-1.9-02.patch. My kernel patches, compiles, and runs on the board.
However, when compiling the user space tools, make fails when it gets the pSOS+ skin with an error of
PTHREAD_STACK_MINbeing undeclared.PTHREAD_STACK_MINis not defined as theinclude/posix/pthread.hdoes not appear correctly included in the path for the src/ programs.This are the configure and make commands I used:
configure CC="arm-linux-gnueabi-gcc -v" CXX=arm-linux-gnueabi-gcc
AR=arm-linux-gnueabi-ar LD=arm-linux-gnueabi-ld \ --build=i686-pc-linux-gnu \ --host=arm-linux \ --enable-arm-mach=at91sam926x \ --enable-arm-eabi \ --enable-arm-tsc
Quoted 6 lines
make DESTDIR=/projects/som9260/xenomai/_install install
These options worked correctly with Xenomai 2.4.3 and I did not see any changes from the current configure help or from README.INSTALL. If someone could point out what I am doing wrong here, I would appreciate the assistance.
I already had this bug, and it turned out to be a toolchain bug. PTHREAD_STACK_MIN was defined in /usr/local/arm-linux/include/limits.h, whereas the toolchain found the limits.h from its system includes before this header. The cure was to add a -I/usr/local/arm-linux/include to the CPPFLAGS.
Signature · 1 line
Gilles.
Quoted 14 lines · Greg Bentley
Hello,
I am working on getting Xenomai 2.4.6.1 working on a custom board with an Atmel AT91SAM9260 processor. The IPIPE patch I used was adeos-ipipe-2.6.25-arm-1.9-02.patch. My kernel patches, compiles, and runs on the board.
However, when compiling the user space tools, make fails when it gets the pSOS+ skin with an error of
PTHREAD_STACK_MINbeing undeclared.PTHREAD_STACK_MINis not defined as theinclude/posix/pthread.hdoes not appear correctly included in the path for the src/ programs.This are the configure and make commands I used:
Quoted 7 lines
configure CC="arm-linux-gnueabi-gcc -v" CXX=arm-linux-gnueabi-gcc
AR=arm-linux-gnueabi-ar LD=arm-linux-gnueabi-ld \ --build=i686-pc-linux-gnu \ --host=arm-linux \ --enable-arm-mach=at91sam926x \ --enable-arm-eabi \ --enable-arm-tsc
Note that if you pass --host=arm-linux-gnueabi to configure, configure guesses the correct values for CC, CXX, AR and LD.
Signature · 1 line
Gilles.