All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Mayer <mmayer@broadcom.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 0/1] mtd-utils-2.1.2: ubihealthd depends on ubifs support
Date: Wed,  9 Jun 2021 16:48:18 -0700	[thread overview]
Message-ID: <20210609234819.1860554-1-mmayer@broadcom.com> (raw)

Hi all,

With the enabling of ubihealthd, we are experiencing a new build
failure.

https://git.buildroot.net/buildroot/commit/?id=77a0167155c3

Here is what is happening:

>>> mtd 2.1.2 Installing to target
[...]
/usr/bin/install -D -m 0755
  /home/mmayer/Development/br-current/output/arm64/build/mtd-2.1.2/ubiformat
  /home/mmayer/Development/br-current/output/arm64/target/usr/sbin/ubiformat
/usr/bin/install -D -m 0755
  /home/mmayer/Development/br-current/output/arm64/build/mtd-2.1.2/ubihealthd
  /home/mmayer/Development/br-current/output/arm64/target/usr/sbin/ubihealthd
/usr/bin/install: cannot stat
  '/home/mmayer/Development/br-current/output/arm64/build/mtd-2.1.2/ubihealthd':
  No such file or directory
make[1]: *** [package/pkg-generic.mk:341:
/home/mmayer/Development/br-current/output/arm64/build/mtd-2.1.2/.stamp_target_installed]
Error 1
make: *** [Makefile:27: _all] Error 2

The problem is the following:

1. We are building with BR2_PACKAGE_MTD_UBIFS_UTILS unset and,
therefore, with --without-ubifs.

2. Building without ubifs leads to "configure" setting its internal
variable need_getrandom="no", which trickles down through the autoconf
environment.

3. Without getrandom, ubihealthd is not being built
?
From mtd-2.1.2/ubi-utils/Makemodule.am:

?49 if WITH_GETRANDOM
?50 UBI_BINS += ubihealthd
?51 endif

The mtd-utils package is consistent within itself. Everything works as
long as "make install" is being called, because it won't try to install
ubihealthd, unless it also built it. However, Buildroot has its own
install routine. It thinks ubihealthd is enabled and has been built.
Therefore, it tries to install it -- which doesn't work if
BR2_PACKAGE_MTD_UBIFS_UTILS is unset.

This patch mirrors the --with-ubifs -> ubihealthd dependency within
Buildroot. In my tests, it worked either way. It will built and install
ubihealthd (when BR2_PACKAGE_MTD_MKFSUBIFS=y) or it will skip building
and installing ubihealthd (when BR2_PACKAGE_MTD_MKFSUBIFS is unset).

Thanks,
-Markus

Markus Mayer (1):
  mtd-utils-2.1.2: ubihealthd depends on ubifs support

 package/mtd/Config.in | 1 +
 1 file changed, 1 insertion(+)

-- 
2.25.1

             reply	other threads:[~2021-06-09 23:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 23:48 Markus Mayer [this message]
2021-06-09 23:48 ` [Buildroot] [PATCH 1/1] mtd-utils-2.1.2: ubihealthd depends on ubifs support Markus Mayer
2021-06-10  4:36   ` Heiko Thiery
2021-06-10 18:56     ` Markus Mayer
2021-06-10 19:25   ` Heiko Thiery
2021-06-13 12:35   ` Yann E. MORIN

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=20210609234819.1860554-1-mmayer@broadcom.com \
    --to=mmayer@broadcom.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 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.