Build failure on qt5webkit
Hello Buildroot community,
I am facing a build issue with qt5webkit package on buildroot 2025.02.x. The build outputs the following error:
/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:1237:52: error: non-constant condition for static assertion
1237 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:1237:52: error: ‘constexpr std::true_type std::__is_complete_or_unbounded(__type_identity<_Tp>) [with _Tp = WTF::Vector<unsigned char>; unsigned int <anonymous> = 12; true_type = true_type]’ used before its definition /home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits: In instantiation of ‘struct std::is_move_assignable<WebCore::ContentSecurityPolicyHashAlgorithm>’:/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:183:35: required by substitution of ‘template<class ... _Bn> std::__detail::__first_t<std::integral_constant<bool, true>, typename std::enable_if<(bool)(_Bn::value), void>::type ...> std::__detail::__and_fn(int) [with _Bn = {std::is_move_assignable<WebCore::ContentSecurityPolicyHashAlgorithm>, std::is_move_assignable<WTF::Vector<unsigned char, 0, WTF::CrashOnOverflow, 16> >}]’
183 | __enable_if_t<bool(_Bn::value)>...>;
| ^~~~~/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:199:42: required from ‘struct std::__and_<std::is_move_assignable<WebCore::ContentSecurityPolicyHashAlgorithm>, std::is_move_assignable<WTF::Vector<unsigned char, 0, WTF::CrashOnOverflow, 16> > >’
199 | : decltype(__detail::__and_fn<_Bn...>(0))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/bits/stl_pair.h:932:38: required from ‘struct std::pair<WebCore::ContentSecurityPolicyHashAlgorithm, WTF::Vector<unsigned char> >’
932 | is_move_assignable<_T2>>::value,
| ^~~~~/home/alexis/src/buildroot/output/build/qt5webkit-5.212.0-alpha4/Source/WebCore/page/csp/ContentSecurityPolicy.cpp:235:56: required from here
235 | if ((policy.get()->*allowed)(std::make_pair(algorithm, digest)))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:1246:52: error: non-constant condition for static assertion
1246 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:1246:52: error: ‘constexpr std::true_type std::__is_complete_or_unbounded(__type_identity<_Tp>) [with _Tp = WebCore::ContentSecurityPolicyHashAlgorithm; unsigned int <anonymous> = 4; true_type = true_type]’ used before its definition /home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits: In instantiation of ‘struct std::is_move_assignable<WTF::Vector<unsigned char> >’:/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:183:35: required by substitution of ‘template<class ... _Bn> std::__detail::__first_t<std::integral_constant<bool, true>, typename std::enable_if<(bool)(_Bn::value), void>::type ...> std::__detail::__and_fn(int) [with _Bn = {std::is_move_assignable<WebCore::ContentSecurityPolicyHashAlgorithm>, std::is_move_assignable<WTF::Vector<unsigned char, 0, WTF::CrashOnOverflow, 16> >}]’
183 | __enable_if_t<bool(_Bn::value)>...>;
| ^~~~~/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:199:42: required from ‘struct std::__and_<std::is_move_assignable<WebCore::ContentSecurityPolicyHashAlgorithm>, std::is_move_assignable<WTF::Vector<unsigned char, 0, WTF::CrashOnOverflow, 16> > >’
199 | : decltype(__detail::__and_fn<_Bn...>(0))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/bits/stl_pair.h:932:38: required from ‘struct std::pair<WebCore::ContentSecurityPolicyHashAlgorithm, WTF::Vector<unsigned char> >’
932 | is_move_assignable<_T2>>::value,
| ^~~~~/home/alexis/src/buildroot/output/build/qt5webkit-5.212.0-alpha4/Source/WebCore/page/csp/ContentSecurityPolicy.cpp:235:56: required from here
235 | if ((policy.get()->*allowed)(std::make_pair(algorithm, digest)))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:1246:52: error: non-constant condition for static assertion
1246 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:1246:52: error: ‘constexpr std::true_type std::__is_complete_or_unbounded(__type_identity<_Tp>) [with _Tp = WTF::Vector<unsigned char>; unsigned int <anonymous> = 12; true_type = true_type]’ used before its definition
The issue can be replicated with the following minimal defconfig:
BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_NEON=y
BR2_ARM_ENABLE_VFP=y
BR2_ARM_FPU_NEON=y
BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5WEBKIT=y
I am not very fluent in C++, so I struggle to fix it. Based on the build logs, I guess it relates to some missing some header include (ContentSecurityPolicyHash.h, containing the definition for ContentSecurityPolicyHashAlgorithm definition ?), so I tried to sprinkle some includes in the modules consuming it, but without success so far. I also took a look at both webkit and qtwebkit upstream sources, hoping that the issue could have been observed and fixed, but I found nothing yet (and qtwebkit does not look alive, based on latest commits dates).
I am posting this issue here in case anyone has already encountered it and found a fix that could be properly integrated in buildroot, but otherwise I guess the next step will be to notify the upstream webkit community.
Thanks,
Alexis
Signature · 7 lines
Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · Alexis Lothoré via buildroot
I am facing a build issue with qt5webkit package on buildroot 2025.02.x. The build outputs the following error:
/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:1237:52: error: non-constant condition for static assertionI am not very fluent in C++, so I struggle to fix it. Based on the build
logs, I guess it relates to some missing some header include (ContentSecurityPolicyHash.h, I believe it has to do with the qt5webkit source not working with the
g++ version you got. Your g++ might be too new. type_traits has changed a bit over the past, so that *might* have something to do with it.
Quoted 1 line
and qtwebkit does not look alive, based on latest commits dates).
It was deprecated in Qt 5.5 back in 2015. Some people forked it and kept it alive until 2019 or so, and now there is another fork going on here:
https://github.com/movableink/webkit
The "official" recommendation is to use QtWebEngine or QtWebView, whatever is more appropriate. But I could not get either of them to build with buildroot, so YMMV.
An embedded version of webkit is WPE, which is also available in buildroot as WPEWEBKIT: https://webkit.org/wpe/
Best regards
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Philipp,
Quoted 11 lines · Philipp Ludwig
Quoted 8 lines · Alexis Lothoré via buildroot
I am facing a build issue with qt5webkit package on buildroot 2025.02.x. The build outputs the following error:
/home/alexis/src/buildroot/output/host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/include/c++/14.2.0/type_traits:1237:52: error: non-constant condition for static assertionI am not very fluent in C++, so I struggle to fix it. Based on the build
logs, I guess it relates to some missing some header include (ContentSecurityPolicyHash.h, I believe it has to do with the qt5webkit source not working with theg++ version you got. Your g++ might be too new.
type_traitshas changed a bit over the past, so that *might* have something to do with it.
Yes, that's very likely my new toolchain version that is triggering this issue. I had a build passing with a slightly older toolchain. The toolchain update has been driven by the need of fresher kernel headers for other packages, but a solution could be to use a custom toolchain with only the kernel headers update, not updating g++.
Quoted 4 lines
Quoted 1 line
and qtwebkit does not look alive, based on latest commits dates).
It was deprecated in Qt 5.5 back in 2015. Some people forked it and kept it alive until 2019 or so, and now there is another fork going on here:
Quoted 8 lines
https://github.com/movableink/webkit
The "official" recommendation is to use QtWebEngine or QtWebView, whatever is more appropriate. But I could not get either of them to build with buildroot, so YMMV.
An embedded version of webkit is WPE, which is also available in buildroot as WPEWEBKIT: https://webkit.org/wpe/
Thanks for the confirmation and the hints for new packages. I have given a quick try to the fork, but it does not look any better. Some branches mentioned in the README can not even be found in the repo. I guess I'll need to get rid of/replace those dependencies.
Thanks,
Alexis
Quoted 6 lines
Best regards
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 8 lines
Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Alexis,
Quoted 2 lines · On Tue, 15 Jul 2025 14:42:21 +0200 Alexis Lothoré via buildroot…
I am facing a build issue with qt5webkit package on buildroot 2025.02.x. The build outputs the following error:
FYI, I also faced this issue today, and I have a fix for it. I'll submit together with several other qt5webkit fixes (I have a successful qt5webkit build with gcc 15.x).
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot