diff mbox series

[1/1] package/gtest: needs gcc >= 5

Message ID 20220610165412.3605141-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/gtest: needs gcc >= 5 | expand

Commit Message

Fabrice Fontaine June 10, 2022, 4:54 p.m. UTC
Commit be38432532b23275869a3a914c0ad0031323259c wrongly assumed that
is_trivially_copy_constructible was available since gcc 4.9 but it
wasn't fully available until gcc 5.1 and
https://github.com/gcc-mirror/gcc/commit/f5e523b76d1bdaf0df15f6bfdee602a3e153be68
resulting in the following build failure with gcc 4.9.1:

In file included from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/internal/gtest-death-test-internal.h:39:0,
                 from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest-death-test.h:41,
                 from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest.h:64,
                 from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/src/gtest-all.cc:38:
/nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest-matchers.h: In static member function 'static constexpr bool testing::internal::MatcherBase<T>::IsInlined()':
/nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest-matchers.h:414:12: error: 'is_trivially_copy_constructible' is not a member of 'std'
            std::is_trivially_copy_constructible<M>::value &&
            ^

Fixes:
 - http://autobuild.buildroot.org/results/1723705cb7aea5f6fcc7e6722d866ed3bd098115

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/falcosecurity-libs/Config.in |  2 +-
 package/gtest/Config.in              | 13 ++++++-------
 package/libcamera/Config.in          |  7 +++----
 3 files changed, 10 insertions(+), 12 deletions(-)

Comments

Arnout Vandecappelle June 14, 2022, 4:36 p.m. UTC | #1
On 10/06/2022 18:54, Fabrice Fontaine wrote:
> Commit be38432532b23275869a3a914c0ad0031323259c wrongly assumed that
> is_trivially_copy_constructible was available since gcc 4.9 but it
> wasn't fully available until gcc 5.1 and
> https://github.com/gcc-mirror/gcc/commit/f5e523b76d1bdaf0df15f6bfdee602a3e153be68
> resulting in the following build failure with gcc 4.9.1:
> 
> In file included from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/internal/gtest-death-test-internal.h:39:0,
>                   from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest-death-test.h:41,
>                   from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest.h:64,
>                   from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/src/gtest-all.cc:38:
> /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest-matchers.h: In static member function 'static constexpr bool testing::internal::MatcherBase<T>::IsInlined()':
> /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest-matchers.h:414:12: error: 'is_trivially_copy_constructible' is not a member of 'std'
>              std::is_trivially_copy_constructible<M>::value &&
>              ^
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/1723705cb7aea5f6fcc7e6722d866ed3bd098115
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   package/falcosecurity-libs/Config.in |  2 +-
>   package/gtest/Config.in              | 13 ++++++-------
>   package/libcamera/Config.in          |  7 +++----
>   3 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/package/falcosecurity-libs/Config.in b/package/falcosecurity-libs/Config.in
> index 157bc8ef6d..f101883384 100644
> --- a/package/falcosecurity-libs/Config.in
> +++ b/package/falcosecurity-libs/Config.in
> @@ -4,7 +4,7 @@ config BR2_PACKAGE_FALCOSECURITY_LIBS
>   	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
>   	depends on BR2_LINUX_KERNEL
>   	depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb
> -	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # grpc
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # grpc, gtest
>   	depends on BR2_TOOLCHAIN_HAS_THREADS # jq, protobuf, tbb
>   	depends on !BR2_STATIC_LIBS # protobuf, tbb
>   	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
> diff --git a/package/gtest/Config.in b/package/gtest/Config.in
> index 35fc9fea7b..4355e9c9c5 100644
> --- a/package/gtest/Config.in
> +++ b/package/gtest/Config.in
> @@ -3,7 +3,7 @@ config BR2_PACKAGE_GTEST
>   	depends on BR2_USE_WCHAR
>   	depends on BR2_TOOLCHAIN_HAS_THREADS
>   	depends on BR2_INSTALL_LIBSTDCPP
> -	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++11
>   	depends on BR2_USE_MMU # fork()
>   	help
>   	  Google's framework for writing C++ tests on a variety of
> @@ -26,7 +26,7 @@ if BR2_PACKAGE_GTEST
>   
>   config BR2_PACKAGE_GTEST_GMOCK
>   	bool "gmock"
> -	depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-gtest
> +	depends on BR2_HOST_GCC_AT_LEAST_5 # host-gtest
>   	help
>   	  Inspired by jMock, EasyMock, and Hamcrest, and designed with
>   	  C++'s specifics in mind, Google C++ Mocking Framework (or
> @@ -48,13 +48,12 @@ config BR2_PACKAGE_GTEST_GMOCK
>   	  libraries required to link/run them. The host package installs
>   	  gmock_gen, a Python script used to generate code mocks.
>   
> -comment "gmock needs host gcc >= 4.9"
> -	depends on !BR2_HOST_GCC_AT_LEAST_4_9
> +comment "gmock needs host gcc >= 5"
> +	depends on !BR2_HOST_GCC_AT_LEAST_5
>   
>   endif # BR2_PACKAGE_GTEST
>   
> -comment "gtest needs a toolchain w/ C++, wchar, threads, gcc >= 4.9"
> +comment "gtest needs a toolchain w/ C++, wchar, threads, gcc >= 5"
>   	depends on BR2_USE_MMU
>   	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> -		!BR2_INSTALL_LIBSTDCPP || \
> -		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> +		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_5
> diff --git a/package/libcamera/Config.in b/package/libcamera/Config.in
> index 23a0040abf..fd7b3c92c4 100644
> --- a/package/libcamera/Config.in
> +++ b/package/libcamera/Config.in
> @@ -77,18 +77,17 @@ config BR2_PACKAGE_LIBCAMERA_COMPLIANCE
>   	depends on BR2_USE_WCHAR # gtest
>   	depends on BR2_TOOLCHAIN_HAS_THREADS # gtest
>   	depends on BR2_INSTALL_LIBSTDCPP # gtest
> -	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # gtest
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # gtest
>   	depends on BR2_USE_MMU # gtest
>   	select BR2_PACKAGE_GTEST
>   	select BR2_PACKAGE_LIBEVENT
>   	help
>   	  lc-compliance test application
>   
> -comment "lc-compliance test application needs a toolchain w/ C++, wchar, threads, gcc >= 4.9"
> +comment "lc-compliance test application needs a toolchain w/ C++, wchar, threads, gcc >= 5"
>   	depends on BR2_USE_MMU
>   	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> -		!BR2_INSTALL_LIBSTDCPP || \
> -		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> +		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_5
>   
>   endif # BR2_PACKAGE_LIBCAMERA
>
Peter Korsgaard July 11, 2022, 5:26 p.m. UTC | #2
On 10/06/2022 18.54, Fabrice Fontaine wrote:
> Commit be38432532b23275869a3a914c0ad0031323259c wrongly assumed that
> is_trivially_copy_constructible was available since gcc 4.9 but it
> wasn't fully available until gcc 5.1 and
> https://github.com/gcc-mirror/gcc/commit/f5e523b76d1bdaf0df15f6bfdee602a3e153be68
> resulting in the following build failure with gcc 4.9.1:
> 
> In file included from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/internal/gtest-death-test-internal.h:39:0,
>                   from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest-death-test.h:41,
>                   from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest.h:64,
>                   from /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/src/gtest-all.cc:38:
> /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest-matchers.h: In static member function 'static constexpr bool testing::internal::MatcherBase<T>::IsInlined()':
> /nvmedata/autobuild/instance-13/output-1/build/gtest-1.11.0/googletest/include/gtest/gtest-matchers.h:414:12: error: 'is_trivially_copy_constructible' is not a member of 'std'
>              std::is_trivially_copy_constructible<M>::value &&
>              ^
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/1723705cb7aea5f6fcc7e6722d866ed3bd098115
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2022.02.x and 2022.05.x, thanks.
diff mbox series

