From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Nicolas Dechesne <nicolas.dechesne@linaro.org>,
Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: question about -native and prefix
Date: Sun, 05 Jun 2016 23:02:18 +0100 [thread overview]
Message-ID: <1465164138.13979.45.camel@linuxfoundation.org> (raw)
In-Reply-To: <CAP71WjyMbP4RReFjJ-TEi-Kx8EPEVpm3qBZBnXmCm2_3_0D_8w@mail.gmail.com>
Hi,
On Sun, 2016-06-05 at 23:35 +0200, Nicolas Dechesne wrote:
> i was looking at log files and I noticed that when building a
> 'native'
> recipe ${prefix} is set to the sysroot path, e.g.
>
> export prefix="/home/nicolas.dechesne/work/oe-rpb/build-rpb/tmp-rpb
> -glibc/sysroots/x86_64-linux/usr"
>
> as such during do_install() files are typically installed in
> ${DESTDIR}${prefix}, and as such we end up with a 'weird' path, such
> as :
>
> x86_64-linux-libtool: install: /usr/bin/install -c
> .libs/libopkg.so.1.0.0
> /home/nicolas.dechesne/work/oe-rpb/build-rpb/tmp-rpb
> -glibc/work/x86_64-linux/opkg-native/1_0.3.0
> -r0/image/home/nicolas.dechesne/work/oe-rpb/build-rpb/tmp-rpb
> -glibc/sysroots/x86_64-linux/usr/lib/libopkg.so.1.\
>
> e.g. the 'full path' of the sysroot is recreated inside ${D}. It
> doesn't seem to make anything bad, but i just noticed it, and it
> surprised me. what's the rationale for that?
>
> I would have expected to find the sysroot 'relative' path in ${D}. n
> the the absolute path.
Whilst this looks a bit ugly, it is actually doing the right thing.
Native binaries are designed to install and run in $prefix. When we
install them in do_install, there is a DESTDIR as you mention which is
within WORKDIR, then a $prefix beyond that.
If you try and do anything else you end up handcrafting do_install for
natives, or the sysroot or some other solution and you end up having to
hack things. With this approach, whilst the paths are long, "it just
works". So it is actually by design and in the big picture does make
sense when you step back and think about it.
Cheers,
Richard
prev parent reply other threads:[~2016-06-05 22:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-05 21:35 question about -native and prefix Nicolas Dechesne
2016-06-05 22:02 ` Richard Purdie [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=1465164138.13979.45.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=nicolas.dechesne@linaro.org \
--cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox