All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] valgrind and modprobe xeno_posix
@ 2011-02-17  9:45 Franz Engel
  2011-02-17 10:07 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Franz Engel @ 2011-02-17  9:45 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

Hi,

I'm still doubtful if I installed Xenomai correctly. When I start my QT-Programm 
it runs correctly and I can see a new process in /proc/xenomai/state with the 
name of my program. I insert the following lines in my *.pro-File (the draft for 
my makefile):
LIBS += -Wl,@usr/xenomai/lib/posix.wrappers -L/usr/xenomai/lib -lpthread_rt 
-lxenomai -lpthread -lrt -Xlinker -rpath -Xlinker /usr/xenomai/lib
LIBS += -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ 
-I/usr/xenomai/include/posix

I'm absoult no makefile pro. The two lines are the only thing I changed in my 
*.pro file. Do I have to make more changes?

Futhermore, when I run:
valgrind --leak-check=yes ./demo

I get the correct valgrind output, but also a line of xenomai:
Xenomai: POSIX skin or CONFIG_XENO_OPT_PERVASIVE disabled
(modprobe xeno_posix?)

Do I use a bad makefile?

Thanking you in anticipation,
     Franz



[-- Attachment #2: Type: text/html, Size: 1398 bytes --]

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

* Re: [Xenomai-help] valgrind and modprobe xeno_posix
  2011-02-17  9:45 [Xenomai-help] valgrind and modprobe xeno_posix Franz Engel
@ 2011-02-17 10:07 ` Gilles Chanteperdrix
  2011-02-17 13:32   ` Franz Engel
  0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2011-02-17 10:07 UTC (permalink / raw)
  To: Franz Engel; +Cc: xenomai

Franz Engel wrote:
> Hi,
> 
> I'm still doubtful if I installed Xenomai correctly. When I start my QT-Programm 
> it runs correctly and I can see a new process in /proc/xenomai/state with the 
> name of my program. I insert the following lines in my *.pro-File (the draft for 
> my makefile):
> LIBS += -Wl,@usr/xenomai/lib/posix.wrappers -L/usr/xenomai/lib -lpthread_rt 
> -lxenomai -lpthread -lrt -Xlinker -rpath -Xlinker /usr/xenomai/lib
> LIBS += -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ 
> -I/usr/xenomai/include/posix
> 
> I'm absoult no makefile pro. The two lines are the only thing I changed in my 
> *.pro file. Do I have to make more changes?

Wrong makefile, see:
http://www.xenomai.org/index.php/Porting_POSIX_applications_to_Xenomai#Compilation_flags


> Futhermore, when I run:
> valgrind --leak-check=yes ./demo
> 
> I get the correct valgrind output, but also a line of xenomai:
> Xenomai: POSIX skin or CONFIG_XENO_OPT_PERVASIVE disabled
> (modprobe xeno_posix?)
> 
> Do I use a bad makefile?

Yes, you use a bad makefile, but this is not the reason why your
application does not work with valgrind: Xenomai applications do not
work with valgrind.

Also note that the QT library is compiled to use Linux posix objects,
not Xenomai posix objects, so depending on what you do, mixing some
Xenomai code with QT code will not work. The real-time part of the
application has to clearly been separated from the rest, and only this
part needs to be linked with Xenomai flags, so, the simplest thing to do
is to put the real-time part of the application in a dynamic library,
link-edit this dynamic library with Xenomai posix skin flags, then link
with this dynamic library the rest of the application, without Xenomai
posix skin flags. And in the interface between the library and the
applicaiton, do not put any inline functions calling Xenomai posix skin
services, as this would ruin what you are trying to achieve.

-- 
					    Gilles.


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

* Re: [Xenomai-help] valgrind and modprobe xeno_posix
  2011-02-17 10:07 ` Gilles Chanteperdrix
@ 2011-02-17 13:32   ` Franz Engel
  2011-02-17 21:13     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Franz Engel @ 2011-02-17 13:32 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 2936 bytes --]

>> Hi,
>> 
>> I'm still doubtful if I installed Xenomai correctly. When I start my QT-Programm 
>> it runs correctly and I can see a new process in /proc/xenomai/state with the 
>> name of my program. I insert the following lines in my *.pro-File (the draft for 
>> my makefile):
>> LIBS += -Wl,@usr/xenomai/lib/posix.wrappers -L/usr/xenomai/lib -lpthread_rt 
>> -lxenomai -lpthread -lrt -Xlinker -rpath -Xlinker /usr/xenomai/lib
>> LIBS += -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ 
>> -I/usr/xenomai/include/posix
>> 
>> I'm absoult no makefile pro. The two lines are the only thing I changed in my 
>> *.pro file. Do I have to make more changes?

