Xilinx / bootgen

bootgen source code
Other
34 stars 42 forks source link

Refix builds on machines with modern flex versions #24

Open jacmet opened 1 year ago

jacmet commented 1 year ago

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'} and 'std::istream' {aka 'std::basic_istream'})

http://autobuild.buildroot.net/results/293/2936d9b054269b7055e66ab5a7f7c1f7f4926d48/build-end.log

Fix it by using normal local #include statements by:

sed -i 's//"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

jacmet commented 1 year ago

@RamyaDarapuneni ping?