package/openfpgaloader: needs gcc >= 4.9
PATCH 1/1 package/openfpgaloader: needs gcc >= 4.9
openfpgaloader needs C++11 as specified in CMakeLists.txt:set(CMAKE_CXX_STANDARD 11)
The build on gcc 4.8 fails on:
/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp: In member function 'void SPIFlash::jtag_write_read(uint8_t, uint8_t*, uint8_t*, uint16_t)':/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp:92:43: error: variable-sized object 'jtx' may not be initialized
uint8_t jtx[xfer_len] = {reverseByte(cmd)};
^Fixes:
- http://autobuild.buildroot.org/results/f3f3cc216ae42bb8a8925b0df7c1a3cc79b027d7
--- package/openfpgaloader/Config.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
package/openfpgaloader/Config.in +4 -2
@@ -4,6 +4,7 @@ config BR2_PACKAGE_OPENFPGALOADER depends on BR2_PACKAGE_HAS_UDEV depends on BR2_INSTALL_LIBSTDCPP # libftdipp1 depends on BR2_USE_WCHAR # libftdipp1 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 select BR2_PACKAGE_ARGP_STANDALONE \ if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL # argp select BR2_PACKAGE_LIBFTDI1
@@ -13,6 +14,7 @@ config BR2_PACKAGE_OPENFPGALOADER https://github.com/trabucayre/openFPGALoader/ -comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++" +comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++, gcc >= 4.9" depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ - !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV + !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
Signature · 1 line
2.27.0
Yann E. MORIN
AppliedPATCH 1/1 package/openfpgaloader: needs gcc >= 4.9
Fabrice, All,
On 2020-08-20 22:41 +0200, Fabrice Fontaine spake thusly:
Quoted 23 lines
openfpgaloader needs C++11 as specified in CMakeLists.txt:
set(CMAKE_CXX_STANDARD 11)The build on gcc 4.8 fails on:
/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp: In member function 'voidSPIFlash::jtag_write_read(uint8_t, uint8_t*, uint8_t*, uint16_t)':/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp:92:43: error: variable-sized object 'jtx' may not be initializeduint8_t jtx[xfer_len] = {reverseByte(cmd)}; ^Fixes:
- http://autobuild.buildroot.org/results/f3f3cc216ae42bb8a8925b0df7c1a3cc79b027d7Signed-off-by Fabrice Fontaine <[email protected]>--- package/openfpgaloader/Config.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)package/openfpgaloader/Config.in +0
-0
package/openfpgaloader/Config.in config BR2_PACKAGE_OPENFPGALOADER · line 7
Quoted 4 lines
package/openfpgaloader/Config.in +1
-0@@ -4,6 +4,7 @@ config BR2_PACKAGE_OPENFPGALOADER depends on BR2_PACKAGE_HAS_UDEV depends on BR2_INSTALL_LIBSTDCPP # libftdipp1 depends on BR2_USE_WCHAR # libftdipp1 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
I was a bit confused as to why C++11 (the 'C++' part) was needed, since the dependency to depends on BR2_INSTALL_LIBSTDCPP us identified as being inherited from libftdipp1.
However, openfpgaloader *does* need C++ for itself, so the inherited comment is wrong. I'll fix that.
And that explains why the C++11 dependency solves the issue.
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 20 lines
package/openfpgaloader/Config.in +3
-2select BR2_PACKAGE_ARGP_STANDALONE \ if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL # argp select BR2_PACKAGE_LIBFTDI1@@ -13,6 +14,7 @@ config BR2_PACKAGE_OPENFPGALOADER https://github.com/trabucayre/openFPGALoader/ -comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++" +comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++, gcc >= 4.9" depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ - !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV + !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9Signature · 6 lines
2.27.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 package/openfpgaloader: needs gcc >= 4.9
FAbrice, All,
On 2020-08-23 22:01 +0200, Yann E. MORIN spake thusly:
Quoted 11 lines
On 2020-08-20 22:41 +0200, Fabrice Fontaine spake thusly:
Quoted 10 lines
openfpgaloader needs C++11 as specified in CMakeLists.txt:
set(CMAKE_CXX_STANDARD 11)The build on gcc 4.8 fails on:
/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp: In member function 'voidSPIFlash::jtag_write_read(uint8_t, uint8_t*, uint8_t*, uint16_t)':/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp:92:43: error: variable-sized object 'jtx' may not be initializeduint8_t jtx[xfer_len] = {reverseByte(cmd)}; ^
Quoted 5 lines
Quoted 4 lines
Fixes:
- http://autobuild.buildroot.org/results/f3f3cc216ae42bb8a8925b0df7c1a3cc79b027d7Signed-off-by Fabrice Fontaine <[email protected]>Applied to master, thanks.
Not quite yet, in fact...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 package/openfpgaloader: needs gcc >= 4.9
In reply to Fabrice FontaineGwenhael, Fabrice, All,
On 2020-08-20 22:41 +0200, Fabrice Fontaine spake thusly:
Quoted 5 lines
openfpgaloader needs C++11 as specified in CMakeLists.txt:
set(CMAKE_CXX_STANDARD 11)The build on gcc 4.8 fails on:
Quoted 7 lines
/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp: In member function 'voidSPIFlash::jtag_write_read(uint8_t, uint8_t*, uint8_t*, uint16_t)':/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp:92:43: error: variable-sized object 'jtx' may not be initializeduint8_t jtx[xfer_len] = {reverseByte(cmd)}; ^Fixes:
- http://autobuild.buildroot.org/results/f3f3cc216ae42bb8a8925b0df7c1a3cc79b027d7
Gwenhael, we do have a few build issues with gcc-4.8, and I see you do have some fixes in your tree about exactly those problems:
- ftdipp_mpsse.cpp:24:49: error: incompatible types in assignment of 'const char [1]' to 'char [64]' Fixed with 16ef558 (ftdipp_mpsse: fix build failure with gcc 4.8)
- spiFlash.cpp:92:43: error: variable-sized object 'jtx' may not be initialized Fixed with the ftdi to jtag revamp: 9c9348f, c94f031.
The second is in your v0.1, but not the first.
We 're currently using 849e5751e0, which is 97 commits behind v0.1, 106 commits behind the gcc 4.8 fix, and 123 commits behind master.
We're close to the release, so I am a bit wary to bump the version, but fixing those in Buildroot would require some work for very little gain IMHO, so I'd be tempted to go one of those routes (in order of preference for me):
- bump to v0.1 and backport the gcc-4.8 fix,
- bump to the commit with the gcc-4.8 fix (v0.1 + 9 commits),
- bump to master.
The alternative being to raise the gcc version requirement in Buildroot, as Fabrice suggests (but 4.9 is not even enough because of the spiFlash.cpp issue...)
Thoughts?
Otherwise, we've got another issue that's not yet been addressesd:
src/gowin.cpp:73:11: error: 'runtime_error' is not a member of 'std'
throw std::runtime_error("both write-flash and write-sram can't be set");
^
src/gowin.cpp:81:10: error: 'runtime_error' is not a member of 'std'
throw std::runtime_error("incompatible file format");
^This one may require #include <stdexcept>. Care to have a look too?
Regards,
Yann E. MORIN.
Quoted 34 lines
Signed-off-by Fabrice Fontaine <[email protected]>--- package/openfpgaloader/Config.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)package/openfpgaloader/Config.in +4
-2@@ -4,6 +4,7 @@ config BR2_PACKAGE_OPENFPGALOADER depends on BR2_PACKAGE_HAS_UDEV depends on BR2_INSTALL_LIBSTDCPP # libftdipp1 depends on BR2_USE_WCHAR # libftdipp1 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 select BR2_PACKAGE_ARGP_STANDALONE \ if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL # argp select BR2_PACKAGE_LIBFTDI1@@ -13,6 +14,7 @@ config BR2_PACKAGE_OPENFPGALOADER https://github.com/trabucayre/openFPGALoader/ -comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++" +comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++, gcc >= 4.9" depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ - !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV + !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9Signature · 6 lines
2.27.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 package/openfpgaloader: needs gcc >= 4.9
Yann, all
(You have forget to add me in cc :-) )
Quoted 40 lines · On Sun, 23 Aug 2020 23:24:47 +0200 "Yann E. MORIN" <[email protected]>…
Gwenhael, Fabrice, All,
On 2020-08-20 22:41 +0200, Fabrice Fontaine spake thusly:
Quoted 12 lines
openfpgaloader needs C++11 as specified in CMakeLists.txt:
set(CMAKE_CXX_STANDARD 11)The build on gcc 4.8 fails on:
/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp:
In member function 'void SPIFlash::jtag_write_read(uint8_t, uint8_t*,
uint8_t*,uint16_t)':/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp:92:43:
error: variable-sized object 'jtx' may not be initializeduint8_t
jtx[xfer_len] = {reverseByte(cmd)}; ^Quoted 4 lines
Fixes:
-
http://autobuild.buildroot.org/results/f3f3cc216ae42bb8a8925b0df7c1a3cc79b027d7Gwenhael, we do have a few build issues with gcc-4.8, and I see you do have some fixes in your tree about exactly those problems:
- ftdipp_mpsse.cpp:24:49: error: incompatible types in assignment of 'const
char [1]' to 'char [64]' Fixed with 16ef558 (ftdipp_mpsse: fix build failure with gcc 4.8)- spiFlash.cpp:92:43: error: variable-sized object 'jtx' may not be
initialized Fixed with the ftdi to jtag revamp: 9c9348f, c94f031.The second is in your v0.1, but not the first.
We 're currently using
849e5751e0, which is 97 commits behind v0.1, 106 commits behind the gcc 4.8 fix, and 123 commits behind master.We're close to the release, so I am a bit wary to bump the version, but fixing those in Buildroot would require some work for very little gain IMHO, so I'd be tempted to go one of those routes (in order of preference for me):
Quoted 6 lines
- bump to v0.1 and backport the gcc-4.8 fix,
- bump to the commit with the gcc-4.8 fix (v0.1 + 9 commits),
- bump to master.
IMHO the two first options are better. Theoretically I prefer the first, but the second has the good side effect to drop BR2_PACKAGE_ARGP_STANDALONE line.
Quoted 7 lines
The alternative being to raise the gcc version requirement in Buildroot, as Fabrice suggests (but 4.9 is not even enough because of the spiFlash.cpp issue...)
Thoughts?
Since these failures have been fixed mainline I suppose bump is better option. I prepare a patch in this direction (bump to 0.1 +9 + patch for runtime_error)
Quoted 12 lines
Otherwise, we've got another issue that's not yet been addressesd:
src/gowin.cpp:73:11: error: 'runtime_error' is not a member of 'std' throw std::runtime_error("both write-flash and write-sram can't be set"); ^ src/gowin.cpp:81:10: error: 'runtime_error' is not a member of 'std' throw std::runtime_error("incompatible file format"); ^This one may require #include <stdexcept>. Care to have a look too?
Just pushed a fix mainline.
Quoted 3 lines
Regards,
Yann E. MORIN.
Regards,
Gwenhael
Quoted 46 lines
Quoted 34 lines
Signed-off-by Fabrice Fontaine <[email protected]>--- package/openfpgaloader/Config.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)(quoted diff) +0
-0b/package/openfpgaloader/Config.in index
9835b84b64..493fa09c84100644package/openfpgaloader/Config.in +1
-0@@ -4,6 +4,7 @@ config BR2_PACKAGE_OPENFPGALOADER depends on BR2_PACKAGE_HAS_UDEV depends on BR2_INSTALL_LIBSTDCPP # libftdipp1 depends on BR2_USE_WCHAR # libftdipp1 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 select BR2_PACKAGE_ARGP_STANDALONE \ if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL #argp select
BR2_PACKAGE_LIBFTDI1package/openfpgaloader/Config.in +3
-2@@ -13,6 +14,7 @@ config BR2_PACKAGE_OPENFPGALOADER https://github.com/trabucayre/openFPGALoader/ -comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++" +comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++, gcc >= 4.9" depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ - !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV + !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9Signature · 6 lines
2.27.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildrootSignature · 10 lines
.-----------------.--------------------.------------------.--------------------. | 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 at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 package/openfpgaloader: needs gcc >= 4.9
In reply to Fabrice FontaineFabrice, All,
On 2020-08-20 22:41 +0200, Fabrice Fontaine spake thusly:
Quoted 7 lines
openfpgaloader needs C++11 as specified in CMakeLists.txt:
set(CMAKE_CXX_STANDARD 11)The build on gcc 4.8 fails on:
/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp: In member function 'voidSPIFlash::jtag_write_read(uint8_t, uint8_t*, uint8_t*, uint16_t)':/home/buildroot/autobuild/instance-1/output-1/build/openfpgaloader-849e5751e06d4d00f323205d5f02ee01f9f59a61/src/spiFlash.cpp:92:43: error: variable-sized object 'jtx' may not be initialized
Quoted 7 lines
uint8_t jtx[xfer_len] = {reverseByte(cmd)}; ^Fixes:
- http://autobuild.buildroot.org/results/f3f3cc216ae42bb8a8925b0df7c1a3cc79b027d7Signed-off-by Fabrice Fontaine <[email protected]>
We now have a version that has this fix (as well as others), so this patch is no longer needed. Thanks for prompting the update! :-)
Regards,
Yann E. MORIN.
Quoted 33 lines
--- package/openfpgaloader/Config.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)package/openfpgaloader/Config.in +4
-2@@ -4,6 +4,7 @@ config BR2_PACKAGE_OPENFPGALOADER depends on BR2_PACKAGE_HAS_UDEV depends on BR2_INSTALL_LIBSTDCPP # libftdipp1 depends on BR2_USE_WCHAR # libftdipp1 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 select BR2_PACKAGE_ARGP_STANDALONE \ if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL # argp select BR2_PACKAGE_LIBFTDI1@@ -13,6 +14,7 @@ config BR2_PACKAGE_OPENFPGALOADER https://github.com/trabucayre/openFPGALoader/ -comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++" +comment "openfpgaloader needs udev, a toolchain w/ threads, wchar, C++, gcc >= 4.9" depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ - !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV + !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_UDEV || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9Signature · 6 lines
2.27.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'