* [Buildroot] [PATCH v1 1/1] package/bootgen: fix build issue if host-flex already built
@ 2026-03-18 10:04 Neal Frager via buildroot
2026-03-18 16:12 ` Frager, Neal via buildroot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Neal Frager via buildroot @ 2026-03-18 10:04 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, steven.hill, luca.ceresoli, yann.morin,
brandon.maier, fiona.klute, ju.o, Neal Frager, thomas.petazzoni,
romain.naour, michal.simek, romain.naour
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>
---
...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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: fix build issue if host-flex already built
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
2 siblings, 0 replies; 4+ messages in thread
From: Frager, Neal via buildroot @ 2026-03-18 16:12 UTC (permalink / raw)
To: Frager, Neal, buildroot@buildroot.org
Cc: Erkiaga Elorza, Ibai, steven.hill@collins.com,
luca.ceresoli@bootlin.com, yann.morin@orange.com,
brandon.maier@collins.com, fiona.klute@gmx.de, ju.o@free.fr,
thomas.petazzoni@bootlin.com, romain.naour@smile.fr,
Simek, Michal, romain.naour@gmail.com
[AMD Official Use Only - AMD Internal Distribution Only]
> 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>
Hey Neal.
That fixes it. Nice job. Please add my Tested-by if you wish.
-Steve
Tested-by: Steven J. Hill steven.hill@collins.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: fix build issue if host-flex already built
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
2 siblings, 0 replies; 4+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-18 18:12 UTC (permalink / raw)
To: Neal Frager
Cc: buildroot, ibai.erkiaga-elorza, steven.hill, luca.ceresoli,
yann.morin, brandon.maier, fiona.klute, thomas.petazzoni,
romain.naour, michal.simek, romain.naour
On 18/03/2026 11:04, Neal Frager via buildroot wrote:
> 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 master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v1 1/1] package/bootgen: fix build issue if host-flex already built
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
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Perale via buildroot @ 2026-03-27 10:03 UTC (permalink / raw)
To: Neal Frager; +Cc: Thomas Perale, buildroot
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-27 10:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox