Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC v3 00/30] Add per-package staging feature
Date: Mon, 15 Jun 2015 11:17:57 +0200	[thread overview]
Message-ID: <20150615111757.03ec0b48@free-electrons.com> (raw)
In-Reply-To: <CAHkwnC_J+7jXL7RT=7-HDhg3S-0ketM3p4VZs9cC0BUA6_qNpg@mail.gmail.com>

Dear Fabio Porcedda,

On Mon, 15 Jun 2015 11:06:40 +0200, Fabio Porcedda wrote:

> > I am not entirely happy with this solution, for the following reasons:
> >
> >  * We no longer have a single staging directory that has all the
> >    libraries installed. This is needed for the toolchain to be a
> >    proper SDK usable by application developers outside of Buildroot.
> >
> >    To solve this, either we install everything to both the real
> >    STAGING_DIR and a per-package staging directory, or we create a
> >    final build step that consolidates all the per-package staging
> >    directories into a global one. The advantage of this second option
> >    is that we don't have any parallel installation going on in the
> >    global staging directory.
> 
> I personally prefer too the second solution.

Ok.

> >  * I am not super happy with the idea of having the toolchain sysroot
> >    left in the global staging directory and referenced by the compiler
> >    --sysroot option on one side, and all other libraries found by
> >    using -L, -I and pkg-config tricks.
> >
> >    I would actually prefer if a real complete sysroot was used when
> >    building each package, and the compiler --sysroot option used to
> >    adjust the compiler sysroot. This has however one significant
> >    drawback: the toolchain sysroot must be copied for each and every
> >    package, which can become quite time and space consuming. So on
> >    this aspect, I'd like to have some input from other Buildroot
> >    developers.
> 
> I've already rewritten the patch set using the --sysroot option in the
> toolchain wrapper. I just need to clean it up and send it, i hope to
> be able to send it tomorrow so we can choose the best solution for
> buildroot.

Good. We'll see how it looks. So now the per-package sysroot also
contains the C library and kernel headers as well? It's really a
complete sysroot?

> >  * Your patch uses $($(2)_ADD_TOOLCHAIN_DEPENDENCY) to decide whether
> >    the per-package sysroot mechanism must be used or not. Which means
> >    it will only be used for target packages, and not for host
> >    packages. However, I'm wondering if we should not also apply the
> >    principle to host packages: to get reproducible builds, I believe
> >    we should also have separate sysroots when building host
> >    packages. Opinions from other Buildroot developers?
> >
> >  * Your approach only takes care of make the sysroot handled in a
> >    per-package fashion. But what about HOST_DIR ? We could have the
> >    same inconsistencies as the ones we discussed about STAGING_DIR, but
> >    this time caused by the presence/absence of host utilities. One
> >    build may give a given result because host tool "foo" is present (it
> >    happened to be built before), and the next build may give a
> >    different result because host tool "foo" is absent (it's going to be
> >    build after).
> 
> You are right, but if possible i just want to handle the host
> utilities matter as a next step after this step is done.

I'm indeed fine with solving this part as a next step, however, I'd
like to at least have some basic ideas of how it will be solved, to see
the big picture and see if solving the big picture is doable.

Also, and while this is definitely reaching much further than doing
top-level parallel build, I'm wondering if we shouldn't do the
Buildroot builds within a well-controlled chroot. This would allow us
to control the host environment, and ultimately cache the build results
and re-use them across builds. This is clearly not simple, as we need
to capture all the dependencies that have been built, their version,
their configuration, etc. I have no idea if it is reasonable to do that
in Buildroot, or if it is really too complicated to be compatible with
the "keep it simple" principle of Buildroot.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-06-15  9:17 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03  9:17 [Buildroot] [RFC v3 00/30] Add per-package staging feature Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 01/30] rtmpdump: use TARGET_LDFLAGS instead of TARGET_CFLAGS for XLDFLAGS Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 02/30] xinetd: use TARGET_LDFLAGS in order to support per-package staging Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 03/30] iproute2: use the TARGET_LDFLAGS variable Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 04/30] opentyrian: use TARGET_LDFLAGS Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 05/30] pppd: " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 06/30] openswan: set LDFLAGS Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 07/30] exim: use TARGET_LDFLAGS Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 08/30] fbv: " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 09/30] cups: " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 10/30] faifa: " Fabio Porcedda
2015-03-03 16:57   ` Baruch Siach
2015-03-08 15:14     ` Fabio Porcedda
2015-03-08 15:18       ` Baruch Siach
2015-03-08 15:30         ` Fabio Porcedda
2015-03-08 16:28           ` Baruch Siach
2015-03-03  9:17 ` [Buildroot] [RFC v3 11/30] iw: use TARGET_CONFIGURE_OPTS Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 12/30] dhcpdump: use TARGET_CONFIGURE_OPTS in order to support PPS Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 13/30] dtc: add add support for per-package staging directory Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 14/30] openssh: add support to the " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 15/30] mjpg-streamer: add support for " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 16/30] tcpreplay: delay the execution of pcap-config Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 17/30] erlang: add support for the per-package staging directory Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 18/30] perl: don't loose the -shared flag when TARGET_LDFLAGS isn't empty Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 19/30] erlang-p1-iconv: bump to a version that use TARGET_CFLAGS Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 20/30] erlang-p1-zlib: " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 21/30] lmbench: to be checked Fabio Porcedda
2015-03-03 16:56   ` Baruch Siach
2015-03-08 14:53     ` Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 22/30] Makefile: add the STAGINGNOPKG_DIR variable Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 23/30] gpsd: add support for per-package staging directory Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 24/30] triggerhappy: " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 25/30] ipsec-tools: " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 26/30] pkg-cmake: " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 27/30] pkg-luarocks: " Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 28/30] pkgconf: Move PKG_CONFIG_HOST_BINARY to Makefile.in Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 29/30] pkg-generic: ADD_TOOLCHAIN_DEPENDENCY is true only for target packages Fabio Porcedda
2015-03-03  9:17 ` [Buildroot] [RFC v3 30/30] pkg-generic: add support for per-package staging directory Fabio Porcedda
2015-03-06  0:28   ` Arnout Vandecappelle
2015-05-13  6:22     ` Fabio Porcedda
2015-03-03 13:29 ` [Buildroot] [RFC v3 00/30] Add per-package staging feature Thomas Petazzoni
2015-03-03 14:03   ` Fabio Porcedda
2015-03-03 14:21     ` Thomas Petazzoni
2015-03-11 17:29       ` Fabio Porcedda
2015-03-05  3:54   ` Jérôme Oufella
2015-03-05  8:14     ` Fabio Porcedda
2015-03-05 22:48   ` Arnout Vandecappelle
2015-03-14 16:15     ` Fabio Porcedda
2015-06-17 23:32       ` Arnout Vandecappelle
2015-06-28 15:51         ` Fabio Porcedda
2015-06-12 20:14 ` Thomas Petazzoni
2015-06-15  9:06   ` Fabio Porcedda
2015-06-15  9:17     ` Thomas Petazzoni [this message]
2015-06-17 23:09       ` Arnout Vandecappelle
2015-06-28 15:36         ` Fabio Porcedda
2015-06-28 18:13           ` Thomas Petazzoni
2015-06-28 15:33       ` Fabio Porcedda
2015-06-28 18:12         ` Thomas Petazzoni
2015-06-28 19:34           ` Fabio Porcedda

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=20150615111757.03ec0b48@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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