All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Using xeno-config in cross compiling
@ 2009-04-18 20:57 jeff angielski
  2009-04-18 22:42 ` Philippe Gerum
  0 siblings, 1 reply; 7+ messages in thread
From: jeff angielski @ 2009-04-18 20:57 UTC (permalink / raw)
  To: xenomai


I am unable to cross compile to any POSIX skin applications, including
the example, because the xeno-config is return that POSIX is not
supported.  However, when I run xeno-config on the target itself, it
returns the necessary posix-cflags and posix-ldflags.

Running it on my powerpc target:
 -bash-3.2# /usr/xenomai/bin/xeno-config --posix-cflags --posix-ldflags
-I/usr/xenomai/include -I/usr/xenomai/include/posix -D_GNU_SOURCE
-D_REENTRANT -D__XENO__
-Wl,@/usr/xenomai/lib/posix.wrappers -L/usr/xenomai/lib -lpthread_rt
-lpthread -lrt

Running it on my i686 build host:
jaa@domain.hid:~$ /srv/nfs/srp-xen/usr/xenomai/bin/xeno-config
--posix-cflags --posix-ldflags
-I/usr/xenomai/include -I/usr/xenomai/include/posix -D_GNU_SOURCE
-D_REENTRANT -D__XENO__
POSIX support is not available


What is the proper way to cross compiler a POSIX skin application in a
cross compiler development setup?



Gory details:
xen: xenomai-2.4.7
kernel: linux 2.6.28.5
arch: powerpc (MPC8544)
cc: ppc_85xxDP (from ELDK)


-- 
Jeff Angielski
The PTR Group
www.theptrgroup.com




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

* Re: [Xenomai-help] Using xeno-config in cross compiling
  2009-04-18 20:57 [Xenomai-help] Using xeno-config in cross compiling jeff angielski
@ 2009-04-18 22:42 ` Philippe Gerum
  2009-04-20 19:17   ` jeff angielski
  0 siblings, 1 reply; 7+ messages in thread
From: Philippe Gerum @ 2009-04-18 22:42 UTC (permalink / raw)
  To: jeff angielski; +Cc: xenomai

On Sat, 2009-04-18 at 16:57 -0400, jeff angielski wrote:
> I am unable to cross compile to any POSIX skin applications, including
> the example, because the xeno-config is return that POSIX is not
> supported.  However, when I run xeno-config on the target itself, it
> returns the necessary posix-cflags and posix-ldflags.
> 
> Running it on my powerpc target:
>  -bash-3.2# /usr/xenomai/bin/xeno-config --posix-cflags --posix-ldflags
> -I/usr/xenomai/include -I/usr/xenomai/include/posix -D_GNU_SOURCE
> -D_REENTRANT -D__XENO__
> -Wl,@/usr/xenomai/lib/posix.wrappers -L/usr/xenomai/lib -lpthread_rt
> -lpthread -lrt
> 
> Running it on my i686 build host:
> jaa@domain.hid:~$ /srv/nfs/srp-xen/usr/xenomai/bin/xeno-config
> --posix-cflags --posix-ldflags
> -I/usr/xenomai/include -I/usr/xenomai/include/posix -D_GNU_SOURCE
> -D_REENTRANT -D__XENO__
> POSIX support is not available
> 
> 
> What is the proper way to cross compiler a POSIX skin application in a
> cross compiler development setup?
> 

The way you did it is probably ok; but you may want to tell xeno-config
where to find the staging directory via the DESTDIR variable, so it can
locate all the host files it needs locally (e.g. posix.wrappers).

i.e.

DESTDIR=/srv/nfs/srp-xen /srv/nfs/srp-xen/usr/xenomai/bin/xeno-config
--posix-cflags ...

> 
> 
> Gory details:
> xen: xenomai-2.4.7
> kernel: linux 2.6.28.5
> arch: powerpc (MPC8544)
> cc: ppc_85xxDP (from ELDK)
> 
> 
-- 
Philippe.




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

* Re: [Xenomai-help] Using xeno-config in cross compiling
  2009-04-18 22:42 ` Philippe Gerum
