public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
From: Thomas Perale via buildroot <buildroot@buildroot.org>
To: Neal Frager <neal.frager@amd.com>
Cc: Thomas Perale <thomas.perale@mind.be>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v1 1/1] package/bootgen: fix build issue if host-flex already built
Date: Fri, 27 Mar 2026 11:03:12 +0100	[thread overview]
Message-ID: <20260327100312.47004-1-thomas.perale@mind.be> (raw)
In-Reply-To: <20260318100457.1838670-1-neal.frager@amd.com>

In reply of:
> Fix a silent build issue with the host-bootgen package if host-flex is already
> built. The host-flex package will install a version of the flexlexer.h header
> file that is not compatible with the version embedded in bootgen.
> 
> While the build will still 'succeed', the binary will not be correct. This
> can be seen by just running the binary that is built. By default, running
> bootgen without any parameters should print the help menu, but if the wrong
> version of flexlexer.h is used, it will print the following instead:
> 
> $ output/host/bin/bootgen
> 
> ****** Bootgen v2025.1-Merged
>   **** Build date : Mar 18 2026-07:08:01
>     ** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
>     ** Copyright 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved.
> 
> ERROR: syntax error
> -h
> 
> Add a patch to the bootgen package that corrects the issue.
> 
> Upstream: CR to AMD jira
> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>

Applied to 2026.02.x. Thanks

> ---
>  ...use-embedded-win_include-flexlexer.h.patch | 76 +++++++++++++++++++
>  1 file changed, 76 insertions(+)
>  create mode 100644 package/bootgen/0002-flexlexer-use-embedded-win_include-flexlexer.h.patch
> 
> diff --git a/package/bootgen/0002-flexlexer-use-embedded-win_include-flexlexer.h.patch b/package/bootgen/0002-flexlexer-use-embedded-win_include-flexlexer.h.patch
> new file mode 100644
> index 0000000000..1de9a91223
> --- /dev/null
> +++ b/package/bootgen/0002-flexlexer-use-embedded-win_include-flexlexer.h.patch
> @@ -0,0 +1,76 @@
> +From dfe45e10791a171c3c79699257d3d3a978ec30eb Mon Sep 17 00:00:00 2001
> +From: Neal Frager <neal.frager@amd.com>
> +Date: Wed, 18 Mar 2026 09:51:58 +0000
> +Subject: [PATCH] flexlexer: use embedded win_include/flexlexer.h
> +
> +bootgen embeds an old version of flex. If the host machine has a newer version
> +of flex, the bootgen binary that is built will have errors such as the
> +following, if the wrong version of flexlexer.h is used.
> +
> +$ output/host/bin/bootgen
> +
> +****** Bootgen v2025.1-Merged
> +  **** Build date : Mar 18 2026-07:08:01
> +    ** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
> +    ** Copyright 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved.
> +
> +ERROR: syntax error
> +-h
> +
> +Running the bootgen binary should print the help menu by default and should
> +not have a syntax error.
> +
> +Correct the path to the flexlexer.h header files, such that no host version
> +of these files can cause a silent build failure.
> +
> +Upstream: CR to AMD jira
> +
> +Signed-off-by: Neal Frager <neal.frager@amd.com>
> +---
> + common/include/bifscanner.h        | 2 +-
> + common/include/cmdoptionsscanner.h | 2 +-
> + common/include/reginitscanner.h    | 2 +-
> + 3 files changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/common/include/bifscanner.h b/common/include/bifscanner.h
> +index 9683416..9aa72a5 100755
> +--- a/common/include/bifscanner.h
> ++++ b/common/include/bifscanner.h
> +@@ -29,7 +29,7 @@
> + #if ! defined(yyFlexLexerOnce)
> + #undef yyFlexLexer
> + #define yyFlexLexer bifFlexLexer
> +-#include "FlexLexer.h"
> ++#include "../../win_include/FlexLexer.h"
> + #endif
> + 
> + // Override the interface for yylex since we namespaced it
> +diff --git a/common/include/cmdoptionsscanner.h b/common/include/cmdoptionsscanner.h
> +index aa2f474..78fa7cf 100755
> +--- a/common/include/cmdoptionsscanner.h
> ++++ b/common/include/cmdoptionsscanner.h
> +@@ -30,7 +30,7 @@
> + 
> + #undef yyFlexLexer
> + #define yyFlexLexer reginitFlexLexer
> +-#include "FlexLexer.h"
> ++#include "../../win_include/FlexLexer.h"
> + #endif
> + 
> + // Override the interface for yylex since we namespaced it
> +diff --git a/common/include/reginitscanner.h b/common/include/reginitscanner.h
> +index 74463e6..d8152a6 100755
> +--- a/common/include/reginitscanner.h
> ++++ b/common/include/reginitscanner.h
> +@@ -30,7 +30,7 @@
> + 
> + #undef yyFlexLexer
> + #define yyFlexLexer reginitFlexLexer
> +-#include "FlexLexer.h"
> ++#include "../../win_include/FlexLexer.h"
> + #endif
> + 
> + // Override the interface for yylex since we namespaced it
> +-- 
> +2.25.1
> +
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2026-03-27 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 10:04 [Buildroot] [PATCH v1 1/1] package/bootgen: fix build issue if host-flex already built Neal Frager via buildroot
2026-03-18 16:12 ` Frager, Neal via buildroot
2026-03-18 18:12 ` Julien Olivain via buildroot
2026-03-27 10:03 ` Thomas Perale via buildroot [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=20260327100312.47004-1-thomas.perale@mind.be \
    --to=buildroot@buildroot.org \
    --cc=neal.frager@amd.com \
    --cc=thomas.perale@mind.be \
    /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