All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Error at compilation of examples
@ 2007-04-05 13:08 Benoît CAMUS
  2007-04-05 13:22 ` Gilles Chanteperdrix
  2007-04-06  7:08 ` Benoît CAMUS
  0 siblings, 2 replies; 4+ messages in thread
From: Benoît CAMUS @ 2007-04-05 13:08 UTC (permalink / raw)
  To: xenomai

Hi all,

I got errors in headers while trying to compile basical programs
(sigcpu.c and a posix thread one). I use ELDK 4.1 cross-compiler for ARM
architecture and 2.6.19 kernel. So here is error i got:


$> arm-linux-gcc -I/opt/eldk/arm/usr/include/ -I/opt/eldk/arm/include/
-D_GNU_SOURCE -D_REENTRANT -L/opt/eldk/arm/lib/ -lpthread -lnative
-Xlinker -rpath -Xlinker /opt/eldk/arm/lib/ -o t_posix ./test_thread.c

In file included from /opt/eldk/arm/include/nucleus/queue.h:24,
                 from /opt/eldk/arm/include/nucleus/timer.h:23,
                 from /opt/eldk/arm/include/nucleus/thread.h:23,
                 from /opt/eldk/arm/include/posix/pthread.h:149,
                 from ./test_thread.c:1:
/opt/eldk/arm/include/nucleus/types.h:75: error: parse error before
'xnflags_t'
/opt/eldk/arm/include/nucleus/types.h:75: warning: data definition has
no type or storage class

Is there something i missed in xenomai's configuration ?

That's parameters i put:
configure --prefix=/ --build=i686-linux-gnu --host=arm-linux
--enable-arm-arch=4 --disable-dox-doc --disable-dbx
--disable-dbx-network --disable-x86-tsc

Thanks,
Benoit



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

* Re: [Xenomai-help] Error at compilation of examples
  2007-04-05 13:08 [Xenomai-help] Error at compilation of examples Benoît CAMUS
@ 2007-04-05 13:22 ` Gilles Chanteperdrix
  2007-04-06  7:08 ` Benoît CAMUS
  1 sibling, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2007-04-05 13:22 UTC (permalink / raw)
  To: Benoît CAMUS; +Cc: xenomai

Benoît CAMUS wrote:
> Hi all,
> 
> I got errors in headers while trying to compile basical programs
> (sigcpu.c and a posix thread one). I use ELDK 4.1 cross-compiler for ARM
> architecture and 2.6.19 kernel. So here is error i got:
> 
> 
> $> arm-linux-gcc -I/opt/eldk/arm/usr/include/ -I/opt/eldk/arm/include/
> -D_GNU_SOURCE -D_REENTRANT -L/opt/eldk/arm/lib/ -lpthread -lnative
> -Xlinker -rpath -Xlinker /opt/eldk/arm/lib/ -o t_posix ./test_thread.c

The most simple way to compile an example for Xenomai posix skin is to
use the xeno-config script as installed by Xenomai. If you have run
Xenomai installation with DESTDIR set, pass the same DESTDIR in
xeno-config environment. Examples usually come with Makefiles that do so.

What version of Xenomai are you using ?


-- 
                                                 Gilles Chanteperdrix


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

* Re: [Xenomai-help] Error at compilation of examples
  2007-04-05 13:08 [Xenomai-help] Error at compilation of examples Benoît CAMUS
  2007-04-05 13:22 ` Gilles Chanteperdrix
@ 2007-04-06  7:08 ` Benoît CAMUS
  1 sibling, 0 replies; 4+ messages in thread
From: Benoît CAMUS @ 2007-04-06  7:08 UTC (permalink / raw)
  To: xenomai

>The most simple way to compile an example for Xenomai posix skin is to
>use the xeno-config script as installed by Xenomai. If you have run
>Xenomai installation with DESTDIR set, pass the same DESTDIR in
>xeno-config environment. Examples usually come with Makefiles that do so.

>What version of Xenomai are you using ?

I'm using xenomai last version (2.3.1), 
and have the same error using makefile with XENO parameter

Benoit





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

* Re: [Xenomai-help] Error at compilation of examples
       [not found] <17941.63222.407172.361683@domain.hid>
@ 2007-04-06  9:05 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2007-04-06  9:05 UTC (permalink / raw)
  To: Benoît CAMUS; +Cc: xenomai

