All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: jeff angielski <jeff@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Using xeno-config in cross compiling
Date: Tue, 21 Apr 2009 16:02:40 +0200	[thread overview]
Message-ID: <49EDD200.9050700@domain.hid> (raw)
In-Reply-To: <1240315440.14934.9.camel@domain.hid>

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.


      reply	other threads:[~2009-04-21 14:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49EDD200.9050700@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=jeff@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.