>Wrong makefile, see:
>http://www.xenomai.org/index.php/Porting_POSIX_applications_to_Xenomai#Compilation_flags


>> Futhermore, when I run:
>> valgrind --leak-check=yes ./demo
>> 
>> I get the correct valgrind output, but also a line of xenomai:
>> Xenomai: POSIX skin or CONFIG_XENO_OPT_PERVASIVE disabled
>> (modprobe xeno_posix?)
>> 
>> Do I use a bad makefile?

>Yes, you use a bad makefile, but this is not the reason why your
>application does not work with valgrind: Xenomai applications do not
>work with valgrind.

>Also note that the QT library is compiled to use Linux posix objects,
>not Xenomai posix objects, so depending on what you do, mixing some
>Xenomai code with QT code will not work. The real-time part of the
>application has to clearly been separated from the rest, and only this
>part needs to be linked with Xenomai flags, so, the simplest thing to do
>is to put the real-time part of the application in a dynamic library,
>link-edit this dynamic library with Xenomai posix skin flags, then link
>with this dynamic library the rest of the application, without Xenomai
>posix skin flags. And in the interface between the library and the
>applicaiton, do not put any inline functions calling Xenomai posix skin
>services, as this would ruin what you are trying to achieve.
>
>-- 
>                        Gilles.

O.k. This is a quite helpfull information. I tried to make dynamic librarys and glue them with QT to my whole project. But, how I say, I'm a newbie with makefiles. I tried to trim the satch-example. This is my makefile:
APPLICATION = demoLib
XENO?=/usr/xenomai
XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config 2>/dev/null)
CC=$(shell $(XENOCONFIG) --cc)
CFLAGS=$(shell $(XENOCONFIG) --posix-cflags) $(APP_CFLAGS)
LDFLAGS=$(shell $(XENOCONFIG) --posix-ldflags) $(APP_LDFLAGS)
LDFLAGS+=Xlinker -rpath -Xlinker $(shell $(XENOCONFIG) --libdir)
 
all:: $(APPLICATIONS)
clean::
    $(RM) $(APPLICATIONS) *.o
 
The demoLib works fine, but of course, it is no lib. What I have to change to make a lib? Did I understand it right that the xeno-config is a skript that gives support to get the *FLAGS easier? But where is the compiling comand?


[-- Attachment #2: Type: text/html, Size: 4398 bytes --]

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

* Re: [Xenomai-help] valgrind and modprobe xeno_posix
  2011-02-17 13:32   ` Franz Engel
@ 2011-02-17 21:13     ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2011-02-17 21:13 UTC (permalink / raw)
  To: Franz Engel; +Cc: xenomai

> Spam detection software, running on the system "xenomai.org", has 
> identified this incoming email as possible spam. (...)

Please avoid HTML messages.

Franz Engel wrote:
> O.k. This is a quite helpfull information. I tried to make dynamic
> librarys and glue them with QT to my whole project. But, how I say,
> I'm a newbie with makefiles. I tried to trim the satch-example. This
> is my makefile: APPLICATION = demoLib XENO?=/usr/xenomai 
> XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config
> 2>/dev/null) CC=$(shell $(XENOCONFIG) --cc) CFLAGS=$(shell
> $(XENOCONFIG) --posix-cflags) $(APP_CFLAGS) LDFLAGS=$(shell
> $(XENOCONFIG) --posix-ldflags) $(APP_LDFLAGS) LDFLAGS+=Xlinker -rpath
> -Xlinker $(shell $(XENOCONFIG) --libdir)
> 
> all:: $(APPLICATIONS) clean:: $(RM) $(APPLICATIONS) *.o
> 
> The demoLib works fine, but of course, it is no lib. What I have to
> change to make a lib? Did I understand it right that the xeno-config
> is a skript that gives support to get the *FLAGS easier? But where is
> the compiling comand?

Well, it is a bit off-topic, what you are asking is how to compile
libraries for Linux on your target. See for instance:

http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html


-- 
                                                                Gilles.


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

end of thread, other threads:[~2011-02-17 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17  9:45 [Xenomai-help] valgrind and modprobe xeno_posix Franz Engel
2011-02-17 10:07 ` Gilles Chanteperdrix
2011-02-17 13:32   ` Franz Engel
2011-02-17 21:13     ` 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.