* [Xenomai-help] Problem building and running demos
@ 2007-06-24 13:43 Bruno Rouchouse
2007-06-24 17:25 ` Gilles Chanteperdrix
0 siblings, 1 reply; 6+ messages in thread
From: Bruno Rouchouse @ 2007-06-24 13:43 UTC (permalink / raw)
To: Xenomai-help@domain.hid
[-- Attachment #1: Type: text/plain, Size: 3240 bytes --]
Hi Xeno users !
just trying to play with Xenomai's demos but I'm having some problems
compiling and running some of them.
Satch for the native skin
==============
I have some troubles here compiling satch.
bruno@domain.hid$ make
cc -o satch satch.c -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT
-D__XENO__ -L/usr/xenomai/lib -lpthread -lnative
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
`_start':
../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
Satch for the posix skin
==============
Building process works fine but running satch fails :
My .runinfo file looks like:
satch:posix:!./satch_rt;popall:control_c
bruno@domain.hid$ xeno-load ./:satch
*
*
* Type ^C to stop this application.
*
*
Satch: producer module not running, please launch producer module before
launching consumer application.
__xeno_user_init: 2
I understand from xenomai/ksrc/skins/posix/demos/Kbuild and going quickly
through satch.c code that there should be a first module to insmod before
using the consumer module but how/when is the producer module supposed to be
built? I don't find any other module in my xenomai built tree or in my
/lib/modules/*-ipipe kernel.
The accuracy demo works fine though.
About Xenomai test-suite
===============
When I run the latency test I get something like:
sudo ./latency
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT| 00:00:01 (periodic user-mode task, 100 us period, priority 99)
RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat
worst
RTD| -4.484| -4.182| -1.449| 0| -4.484| -
1.449
RTD| -4.421| -4.056| -1.278| 0| -4.484| -
1.278
RTD| -4.451| -4.056| -1.062| 0| -4.484| -
1.062
---|------------|------------|------------|--------|-------------------------
Sorry about the dummy question here but what is the meaning of: RTT, RTH and
RTD?
By the way, when I run the whole test suite, xeno-test, my box hangs when I
hit the control-C key in the latency test. I then figured out that the
command used for the workload (dd if=/dev/zero of=/dev/null) make my linux
hangs outside the test anyway! Any reason for that?
FYI: my config (via xeno-config)
==================
bruno@domain.hid$ xeno-config
xeno-config --verbose
--version="2.3.50"
--cc="gcc"
--arch="i386"
--prefix="/usr/xenomai"
--xeno-cflags="-I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT
-D__XENO__"
--xeno-ldflags="-L/usr/xenomai/lib -lpthread "
--posix-cflags="-I/usr/xenomai/include -I/usr/xenomai/include/posix
-D_GNU_SOURCE -D_REENTRANT -D__XENO__"
--posix-ldflags="-L/usr/xenomai/lib -lpthread_rt -lpthread -lrt "
--library-dir="/usr/xenomai/lib"
Usage xeno-config OPTIONS
Options :
--help
--v,--verbose
--version
--cc
--arch
--prefix
--xeno-cflags
--xeno-ldflags
--posix-cflags
--posix-ldflags
--lib*-dir,--libdir,--user-libdir
Any help, answer or advice in one the above mentioned points will be very
appreciated ;)
Thanks in advance.
--
Bruno
[-- Attachment #2: Type: text/html, Size: 4641 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Xenomai-help] Problem building and running demos
2007-06-24 13:43 [Xenomai-help] Problem building and running demos Bruno Rouchouse
@ 2007-06-24 17:25 ` Gilles Chanteperdrix
2007-06-24 21:51 ` Zany Super Chimp
0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2007-06-24 17:25 UTC (permalink / raw)
To: Bruno Rouchouse; +Cc: Xenomai-help@domain.hid
Bruno Rouchouse wrote:
> Hi Xeno users !
>
> just trying to play with Xenomai's demos but I'm having some problems
> compiling and running some of them.
>
> Satch for the native skin
> ==============
>
> I have some troubles here compiling satch.
>
> bruno@domain.hid$ make
> cc -o satch satch.c -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT
> -D__XENO__ -L/usr/xenomai/lib -lpthread -lnative
> /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
> `_start':
> ../sysdeps/i386/elf/start.S:115: undefined reference to `main'
> collect2: ld returned 1 exit status
>
> Satch for the posix skin
> ==============
>
> Building process works fine but running satch fails :
> My .runinfo file looks like:
> satch:posix:!./satch_rt;popall:control_c
>
> bruno@domain.hid$ xeno-load ./:satch
> *
> *
> * Type ^C to stop this application.
> *
> *
> Satch: producer module not running, please launch producer module before
> launching consumer application.
> __xeno_user_init: 2
>
> I understand from xenomai/ksrc/skins/posix/demos/Kbuild and going quickly
> through satch.c code that there should be a first module to insmod before
> using the consumer module but how/when is the producer module supposed to be
> built? I don't find any other module in my xenomai built tree or in my
> /lib/modules/*-ipipe kernel.
You are supposed to run:
make -C /path/to/your/kernel/sources M=$PWD modules
because you know how to compile kernel modules outside of the kernel
tree. You then have a ksatch.ko kernel module. It does not even work
with 2.4 kernels.
This was more intended as a test for posix shared memory and
message queues support, than as a real demo for users. I just did not
find anywhere else to put it.
What we could do is to compile the default version with -DPRODUCER
-DCONSUMER so that it would be standalone.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] Problem building and running demos
2007-06-24 17:25 ` Gilles Chanteperdrix
@ 2007-06-24 21:51 ` Zany Super Chimp
2007-06-25 6:12 ` Jan Kiszka
2007-06-25 7:33 ` Gilles Chanteperdrix
0 siblings, 2 replies; 6+ messages in thread
From: Zany Super Chimp @ 2007-06-24 21:51 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 4247 bytes --]
2007/6/24, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
>
> Bruno Rouchouse wrote:
> > Hi Xeno users !
> >
> > just trying to play with Xenomai's demos but I'm having some problems
> > compiling and running some of them.
> >
> > Satch for the native skin
> > ==============
> >
> > I have some troubles here compiling satch.
> >
> > bruno@domain.hid$ make
> > cc -o satch satch.c -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT
> > -D__XENO__ -L/usr/xenomai/lib -lpthread -lnative
> > /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
> > `_start':
> > ../sysdeps/i386/elf/start.S:115: undefined reference to `main'
> > collect2: ld returned 1 exit status
> >
> > Satch for the posix skin
> > ==============
> >
> > Building process works fine but running satch fails :
> > My .runinfo file looks like:
> > satch:posix:!./satch_rt;popall:control_c
> >
> > bruno@domain.hid$ xeno-load ./:satch
> > *
> > *
> > * Type ^C to stop this application.
> > *
> > *
> > Satch: producer module not running, please launch producer module before
> > launching consumer application.
> > __xeno_user_init: 2
> >
> > I understand from xenomai/ksrc/skins/posix/demos/Kbuild and going
> quickly
> > through satch.c code that there should be a first module to insmod
> before
> > using the consumer module but how/when is the producer module supposed
> to be
> > built? I don't find any other module in my xenomai built tree or in my
> > /lib/modules/*-ipipe kernel.
>
> You are supposed to run:
> make -C /path/to/your/kernel/sources M=$PWD modules
> because you know how to compile kernel modules outside of the kernel
> tree. You then have a ksatch.ko kernel module. It does not even work
> with 2.4 kernels.
Well, shame on me then because I'm not too familiar with kernel module
build process ;)
I get some warnings though which prevent me from insmoding ksatch.koafterwards:
bruno@domain.hid$ make -C /usr/src/linux-
2.6.20.14-ipipe M=$PWD modules
make: Entering directory `/usr/src/linux-2.6.20.14-ipipe'
CC [M] /home/bruno/xenomai/ksrc/skins/posix/demos/satch.o
LD [M] /home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "shm_unlink" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
undefined!
WARNING: "mmap" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
undefined!
WARNING: "ftruncate" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
undefined!
WARNING: "pse51_shm_close"
[/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko] undefined!
WARNING: "shm_open" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
undefined!
WARNING: "munmap" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
undefined!
CC /home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.mod.o
LD [M] /home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko
make: Leaving directory `/usr/src/linux-2.6.20.14-ipipe'
Something missing in the Kbuild file? How to reference symbols of the posix
lib?
And then of course, insmoding ksatch.ko fails...
sudo modprobe xeno_posix
sudo insmod ./ksatch.ko
tail -f /var/log/message
Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol munmap
Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol shm_open
Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol pse51_shm_close
Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol ftruncate
Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol mmap
Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol shm_unlink
This was more intended as a test for posix shared memory and
> message queues support, than as a real demo for users. I just did not
> find anywhere else to put it.
An interesting use case in fact.
What we could do is to compile the default version with -DPRODUCER
> -DCONSUMER so that it would be standalone.
Well from my point of view a short README on how to build the application
would be just fine.
I'll document that in my short "getting started guide" anyway.
Thanks a lot.
--Bruno
--
>
>
> Gilles Chanteperdrix.
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
[-- Attachment #2: Type: text/html, Size: 5848 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] Problem building and running demos
2007-06-24 21:51 ` Zany Super Chimp
@ 2007-06-25 6:12 ` Jan Kiszka
2007-06-25 7:35 ` Gilles Chanteperdrix
2007-06-25 7:33 ` Gilles Chanteperdrix
1 sibling, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2007-06-25 6:12 UTC (permalink / raw)
To: Zany Super Chimp; +Cc: Xenomai, Gilles Chanteperdrix
[-- Attachment #1: Type: text/plain, Size: 4505 bytes --]
Zany Super Chimp wrote:
> 2007/6/24, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
>>
>> Bruno Rouchouse wrote:
>> > Hi Xeno users !
>> >
>> > just trying to play with Xenomai's demos but I'm having some problems
>> > compiling and running some of them.
>> >
>> > Satch for the native skin
>> > ==============
>> >
>> > I have some troubles here compiling satch.
>> >
>> > bruno@domain.hid$ make
>> > cc -o satch satch.c -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT
>> > -D__XENO__ -L/usr/xenomai/lib -lpthread -lnative
>> > /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
>> > `_start':
>> > ../sysdeps/i386/elf/start.S:115: undefined reference to `main'
>> > collect2: ld returned 1 exit status
>> >
>> > Satch for the posix skin
>> > ==============
>> >
>> > Building process works fine but running satch fails :
>> > My .runinfo file looks like:
>> > satch:posix:!./satch_rt;popall:control_c
>> >
>> > bruno@domain.hid$ xeno-load ./:satch
>> > *
>> > *
>> > * Type ^C to stop this application.
>> > *
>> > *
>> > Satch: producer module not running, please launch producer module
>> before
>> > launching consumer application.
>> > __xeno_user_init: 2
>> >
>> > I understand from xenomai/ksrc/skins/posix/demos/Kbuild and going
>> quickly
>> > through satch.c code that there should be a first module to insmod
>> before
>> > using the consumer module but how/when is the producer module supposed
>> to be
>> > built? I don't find any other module in my xenomai built tree or in my
>> > /lib/modules/*-ipipe kernel.
>>
>> You are supposed to run:
>> make -C /path/to/your/kernel/sources M=$PWD modules
>> because you know how to compile kernel modules outside of the kernel
>> tree. You then have a ksatch.ko kernel module. It does not even work
>> with 2.4 kernels.
>
>
> Well, shame on me then because I'm not too familiar with kernel module
> build process ;)
>
> I get some warnings though which prevent me from insmoding
> ksatch.koafterwards:
>
> bruno@domain.hid$ make -C /usr/src/linux-
> 2.6.20.14-ipipe M=$PWD modules
> make: Entering directory `/usr/src/linux-2.6.20.14-ipipe'
> CC [M] /home/bruno/xenomai/ksrc/skins/posix/demos/satch.o
> LD [M] /home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.o
> Building modules, stage 2.
> MODPOST 1 modules
> WARNING: "shm_unlink"
> [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> WARNING: "mmap" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> WARNING: "ftruncate" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> WARNING: "pse51_shm_close"
> [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko] undefined!
> WARNING: "shm_open" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> WARNING: "munmap" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> CC /home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.mod.o
> LD [M] /home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko
> make: Leaving directory `/usr/src/linux-2.6.20.14-ipipe'
>
> Something missing in the Kbuild file? How to reference symbols of the posix
> lib?
>
> And then of course, insmoding ksatch.ko fails...
>
> sudo modprobe xeno_posix
>
> sudo insmod ./ksatch.ko
>
> tail -f /var/log/message
>
> Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol munmap
> Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol shm_open
> Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol pse51_shm_close
> Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol ftruncate
> Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol mmap
> Jun 24 23:45:09 localhost kernel: ksatch: Unknown symbol shm_unlink
>
> This was more intended as a test for posix shared memory and
>> message queues support, than as a real demo for users. I just did not
>> find anywhere else to put it.
>
>
> An interesting use case in fact.
>
> What we could do is to compile the default version with -DPRODUCER
>> -DCONSUMER so that it would be standalone.
>
>
> Well from my point of view a short README on how to build the application
> would be just fine.
> I'll document that in my short "getting started guide" anyway.
Why not move the demos over into the examples repository and integrate
them into the existing build system? Would be a good chance to start
populating the posix folder over there.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] Problem building and running demos
2007-06-25 6:12 ` Jan Kiszka
@ 2007-06-25 7:35 ` Gilles Chanteperdrix
0 siblings, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2007-06-25 7:35 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai
Jan Kiszka wrote:
> Why not move the demos over into the examples repository and integrate
> them into the existing build system? Would be a good chance to start
> populating the posix folder over there.
Yes, I will probably do that.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] Problem building and running demos
2007-06-24 21:51 ` Zany Super Chimp
2007-06-25 6:12 ` Jan Kiszka
@ 2007-06-25 7:33 ` Gilles Chanteperdrix
1 sibling, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2007-06-25 7:33 UTC (permalink / raw)
To: Zany Super Chimp; +Cc: xenomai
Zany Super Chimp wrote:
> 2007/6/24, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
> >
> > Bruno Rouchouse wrote:
> > > Hi Xeno users !
> > >
> > > just trying to play with Xenomai's demos but I'm having some problems
> > > compiling and running some of them.
> > >
> > > Satch for the native skin
> > > ==============
> > >
> > > I have some troubles here compiling satch.
> > >
> > > bruno@domain.hid$ make
> > > cc -o satch satch.c -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT
> > > -D__XENO__ -L/usr/xenomai/lib -lpthread -lnative
> > > /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
> > > `_start':
> > > ../sysdeps/i386/elf/start.S:115: undefined reference to `main'
> > > collect2: ld returned 1 exit status
> > >
> > > Satch for the posix skin
> > > ==============
> > >
> > > Building process works fine but running satch fails :
> > > My .runinfo file looks like:
> > > satch:posix:!./satch_rt;popall:control_c
> > >
> > > bruno@domain.hid$ xeno-load ./:satch
> > > *
> > > *
> > > * Type ^C to stop this application.
> > > *
> > > *
> > > Satch: producer module not running, please launch producer module before
> > > launching consumer application.
> > > __xeno_user_init: 2
> > >
> > > I understand from xenomai/ksrc/skins/posix/demos/Kbuild and going
> > quickly
> > > through satch.c code that there should be a first module to insmod
> > before
> > > using the consumer module but how/when is the producer module supposed
> > to be
> > > built? I don't find any other module in my xenomai built tree or in my
> > > /lib/modules/*-ipipe kernel.
> >
> > You are supposed to run:
> > make -C /path/to/your/kernel/sources M=$PWD modules
> > because you know how to compile kernel modules outside of the kernel
> > tree. You then have a ksatch.ko kernel module. It does not even work
> > with 2.4 kernels.
>
>
> Well, shame on me then because I'm not too familiar with kernel module
> build process ;)
>
> I get some warnings though which prevent me from insmoding ksatch.koafterwards:
>
> bruno@domain.hid$ make -C /usr/src/linux-
> 2.6.20.14-ipipe M=$PWD modules
> make: Entering directory `/usr/src/linux-2.6.20.14-ipipe'
> CC [M] /home/bruno/xenomai/ksrc/skins/posix/demos/satch.o
> LD [M] /home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.o
> Building modules, stage 2.
> MODPOST 1 modules
> WARNING: "shm_unlink" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> WARNING: "mmap" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> WARNING: "ftruncate" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> WARNING: "pse51_shm_close"
> [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko] undefined!
> WARNING: "shm_open" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> WARNING: "munmap" [/home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko]
> undefined!
> CC /home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.mod.o
> LD [M] /home/bruno/xenomai/ksrc/skins/posix/demos/ksatch.ko
> make: Leaving directory `/usr/src/linux-2.6.20.14-ipipe'
>
> Something missing in the Kbuild file? How to reference symbols of the posix
> lib?
You have to select posix shared memory (CONFIG_XENO_OPT_POSIX_SHM) when
configuring the kernel.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-06-25 7:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-24 13:43 [Xenomai-help] Problem building and running demos Bruno Rouchouse
2007-06-24 17:25 ` Gilles Chanteperdrix
2007-06-24 21:51 ` Zany Super Chimp
2007-06-25 6:12 ` Jan Kiszka
2007-06-25 7:35 ` Gilles Chanteperdrix
2007-06-25 7:33 ` 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.