diff mbox series

[v3] package/gnuradio: restrict gcc to >= 8

Message ID 20221210162627.10466-1-gwenj@trabucayre.com
State Accepted
Headers show
Series [v3] package/gnuradio: restrict gcc to >= 8 | expand

Commit Message

Gwenhael Goavec-Merou Dec. 10, 2022, 4:26 p.m. UTC
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

With gnuradio 3.10 boost/filesystem was replaced by std::filesystem. This
feature was introduces with gcc 8 (requirering -lstdc++fs (with
gcc 9 explicit -lstdc++fs is no more explicitely required)).

With gcc < 8 build fails with error:

In file included from /home/br-user/work/instance-0/output-1/host/aarch64_be-buildroot-linux-gnu/sysroot/usr/include/boost/dll/runtime_symbol_info.hpp:11:0,
                 from /home/br-user/work/instance-0/output-1/build/gnuradio-3.10.4.0/buildroot-build/gnuradio-runtime/lib/constants.cc:16:
/home/br-user/work/instance-0/output-1/host/aarch64_be-buildroot-linux-gnu/sysroot/usr/include/boost/dll/config.hpp:42:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.

This patch add the dependency to gcc >= 8 and removes BR2_TOOLCHAIN_HAS_GCC_BUG_64735
dependency because it is only required for gcc < 7.

Also gcc restriction is required because volk needs a toolchain with a gcc > 7.

Tested with bootlin toolchain 2020.02-2 (gcc 8.3.0)

fix:
- http://autobuild.buildroot.net/results/6a82605c58f9ef9eb6c14603777dd8523dd00aa5/
- http://autobuild.buildroot.net/results/c7c4ae76954e388ab639b39fd521d90acfe4edc9/

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
Changes v2 -> v333
- rewrite commit message
- add dependency to gcc 8 (std::filesystem) instead of 9.3.0 (ubuntu 20.04 LTS)
Changes v1 -> v2:
- remove depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
- move gcc dependency to main comment
---
 package/gnuradio/Config.in | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Yann E. MORIN Dec. 10, 2022, 5:16 p.m. UTC | #1
On 2022-12-10 17:26 +0100, Gwenhael Goavec-Merou spake thusly:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> 
> With gnuradio 3.10 boost/filesystem was replaced by std::filesystem. This
> feature was introduces with gcc 8 (requirering -lstdc++fs (with
> gcc 9 explicit -lstdc++fs is no more explicitely required)).
> 
> With gcc < 8 build fails with error:
> 
> In file included from /home/br-user/work/instance-0/output-1/host/aarch64_be-buildroot-linux-gnu/sysroot/usr/include/boost/dll/runtime_symbol_info.hpp:11:0,
>                  from /home/br-user/work/instance-0/output-1/build/gnuradio-3.10.4.0/buildroot-build/gnuradio-runtime/lib/constants.cc:16:
> /home/br-user/work/instance-0/output-1/host/aarch64_be-buildroot-linux-gnu/sysroot/usr/include/boost/dll/config.hpp:42:10: fatal error: filesystem: No such file or directory
>  #include <filesystem>
>           ^~~~~~~~~~~~
> compilation terminated.
> 
> This patch add the dependency to gcc >= 8 and removes BR2_TOOLCHAIN_HAS_GCC_BUG_64735
> dependency because it is only required for gcc < 7.

I reword that slightly.

> Also gcc restriction is required because volk needs a toolchain with a gcc > 7.

I also reword that slightly, as it was not explicit enough. (punt)

> Tested with bootlin toolchain 2020.02-2 (gcc 8.3.0)
> 
> fix:
> - http://autobuild.buildroot.net/results/6a82605c58f9ef9eb6c14603777dd8523dd00aa5/
> - http://autobuild.buildroot.net/results/c7c4ae76954e388ab639b39fd521d90acfe4edc9/
> 
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> ---
> Changes v2 -> v333

I was about to actually wait for v333, but decided we need the fix
now... ;-)

> - rewrite commit message
> - add dependency to gcc 8 (std::filesystem) instead of 9.3.0 (ubuntu 20.04 LTS)
> Changes v1 -> v2:
> - remove depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
> - move gcc dependency to main comment
> ---
>  package/gnuradio/Config.in | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
> index de19732cfb..b756f61ea3 100644
> --- a/package/gnuradio/Config.in
> +++ b/package/gnuradio/Config.in
> @@ -1,12 +1,12 @@
> -comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library"
> +comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library gcc >= 8"

Missing comma between "dynamic library" and "gcc >= 8"

Applied to master, thanks.

Regards,
Yann E. MORIN.

>  	depends on BR2_USE_MMU
>  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
>  	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
> -		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
> +		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS || \
> +		!BR2_TOOLCHAIN_GCC_AT_LEAST_8
>  
> -comment "gnuradio needs a toolchain not affected by GCC bug 43744 and 64735"
> +comment "gnuradio needs a toolchain not affected by GCC bug 43744"
>  	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_43744
> -	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
>  
>  config BR2_PACKAGE_GNURADIO
>  	bool "gnuradio"
> @@ -16,8 +16,8 @@ config BR2_PACKAGE_GNURADIO
>  	depends on BR2_USE_MMU # use fork()
>  	depends on BR2_USE_WCHAR # boost
>  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic, boost-thread
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8
>  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_43744
> -	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
>  	select BR2_PACKAGE_BOOST
>  	select BR2_PACKAGE_BOOST_ATOMIC
>  	select BR2_PACKAGE_BOOST_DATE_TIME
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
index de19732cfb..b756f61ea3 100644
--- a/package/gnuradio/Config.in
+++ b/package/gnuradio/Config.in
@@ -1,12 +1,12 @@ 
-comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library"
+comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library gcc >= 8"
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
-		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_8
 
-comment "gnuradio needs a toolchain not affected by GCC bug 43744 and 64735"
+comment "gnuradio needs a toolchain not affected by GCC bug 43744"
 	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_43744
-	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
 
 config BR2_PACKAGE_GNURADIO
 	bool "gnuradio"
@@ -16,8 +16,8 @@  config BR2_PACKAGE_GNURADIO
 	depends on BR2_USE_MMU # use fork()
 	depends on BR2_USE_WCHAR # boost
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic, boost-thread
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_43744
-	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_BOOST_ATOMIC
 	select BR2_PACKAGE_BOOST_DATE_TIME