Patch

diff --git a/package/falcosecurity-libs/Config.in b/package/falcosecurity-libs/Config.in
index 157bc8ef6d..f101883384 100644
--- a/package/falcosecurity-libs/Config.in
+++ b/package/falcosecurity-libs/Config.in
@@ -4,7 +4,7 @@  config BR2_PACKAGE_FALCOSECURITY_LIBS
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
 	depends on BR2_LINUX_KERNEL
 	depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # grpc
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # grpc, gtest
 	depends on BR2_TOOLCHAIN_HAS_THREADS # jq, protobuf, tbb
 	depends on !BR2_STATIC_LIBS # protobuf, tbb
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
diff --git a/package/gtest/Config.in b/package/gtest/Config.in
index 35fc9fea7b..4355e9c9c5 100644
--- a/package/gtest/Config.in
+++ b/package/gtest/Config.in
@@ -3,7 +3,7 @@  config BR2_PACKAGE_GTEST
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++11
 	depends on BR2_USE_MMU # fork()
 	help
 	  Google's framework for writing C++ tests on a variety of
@@ -26,7 +26,7 @@  if BR2_PACKAGE_GTEST
 
 config BR2_PACKAGE_GTEST_GMOCK
 	bool "gmock"
-	depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-gtest
+	depends on BR2_HOST_GCC_AT_LEAST_5 # host-gtest
 	help
 	  Inspired by jMock, EasyMock, and Hamcrest, and designed with
 	  C++'s specifics in mind, Google C++ Mocking Framework (or
@@ -48,13 +48,12 @@  config BR2_PACKAGE_GTEST_GMOCK
 	  libraries required to link/run them. The host package installs
 	  gmock_gen, a Python script used to generate code mocks.
 
-comment "gmock needs host gcc >= 4.9"
-	depends on !BR2_HOST_GCC_AT_LEAST_4_9
+comment "gmock needs host gcc >= 5"
+	depends on !BR2_HOST_GCC_AT_LEAST_5
 
 endif # BR2_PACKAGE_GTEST
 
-comment "gtest needs a toolchain w/ C++, wchar, threads, gcc >= 4.9"
+comment "gtest needs a toolchain w/ C++, wchar, threads, gcc >= 5"
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_INSTALL_LIBSTDCPP || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_5
diff --git a/package/libcamera/Config.in b/package/libcamera/Config.in
index 23a0040abf..fd7b3c92c4 100644
--- a/package/libcamera/Config.in
+++ b/package/libcamera/Config.in
@@ -77,18 +77,17 @@  config BR2_PACKAGE_LIBCAMERA_COMPLIANCE
 	depends on BR2_USE_WCHAR # gtest
 	depends on BR2_TOOLCHAIN_HAS_THREADS # gtest
 	depends on BR2_INSTALL_LIBSTDCPP # gtest
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # gtest
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # gtest
 	depends on BR2_USE_MMU # gtest
 	select BR2_PACKAGE_GTEST
 	select BR2_PACKAGE_LIBEVENT
 	help
 	  lc-compliance test application
 
-comment "lc-compliance test application needs a toolchain w/ C++, wchar, threads, gcc >= 4.9"
+comment "lc-compliance test application needs a toolchain w/ C++, wchar, threads, gcc >= 5"
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_INSTALL_LIBSTDCPP || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_5
 
 endif # BR2_PACKAGE_LIBCAMERA