@ 2009-04-20 19:17   ` jeff angielski
  2009-04-20 19:25     ` Gilles Chanteperdrix
  2009-04-20 20:14     ` Philippe Gerum
  0 siblings, 2 replies; 7+ messages in thread
From: jeff angielski @ 2009-04-20 19:17 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai

On Sun, 2009-04-19 at 00:42 +0200, Philippe Gerum wrote:
> On Sat, 2009-04-18 at 16:57 -0400, jeff angielski wrote:
> > 
> > What is the proper way to cross compiler a POSIX skin application in a
> > cross compiler development setup?
> > 
> 
> The way you did it is probably ok; but you may want to tell xeno-config
> where to find the staging directory via the DESTDIR variable, so it can
> locate all the host files it needs locally (e.g. posix.wrappers).
> 
> i.e.
> 
> DESTDIR=/srv/nfs/srp-xen /srv/nfs/srp-xen/usr/xenomai/bin/xeno-config
> --posix-cflags ...

This compiles but won't run as-is on the target because it complains
it's missing the pthread_rt library.

# ./readirq-posix
./readirq-posix: error while loading shared libraries:
libpthread_rt.so.1: cannot open shared object file: No such file or
directory

# ldd ./readirq-posix
        linux-vdso32.so.1 =>  (0x00100000)
        libpthread_rt.so.1 => not found
        libpthread.so.0 => /lib/libpthread.so.0 (0x0ff98000)
        librt.so.1 => /lib/librt.so.1 (0x0ff40000)
        libc.so.6 => /lib/libc.so.6 (0x0fda1000)
        /lib/ld.so.1 (0x48000000)


I used LD_LIBRARY_PATH to get it to work but it seems like I must be
missing a step somewhere in the process.

# LD_LIBRARY_PATH=/usr/xenomai/lib ./readirq-posix


Do other people cross compiling for POSIX skins have to do this?

TIA,
Jeff

-- 
Jeff Angielski
The PTR Group
www.theptrgroup.com




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

* Re: [Xenomai-help] Using xeno-config in cross compiling
  2009-04-20 19:17   ` jeff angielski
@ 2009-04-20 19:25     ` Gilles Chanteperdrix
  2009-04-20 20:14     ` Philippe Gerum
  1 sibling, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2009-04-20 19:25 UTC (permalink / raw)
  To: jeff angielski; +Cc: xenomai

jeff angielski wrote:
> On Sun, 2009-04-19 at 00:42 +0200, Philippe Gerum wrote:
>> On Sat, 2009-04-18 at 16:57 -0400, jeff angielski wrote:
>>> What is the proper way to cross compiler a POSIX skin application in a
>>> cross compiler development setup?
>>>
>> The way you did it is probably ok; but you may want to tell xeno-config
>> where to find the staging directory via the DESTDIR variable, so it can
>> locate all the host files it needs locally (e.g. posix.wrappers).
>>
>> i.e.
>>
>> DESTDIR=/srv/nfs/srp-xen /srv/nfs/srp-xen/usr/xenomai/bin/xeno-config
>> --posix-cflags ...
> 
> This compiles but won't run as-is on the target because it complains
> it's missing the pthread_rt library.
> 
> # ./readirq-posix
> ./readirq-posix: error while loading shared libraries:
> libpthread_rt.so.1: cannot open shared object file: No such file or
> directory
> 
> # ldd ./readirq-posix
>         linux-vdso32.so.1 =>  (0x00100000)
>         libpthread_rt.so.1 => not found
>         libpthread.so.0 => /lib/libpthread.so.0 (0x0ff98000)
>         librt.so.1 => /lib/librt.so.1 (0x0ff40000)
>         libc.so.6 => /lib/libc.so.6 (0x0fda1000)
>         /lib/ld.so.1 (0x48000000)
> 
> 
> I used LD_LIBRARY_PATH to get it to work but it seems like I must be
> missing a step somewhere in the process.
> 
> # LD_LIBRARY_PATH=/usr/xenomai/lib ./readirq-posix
> 
>
> Do other people cross compiling for POSIX skins have to do this?

You get this issue when trying to use custom shared libraries, it is not
related to Xenomai at all. There are several solutions to solve this
issue, and a lot of documentation on internet.

-- 
					    Gilles.


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

* Re: [Xenomai-help] Using xeno-config in cross compiling
  2009-04-20 19:17   ` jeff angielski
  2009-04-20 19:25     ` Gilles Chanteperdrix
@ 2009-04-20 20:14     ` Philippe Gerum
  2009-04-21 12:04       ` jeff angielski
  1 sibling, 1 reply; 7+ messages in thread