Benoît CAMUS wrote:
>>The most simple way to compile an example for Xenomai posix skin is to
>>use the xeno-config script as installed by Xenomai. If you have run
>>Xenomai installation with DESTDIR set, pass the same DESTDIR in
>>xeno-config environment. Examples usually come with Makefiles that do so.
> 
> 
>>What version of Xenomai are you using ?
> 
> 
> I'm using xenomai last version (2.3.1), 
> and have the same error using makefile with XENO parameter

I just tried compiling the examples and found two reasons why it might
not compile:
- the patched Linux kernel sources must have been compiled (so that the
include/asm symlink is created)
- if you are cross-compiling, you must pass the proper ARCH variable at
make invocation for compiling the kernel modules.

The last problem I have is the link order, but to solve this, I guess
the Makefiles should be changed.

Here is what I get:

make[1]: Entering directory
`/home/gcx/build/xenomai-examples/rtdm/profiles/serial'
gcc -m32 -I/usr/xenomai-2.3.1/include -D_GNU_SOURCE -D_REENTRANT
-L/usr/xenomai-2.3.1/lib -lpthread  -lnative -lrtdm -Xlinker -rpath
-Xlinker /usr/xenomai-2.3.1/lib  cross-link.c   -o cross-link
/tmp/ccQMPxBI.o(.text+0x19): In function `close_file':
cross-link.c: undefined reference to `rt_dev_close'
/tmp/ccQMPxBI.o(.text+0x5e):cross-link.c: undefined reference to
`rt_task_sleep'
/tmp/ccQMPxBI.o(.text+0x136): In function `cleanup_all':
cross-link.c: undefined reference to `rt_task_delete'
/tmp/ccQMPxBI.o(.text+0x169):cross-link.c: undefined reference to
`rt_task_delete'
/tmp/ccQMPxBI.o(.text+0x1bc): In function `write_task_proc':
cross-link.c: undefined reference to `rt_timer_ns2ticks'
/tmp/ccQMPxBI.o(.text+0x1e0):cross-link.c: undefined reference to
`rt_task_set_periodic'
/tmp/ccQMPxBI.o(.text+0x217):cross-link.c: undefined reference to
`rt_task_wait_period'
/tmp/ccQMPxBI.o(.text+0x244):cross-link.c: undefined reference to
`rt_timer_read'
/tmp/ccQMPxBI.o(.text+0x266):cross-link.c: undefined reference to
`rt_dev_write'
/tmp/ccQMPxBI.o(.text+0x372): In function `read_task_proc':
cross-link.c: undefined reference to `rt_dev_ioctl'
/tmp/ccQMPxBI.o(.text+0x3cb):cross-link.c: undefined reference to
`rt_dev_read'
/tmp/ccQMPxBI.o(.text+0x3df):cross-link.c: undefined reference to
`rt_timer_read'
/tmp/ccQMPxBI.o(.text+0x54e): In function `main':
cross-link.c: undefined reference to `rt_dev_open'
/tmp/ccQMPxBI.o(.text+0x5be):cross-link.c: undefined reference to
`rt_dev_ioctl'
/tmp/ccQMPxBI.o(.text+0x609):cross-link.c: undefined reference to
`rt_dev_open'
/tmp/ccQMPxBI.o(.text+0x679):cross-link.c: undefined reference to
`rt_dev_ioctl'
/tmp/ccQMPxBI.o(.text+0x6dc):cross-link.c: undefined reference to
`rt_task_create'
/tmp/ccQMPxBI.o(.text+0x74c):cross-link.c: undefined reference to
`rt_task_create'
/tmp/ccQMPxBI.o(.text+0x7b8):cross-link.c: undefined reference to
`rt_task_start'
/tmp/ccQMPxBI.o(.text+0x808):cross-link.c: undefined reference to
`rt_task_start'
collect2: ld returned 1 exit status
make[1]: *** [cross-link] Error 1

IMHO, the command line should be:
gcc -m32 -I/usr/xenomai-2.3.1/include -D_GNU_SOURCE -D_REENTRANT
cross-link.c  -L/usr/xenomai-2.3.1/lib -lpthread  -lnative -lrtdm
-Xlinker -rpath -Xlinker /usr/xenomai-2.3.1/lib  -o cross-link

-- 
                                                 Gilles Chanteperdrix


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

end of thread, other threads:[~2007-04-06  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 13:08 [Xenomai-help] Error at compilation of examples Benoît CAMUS
2007-04-05 13:22 ` Gilles Chanteperdrix
2007-04-06  7:08 ` Benoît CAMUS
     [not found] <17941.63222.407172.361683@domain.hid>
2007-04-06  9:05 ` 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.