All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Brian Murphy <brm@robotize.com>
Cc: Kory Maincent <kory.maincent@bootlin.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] boot/grub2: fix dependency on host-gawk
Date: Mon, 25 Oct 2021 21:48:44 +0200	[thread overview]
Message-ID: <20211025194844.GS2400@scaer> (raw)
In-Reply-To: <7ccf4953-a921-54ab-59b0-a77e91056f1a@robotize.com>

Brian, All,

On 2021-10-25 11:06 +0200, Brian Murphy spake thusly:
> Yeah. I got this randomly when building - and pretty much always from clean:
> 
> aclocal.m4:17: warning: this file was generated for autoconf 2.69.
> You have another version of autoconf.  It may work, but is not guaranteed
> to.
> If you have problems, you may need to regenerate the build system entirely.
> To do so, use the procedure documented by the package, typically
> 'autoreconf'.
> rm -f stamp-h1
> touch ../config-util.h.in
> cd . && /bin/bash ./config.status config-util.h
> config.status: creating config-util.h
> In file included from ../include/grub/disk.h:22,
>                  from ../include/grub/file.h:26,
>                  from ../grub-core/fs/minix.c:21:
> ./config.h:38:10: fatal error: ./config-util.h: No such file or directory
>    38 | #include <config-util.h>
>       |          ^~~~~~~~~~~~~~~

This is a parallel build issue; I also hit that issue even with gawk
intalled on my system. We've already backported an upstream change to
(at least partially?) fix that issue:
    https://git.buildroot.org/buildroot/commit/?id=51682c03a8b99d42c1b4e253da80c127d9146c9f

> compilation terminated.
> make[1]: *** [Makefile:13096: libgrub.pp] Error 1
> make[1]: Leaving directory
> '/home/brm/src/buildroot/br.pc/output/build/grub2-2.04/build-i386-pc'
> make: *** [package/pkg-generic.mk:294:
> /home/brm/src/buildroot/br.pc/output/build/grub2-2.04/.stamp_built] Error 2
> 
> and when I run the command I get:
> 
> $ /bin/bash ./config.status config-util.h
> config.status: creating config-util.h
> ./config.status: line 2356: gawk: command not found

This is indeed interesting.

Without gawk installed on my system, and without host-gawk available:

    $ which gawk
    [zilch]
    $ grep gawk ./config.status
    [zilch]
    $ /bin/bash ./config.status config-util.h
    config.status: creating config-util.h
    config.status: config-util.h is unchanged
    $ rm config-util.h
    $ /bin/bash ./config.status config-util.h
    config.status: creating config-util.h

> config.status: error: could not create config-util.h
> 
> So grub ends up needing gawk to create this config-util.h. I do not have
> gawk installed on my build machine but other buildroot packages depend on
> host-gawk so it ends up being built. Perhaps grub autodetects gawk before it
> is ready to be used (sometimes) in a parallel build if it is going to be
> installed as a dependency from another package?

Ah, host-gawk ends up in the dep[endency chain og grub2 by way of
anotehr package. In that case, running config.status manually like you
did aboce will be mising the proper PATH that has Buildroot's host/bin/
directory so that gawk is found.

So, your build issue really looks like the parallel build issue we are
supposed to have fixed already; see above.

Regards,
Yann E. MORIN.

> Making grub depend on host-gawk fixes this for me.
> 
> On 23/10/2021 23:57, Yann E. MORIN wrote:
> >Brian, All,
> >
> >+Köry who did recent changes in grub2
> >
> >On 2021-10-15 12:59 +0200, Brian Murphy spake thusly:
> >>Signed-off-by: Brian Murphy <brm@robotize.com>
> >Could you give a bit more details about the reason why host-gawk is
> >needed? I've just been able to complete a grub2 build with mawk as my
> >system awk. grub2's configure even detects that situation;
> >
> >     checking for gawk... no
> >     checking for mawk... mawk
> >
> >Regards,
> >Yann E. MORIN.
> >
> >>---
> >>  boot/grub2/grub2.mk | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk
> >>index e01ebb2edb..77bf26b739 100644
> >>--- a/boot/grub2/grub2.mk
> >>+++ b/boot/grub2/grub2.mk
> >>@@ -10,7 +10,7 @@ GRUB2_SOURCE = grub-$(GRUB2_VERSION).tar.xz
> >>  GRUB2_LICENSE = GPL-3.0+
> >>  GRUB2_LICENSE_FILES = COPYING
> >>  GRUB2_DEPENDENCIES = host-bison host-flex host-grub2
> >>-HOST_GRUB2_DEPENDENCIES = host-bison host-flex
> >>+HOST_GRUB2_DEPENDENCIES = host-bison host-flex host-gawk
> >>  GRUB2_INSTALL_IMAGES = YES
> >>  # 0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch and 2021/03/02
> >>-- 
> >>2.20.1
> >>
> >>_______________________________________________
> >>buildroot mailing list
> >>buildroot@buildroot.org
> >>https://lists.buildroot.org/mailman/listinfo/buildroot
> -- 
> 
> Med venlig hilsen / Kind Regards / Mit freundlichen Grüssen
> 
> *Brian Murphy*
> 
> Development Engineer
> 
> robotize
> 
> Maglebjergvej 5B - 2800 Kgs. Lyngby - Denmark
> Tel +45 3080 9070
> Mail brm@robotize.com - Web www.robotize.com

> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot


-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2021-10-25 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 10:59 [Buildroot] [PATCH 1/1] boot/grub2: fix dependency on host-gawk Brian Murphy
2021-10-23 21:57 ` Yann E. MORIN
2021-10-25  9:06   ` Brian Murphy
2021-10-25 19:48     ` Yann E. MORIN [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=20211025194844.GS2400@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=brm@robotize.com \
    --cc=buildroot@buildroot.org \
    --cc=kory.maincent@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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.