All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/bootgen: add patch to fix builds on machines with modern flex versions
@ 2023-06-12 19:26 Peter Korsgaard
  2023-06-12 20:03 ` Frager, Neal via buildroot
  2023-06-13 21:54 ` Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Korsgaard @ 2023-06-12 19:26 UTC (permalink / raw)
  To: buildroot; +Cc: Neal Frager

Fixes:
http://autobuild.buildroot.net/results/293/2936d9b054269b7055e66ab5a7f7c1f7f4926d48/

Bootgen embeds an old version of flex, but uses the system include syntax
(#include <>) to reference it, causing conflicts on systems with the
development headers for a modern flex version installed, leading to build
issues like:

../bisonflex/cmdoptions.yy.cpp: In member function 'virtual int CO::FlexScanner::yylex()':
../bisonflex/cmdoptions.yy.cpp:1362:18: error: no match for 'operator=' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::istream*' {aka 'std::basic_istream<char>*'})

Fix it by using normal local includes (#include "") instead.

Notice: This was already fixed on master, but the cmdoptions.yy.cpp and
reginit.yy.cpp hunks were accidently dropped when the changes were squashed
for the 2023.1 release.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...n-machines-with-modern-flex-versions.patch | 69 +++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch

diff --git a/package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch b/package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch
new file mode 100644
index 0000000000..b13dd2b03b
--- /dev/null
+++ b/package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch
@@ -0,0 +1,69 @@
+From 29a4e487527d109f517fc47a7c284b7732b27a10 Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <peter@korsgaard.com>
+Date: Mon, 12 Jun 2023 21:04:25 +0200
+Subject: [PATCH] Refix builds on machines with modern flex versions
+
+Bootgen embeds an old version of flex, but uses the system include syntax
+(#include <>) to reference it, causing conflicts on systems with the
+development headers for a modern flex version installed, leading to build
+issues like:
+
+../bisonflex/cmdoptions.yy.cpp: In member function 'virtual int CO::FlexScanner::yylex()':
+../bisonflex/cmdoptions.yy.cpp:1362:18: error: no match for 'operator=' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::istream*' {aka 'std::basic_istream<char>*'})
+
+http://autobuild.buildroot.net/results/293/2936d9b054269b7055e66ab5a7f7c1f7f4926d48/build-end.log
+
+Fix it by using normal local #include statements by:
+
+sed -i 's/<FlexLexer.h>/"FlexLexer.h"/g' *
+
+Notice: This was already fixed on master with:
+https://github.com/Xilinx/bootgen/pull/20
+
+Notice: The patch was not applied, instead a different patch with the same
+content was applied to master:
+https://github.com/Xilinx/bootgen/commit/af4f7083ea92931a07e47995eb2bc2a348c577ed
+
+This patch was not applied to the xlnx_rel_v2023.1 branch, instead most
+of the content was included in:
+https://github.com/Xilinx/bootgen/commit/bfba91b2c84160dc203ff09f0e930d82ed06a83a
+
+But the cmdoptions.yy.cpp and reginit.yy.cpp hunks were accidently dropped:
+https://github.com/Xilinx/bootgen/commit/bfba91b2c84160dc203ff09f0e930d82ed06a83a#diff-e0287adb420dbecc112acdf7d4a1efba8ea6cbf06401e4e8679b8ffd22a091d8
+
+Upstream: https://github.com/Xilinx/bootgen/pull/24
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ cmdoptions.yy.cpp | 2 +-
+ reginit.yy.cpp    | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmdoptions.yy.cpp b/cmdoptions.yy.cpp
+index 38fed35..4e940ab 100644
+--- a/cmdoptions.yy.cpp
++++ b/cmdoptions.yy.cpp
+@@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;
+ 
+ #define yytext_ptr yytext
+ 
+-#include <FlexLexer.h>
++#include "FlexLexer.h"
+ 
+ int yyFlexLexer::yywrap() { return 1; }
+ int yyFlexLexer::yylex()
+diff --git a/reginit.yy.cpp b/reginit.yy.cpp
+index d830734..dede473 100644
+--- a/reginit.yy.cpp
++++ b/reginit.yy.cpp
+@@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;
+ 
+ #define yytext_ptr yytext
+ 
+-#include <FlexLexer.h>
++#include "FlexLexer.h"
+ 
+ int yyFlexLexer::yywrap() { return 1; }
+ int yyFlexLexer::yylex()
+-- 
+2.30.2
+
-- 
2.30.2

_______________________________________________
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] package/bootgen: add patch to fix builds on machines with modern flex versions
  2023-06-12 19:26 [Buildroot] [PATCH] package/bootgen: add patch to fix builds on machines with modern flex versions Peter Korsgaard
@ 2023-06-12 20:03 ` Frager, Neal via buildroot
  2023-06-13 21:54 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Frager, Neal via buildroot @ 2023-06-12 20:03 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: buildroot




> Le 12 juin 2023 à 21:26, Peter Korsgaard <peter@korsgaard.com> a écrit :
> 
> Fixes:
> http://autobuild.buildroot.net/results/293/2936d9b054269b7055e66ab5a7f7c1f7f4926d48/
> 
> Bootgen embeds an old version of flex, but uses the system include syntax
> (#include <>) to reference it, causing conflicts on systems with the
> development headers for a modern flex version installed, leading to build
> issues like:
> 
> ../bisonflex/cmdoptions.yy.cpp: In member function 'virtual int CO::FlexScanner::yylex()':
> ../bisonflex/cmdoptions.yy.cpp:1362:18: error: no match for 'operator=' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::istream*' {aka 'std::basic_istream<char>*'})
> 
> Fix it by using normal local includes (#include "") instead.
> 
> Notice: This was already fixed on master, but the cmdoptions.yy.cpp and
> reginit.yy.cpp hunks were accidently dropped when the changes were squashed
> for the 2023.1 release.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
> ...n-machines-with-modern-flex-versions.patch | 69 +++++++++++++++++++
> 1 file changed, 69 insertions(+)
> create mode 100644 package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch
> 
> diff --git a/package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch b/package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch
> new file mode 100644
> index 0000000000..b13dd2b03b
> --- /dev/null
> +++ b/package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch
> @@ -0,0 +1,69 @@
> +From 29a4e487527d109f517fc47a7c284b7732b27a10 Mon Sep 17 00:00:00 2001
> +From: Peter Korsgaard <peter@korsgaard.com>
> +Date: Mon, 12 Jun 2023 21:04:25 +0200
> +Subject: [PATCH] Refix builds on machines with modern flex versions
> +
> +Bootgen embeds an old version of flex, but uses the system include syntax
> +(#include <>) to reference it, causing conflicts on systems with the
> +development headers for a modern flex version installed, leading to build
> +issues like:
> +
> +../bisonflex/cmdoptions.yy.cpp: In member function 'virtual int CO::FlexScanner::yylex()':
> +../bisonflex/cmdoptions.yy.cpp:1362:18: error: no match for 'operator=' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::istream*' {aka 'std::basic_istream<char>*'})
> +
> +http://autobuild.buildroot.net/results/293/2936d9b054269b7055e66ab5a7f7c1f7f4926d48/build-end.log
> +
> +Fix it by using normal local #include statements by:
> +
> +sed -i 's/<FlexLexer.h>/"FlexLexer.h"/g' *
> +
> +Notice: This was already fixed on master with:
> +https://github.com/Xilinx/bootgen/pull/20
> +
> +Notice: The patch was not applied, instead a different patch with the same
> +content was applied to master:
> +https://github.com/Xilinx/bootgen/commit/af4f7083ea92931a07e47995eb2bc2a348c577ed
> +
> +This patch was not applied to the xlnx_rel_v2023.1 branch, instead most
> +of the content was included in:
> +https://github.com/Xilinx/bootgen/commit/bfba91b2c84160dc203ff09f0e930d82ed06a83a
> +
> +But the cmdoptions.yy.cpp and reginit.yy.cpp hunks were accidently dropped:
> +https://github.com/Xilinx/bootgen/commit/bfba91b2c84160dc203ff09f0e930d82ed06a83a#diff-e0287adb420dbecc112acdf7d4a1efba8ea6cbf06401e4e8679b8ffd22a091d8
> +
> +Upstream: https://github.com/Xilinx/bootgen/pull/24
> +Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> +---
> + cmdoptions.yy.cpp | 2 +-
> + reginit.yy.cpp    | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/cmdoptions.yy.cpp b/cmdoptions.yy.cpp
> +index 38fed35..4e940ab 100644
> +--- a/cmdoptions.yy.cpp
> ++++ b/cmdoptions.yy.cpp
> +@@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;
> + 
> + #define yytext_ptr yytext
> + 
> +-#include <FlexLexer.h>
> ++#include "FlexLexer.h"
> + 
> + int yyFlexLexer::yywrap() { return 1; }
> + int yyFlexLexer::yylex()
> +diff --git a/reginit.yy.cpp b/reginit.yy.cpp
> +index d830734..dede473 100644
> +--- a/reginit.yy.cpp
> ++++ b/reginit.yy.cpp
> +@@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;
> + 
> + #define yytext_ptr yytext
> + 
> +-#include <FlexLexer.h>
> ++#include "FlexLexer.h"
> + 
> + int yyFlexLexer::yywrap() { return 1; }
> + int yyFlexLexer::yylex()
> +-- 
> +2.30.2
> +
> -- 
> 2.30.2
> 

Reviewed-by: Neal Frager <neal.frager@amd.com>

Thanks for taking care of this!

Best regards,
Neal Frager
AMD
_______________________________________________
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] package/bootgen: add patch to fix builds on machines with modern flex versions
  2023-06-12 19:26 [Buildroot] [PATCH] package/bootgen: add patch to fix builds on machines with modern flex versions Peter Korsgaard
  2023-06-12 20:03 ` Frager, Neal via buildroot
@ 2023-06-13 21:54 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2023-06-13 21:54 UTC (permalink / raw)
  To: buildroot; +Cc: Neal Frager

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/293/2936d9b054269b7055e66ab5a7f7c1f7f4926d48/

 > Bootgen embeds an old version of flex, but uses the system include syntax
 > (#include <>) to reference it, causing conflicts on systems with the
 > development headers for a modern flex version installed, leading to build
 > issues like:

 > ../bisonflex/cmdoptions.yy.cpp: In member function 'virtual int CO::FlexScanner::yylex()':
 > ../bisonflex/cmdoptions.yy.cpp:1362:18: error: no match for
 > 'operator=' (operand types are 'std::istream' {aka
 > 'std::basic_istream<char>'} and 'std::istream*' {aka
 > 'std::basic_istream<char>*'})

 > Fix it by using normal local includes (#include "") instead.

 > Notice: This was already fixed on master, but the cmdoptions.yy.cpp and
 > reginit.yy.cpp hunks were accidently dropped when the changes were squashed
 > for the 2023.1 release.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
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] package/bootgen: add patch to fix builds on machines with modern flex versions
@ 2023-06-12 20:03 Frager, Neal via buildroot
  0 siblings, 0 replies; 4+ messages in thread
From: Frager, Neal via buildroot @ 2023-06-12 20:03 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: buildroot




> Le 12 juin 2023 à 21:26, Peter Korsgaard <peter@korsgaard.com> a écrit :
> 
> Fixes:
> http://autobuild.buildroot.net/results/293/2936d9b054269b7055e66ab5a7f7c1f7f4926d48/
> 
> Bootgen embeds an old version of flex, but uses the system include syntax
> (#include <>) to reference it, causing conflicts on systems with the
> development headers for a modern flex version installed, leading to build
> issues like:
> 
> ../bisonflex/cmdoptions.yy.cpp: In member function 'virtual int CO::FlexScanner::yylex()':
> ../bisonflex/cmdoptions.yy.cpp:1362:18: error: no match for 'operator=' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::istream*' {aka 'std::basic_istream<char>*'})
> 
> Fix it by using normal local includes (#include "") instead.
> 
> Notice: This was already fixed on master, but the cmdoptions.yy.cpp and
> reginit.yy.cpp hunks were accidently dropped when the changes were squashed
> for the 2023.1 release.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
> ...n-machines-with-modern-flex-versions.patch | 69 +++++++++++++++++++
> 1 file changed, 69 insertions(+)
> create mode 100644 package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch
> 
> diff --git a/package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch b/package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch
> new file mode 100644
> index 0000000000..b13dd2b03b
> --- /dev/null
> +++ b/package/bootgen/0001-Refix-builds-on-machines-with-modern-flex-versions.patch
> @@ -0,0 +1,69 @@
> +From 29a4e487527d109f517fc47a7c284b7732b27a10 Mon Sep 17 00:00:00 2001
> +From: Peter Korsgaard <peter@korsgaard.com>
> +Date: Mon, 12 Jun 2023 21:04:25 +0200
> +Subject: [PATCH] Refix builds on machines with modern flex versions
> +
> +Bootgen embeds an old version of flex, but uses the system include syntax
> +(#include <>) to reference it, causing conflicts on systems with the
> +development headers for a modern flex version installed, leading to build
> +issues like:
> +
> +../bisonflex/cmdoptions.yy.cpp: In member function 'virtual int CO::FlexScanner::yylex()':
> +../bisonflex/cmdoptions.yy.cpp:1362:18: error: no match for 'operator=' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::istream*' {aka 'std::basic_istream<char>*'})
> +
> +http://autobuild.buildroot.net/results/293/2936d9b054269b7055e66ab5a7f7c1f7f4926d48/build-end.log
> +
> +Fix it by using normal local #include statements by:
> +
> +sed -i 's/<FlexLexer.h>/"FlexLexer.h"/g' *
> +
> +Notice: This was already fixed on master with:
> +https://github.com/Xilinx/bootgen/pull/20
> +
> +Notice: The patch was not applied, instead a different patch with the same
> +content was applied to master:
> +https://github.com/Xilinx/bootgen/commit/af4f7083ea92931a07e47995eb2bc2a348c577ed
> +
> +This patch was not applied to the xlnx_rel_v2023.1 branch, instead most
> +of the content was included in:
> +https://github.com/Xilinx/bootgen/commit/bfba91b2c84160dc203ff09f0e930d82ed06a83a
> +
> +But the cmdoptions.yy.cpp and reginit.yy.cpp hunks were accidently dropped:
> +https://github.com/Xilinx/bootgen/commit/bfba91b2c84160dc203ff09f0e930d82ed06a83a#diff-e0287adb420dbecc112acdf7d4a1efba8ea6cbf06401e4e8679b8ffd22a091d8
> +
> +Upstream: https://github.com/Xilinx/bootgen/pull/24
> +Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> +---
> + cmdoptions.yy.cpp | 2 +-
> + reginit.yy.cpp    | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/cmdoptions.yy.cpp b/cmdoptions.yy.cpp
> +index 38fed35..4e940ab 100644
> +--- a/cmdoptions.yy.cpp
> ++++ b/cmdoptions.yy.cpp
> +@@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;
> + 
> + #define yytext_ptr yytext
> + 
> +-#include <FlexLexer.h>
> ++#include "FlexLexer.h"
> + 
> + int yyFlexLexer::yywrap() { return 1; }
> + int yyFlexLexer::yylex()
> +diff --git a/reginit.yy.cpp b/reginit.yy.cpp
> +index d830734..dede473 100644
> +--- a/reginit.yy.cpp
> ++++ b/reginit.yy.cpp
> +@@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;
> + 
> + #define yytext_ptr yytext
> + 
> +-#include <FlexLexer.h>
> ++#include "FlexLexer.h"
> + 
> + int yyFlexLexer::yywrap() { return 1; }
> + int yyFlexLexer::yylex()
> +-- 
> +2.30.2
> +
> -- 
> 2.30.2

Reviewed-by: Neal Frager <neal.frager@amd.com>

Thanks for taking care of this!

Best regards,
Neal Frager
AMD
_______________________________________________
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:[~2023-06-13 21:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 19:26 [Buildroot] [PATCH] package/bootgen: add patch to fix builds on machines with modern flex versions Peter Korsgaard
2023-06-12 20:03 ` Frager, Neal via buildroot
2023-06-13 21:54 ` Peter Korsgaard
2023-06-12 20:03 Frager, Neal via buildroot

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.