From: Philippe Gerum @ 2009-04-20 20:14 UTC (permalink / raw)
  To: jeff angielski; +Cc: xenomai

On Mon, 2009-04-20 at 15:17 -0400, jeff angielski wrote:
> On Sun, 2009-04-19 at 00:42 +0200, Philippe Gerum wrote:
> > On Sat, 2009-04-18 at 16:57 -0400, jeff angielski wrote:
> > > 
> > > What is the proper way to cross compiler a POSIX skin application in a
> > > cross compiler development setup?
> > > 
> > 
> > The way you did it is probably ok; but you may want to tell xeno-config
> > where to find the staging directory via the DESTDIR variable, so it can
> > locate all the host files it needs locally (e.g. posix.wrappers).
> > 
> > i.e.
> > 
> > DESTDIR=/srv/nfs/srp-xen /srv/nfs/srp-xen/usr/xenomai/bin/xeno-config
> > --posix-cflags ...
> 
> This compiles but won't run as-is on the target because it complains
> it's missing the pthread_rt library.
> 
> # ./readirq-posix
> ./readirq-posix: error while loading shared libraries:
> libpthread_rt.so.1: cannot open shared object file: No such file or
> directory
> 
> # ldd ./readirq-posix
>         linux-vdso32.so.1 =>  (0x00100000)
>         libpthread_rt.so.1 => not found
>         libpthread.so.0 => /lib/libpthread.so.0 (0x0ff98000)
>         librt.so.1 => /lib/librt.so.1 (0x0ff40000)
>         libc.so.6 => /lib/libc.so.6 (0x0fda1000)
>         /lib/ld.so.1 (0x48000000)
> 
> 
> I used LD_LIBRARY_PATH to get it to work but it seems like I must be
> missing a step somewhere in the process.
> 
> # LD_LIBRARY_PATH=/usr/xenomai/lib ./readirq-posix
> 
> 
> Do other people cross compiling for POSIX skins have to do this?
> 

You need to set up your dynamic linker config properly on the target;
see ldconfig related files, and particularly ld.so.conf (or ld.so.conf.d
with newer ld.so versions).

> TIA,
> Jeff
> 
-- 
Philippe.




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

* Re: [Xenomai-help] Using xeno-config in cross compiling
  2009-04-20 20:14     ` Philippe Gerum
@ 2009-04-21 12:04       ` jeff angielski
  2009-04-21 14:02         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: jeff angielski @ 2009-04-21 12:04 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai

On Mon, 2009-04-20 at 22:14 +0200, Philippe Gerum wrote:
> On Mon, 2009-04-20 at 15:17 -0400, jeff angielski wrote:
> > On Sun, 2009-04-19 at 00:42 +0200, Philippe Gerum wrote:
> > > On Sat, 2009-04-18 at 16:57 -0400, jeff angielski wrote:
> > > > 
> > > > What is the proper way to cross compiler a POSIX skin application in a
> > > > cross compiler development setup?
> > > > 
> > > 
> > > The way you did it is probably ok; but you may want to tell xeno-config
> > > where to find the staging directory via the DESTDIR variable, so it can
> > > locate all the host files it needs locally (e.g. posix.wrappers).
> > > 
> > > i.e.
> > > 
> > > DESTDIR=/srv/nfs/srp-xen /srv/nfs/srp-xen/usr/xenomai/bin/xeno-config
> > > --posix-cflags ...
> > 
> > This compiles but won't run as-is on the target because it complains
> > it's missing the pthread_rt library.
> > 
> > # ./readirq-posix
> > ./readirq-posix: error while loading shared libraries:
> > libpthread_rt.so.1: cannot open shared object file: No such file or
> > directory
> > 
> > # ldd ./readirq-posix
> >         linux-vdso32.so.1 =>  (0x00100000)
> >         libpthread_rt.so.1 => not found
> >         libpthread.so.0 => /lib/libpthread.so.0 (0x0ff98000)
> >         librt.so.1 => /lib/librt.so.1 (0x0ff40000)
> >         libc.so.6 => /lib/libc.so.6 (0x0fda1000)
> >         /lib/ld.so.1 (0x48000000)
> > 
> > 
> > I used LD_LIBRARY_PATH to get it to work but it seems like I must be
> > missing a step somewhere in the process.
> > 
> > # LD_LIBRARY_PATH=/usr/xenomai/lib ./readirq-posix
> > 
> > 
> > Do other people cross compiling for POSIX skins have to do this?
> > 
> 
> You need to set up your dynamic linker config properly on the target;
> see ldconfig related files, and particularly ld.so.conf (or ld.so.conf.d
> with newer ld.so versions).

Sounds reasonable.  However, I do not have to play with the dynamic
libraries when I run the cyclictest application which also uses the
POSIX skins.

The difference, of course, is that my application uses the
examples/posix Makefile [xeno-config] while cyclictest uses the automake
generated Makefile in the src/testsuite/cyclic.

Perhaps even with using DESTDIR before make there is still something not
being setup correctly.



-- 
Jeff Angielski
The PTR Group
www.theptrgroup.com




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

* Re: [Xenomai-help] Using xeno-config in cross compiling
  2009-04-21 12:04       ` jeff angielski
@ 2009-04-21 14:02         ` Gilles Chanteperdrix
  0 siblings, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2009-04-21 14:02 UTC (permalink / raw)
  To: jeff angielski; +Cc: xenomai

jeff angielski wrote:
> On Mon, 2009-04-20 at 22:14 +0200, Philippe Gerum wrote:
>> On Mon, 2009-04-20 at 15:17 -0400, jeff angielski wrote:
>>> On Sun, 2009-04-19 at 00:42 +0200, Philippe Gerum wrote:
>>>> On Sat, 2009-04-18 at 16:57 -0400, jeff angielski wrote:
>>>>> What is the proper way to cross compiler a POSIX skin application in a
>>>>> cross compiler development setup?
>>>>>
>>>> The way you did it is probably ok; but you may want to tell xeno-config
>>>> where to find the staging directory via the DESTDIR variable, so it can
>>>> locate all the host files it needs locally (e.g. posix.wrappers).
>>>>
>>>> i.e.
>>>>
>>>> DESTDIR=/srv/nfs/srp-xen /srv/nfs/srp-xen/usr/xenomai/bin/xeno-config
>>>> --posix-cflags ...
>>> This compiles but won't run as-is on the target because it complains
>>> it's missing the pthread_rt library.
>>>
>>> # ./readirq-posix
>>> ./readirq-posix: error while loading shared libraries:
>>> libpthread_rt.so.1: cannot open shared object file: No such file or
>>> directory
>>>
>>> # ldd ./readirq-posix
>>>         linux-vdso32.so.1 =>  (0x00100000)
>>>         libpthread_rt.so.1 => not found
>>>         libpthread.so.0 => /lib/libpthread.so.0 (0x0ff98000)
>>>         librt.so.1 => /lib/librt.so.1 (0x0ff40000)
>>>         libc.so.6 => /lib/libc.so.6 (0x0fda1000)
>>>         /lib/ld.so.1 (0x48000000)
>>>
>>>
>>> I used LD_LIBRARY_PATH to get it to work but it seems like I must be
>>> missing a step somewhere in the process.
>>>
>>> # LD_LIBRARY_PATH=/usr/xenomai/lib ./readirq-posix
>>>
>>>
>>> Do other people cross compiling for POSIX skins have to do this?
>>>
>> You need to set up your dynamic linker config properly on the target;
>> see ldconfig related files, and particularly ld.so.conf (or ld.so.conf.d
>> with newer ld.so versions).
> 
> Sounds reasonable.  However, I do not have to play with the dynamic
> libraries when I run the cyclictest application which also uses the
> POSIX skins.
> 
> The difference, of course, is that my application uses the
> examples/posix Makefile [xeno-config] while cyclictest uses the automake
> generated Makefile in the src/testsuite/cyclic.
> 
> Perhaps even with using DESTDIR before make there is still something not
> being setup correctly.
> 

See:
http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-libraries.html


-- 
                                                 Gilles.


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

end of thread, other threads:[~2009-04-21 14:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-18 20:57 [Xenomai-help] Using xeno-config in cross compiling jeff angielski
2009-04-18 22:42 ` Philippe Gerum
2009-04-20 19:17   ` jeff angielski
2009-04-20 19:25     ` Gilles Chanteperdrix
2009-04-20 20:14     ` Philippe Gerum
2009-04-21 12:04       ` jeff angielski
2009-04-21 14:02         ` 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.