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] [PATCH 2/2 v8] core/pkg-cmake: ensure no package needs a cmake newer than we do
Date: Sat, 17 Sep 2016 16:19:10 +0200	[thread overview]
Message-ID: <20160917161910.2844c351@free-electrons.com> (raw)
In-Reply-To: <51cc816673de51799d4f86a7045ef4f480fbab46.1473717489.git.yann.morin.1998@free.fr>

Hello,

On Mon, 12 Sep 2016 23:59:20 +0200, Yann E. MORIN wrote:
> If the existing host cmake is deemed usable, we now skip building our
> own variant.
> 
> However, in the following conditions, the build would fail:
> 
>   - host cmake: 3.2
>   - Buildroot requirement: 3.1
>   - package requirement: 3.4
>   - cmake package in Buildroot: 3.5
> 
> This is because Buildroot would consider that cmake-3.2 is usable (and
> it technically is for Buildroot, which requires 3.0), but the package
> will fail at configure time.
> 
> To catch this situation and fix Buildroot, we add a post-patch hook that
> checks that, amongst all cmake versions required by the package, the
> version required by Buildroot is at least equal or higher.
> 
> We do use a post-patch hook rather than the more expected pre-configure
> hook, to avoid having to build all the package dependencies just to
> check the cmake version.
> 
> Exclude the cmake (target variant) from that check, since it requires
> cmake >= 3.4. However, that requirement is only for the tests, and we're
> not building them; all the other parts of the build have no requirement
> besides a cmake >= 2.8). Bumping the version Buildroot requires to 3.4
> would almost always defeat the purpose of this change, as a lot of
> not-so-old distributions are still using cmake < 3.4; only very recent
> ones released since the end of 2015 would stand a chance of having such
> a cmake version. So we just exclude cmake from that check.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Cc: Samuel Martin <s.martin49@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Davide Viti <zinosat@tiscali.it>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

As was said by others, I don't really like this solution. It's
complicated, it doesn't work in all cases, and covers a situation where
the error message is already going to be fairly explicit.

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

      reply	other threads:[~2016-09-17 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 21:59 [Buildroot] [PATCH 0/2 v8] core/pkg-cmake: do not build host-cmake if not needed (branch yem/host-cmake) Yann E. MORIN
2016-09-12 21:59 ` [Buildroot] [PATCH 1/2 v8] core: don't build host-cmake if it is available on the build host Yann E. MORIN
2016-09-13 21:05   ` Luca Ceresoli
2016-09-13 21:34     ` Yann E. MORIN
2016-09-13 22:45       ` Arnout Vandecappelle
2016-09-14  7:40         ` Luca Ceresoli
2016-09-17 14:13   ` Thomas Petazzoni
2016-09-12 21:59 ` [Buildroot] [PATCH 2/2 v8] core/pkg-cmake: ensure no package needs a cmake newer than we do Yann E. MORIN
2016-09-17 14:19   ` Thomas Petazzoni [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=20160917161910.2844c351@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