boost: add BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
PATCH v2 1/3 boost: add BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
Rework boost-context dependencies and manage them through the hidden BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
--- package/boost/Config.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
package/boost/Config.in +10 -2
@@ -69,10 +69,18 @@ config BR2_PACKAGE_BOOST_CONTAINER # http://www.boost.org/doc/libs/1_59_0/libs/context/doc/html/context/architectures.html # for the list of supported architectures. Sparc pretends to be # supported, but it doesn't build. +config BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS + bool + default y if ((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM) + default y if BR2_i386 + default y if BR2_mips + default y if BR2_mipsel + default y if BR2_powerpc + default y if BR2_x86_64 + config BR2_PACKAGE_BOOST_CONTEXT bool "boost-context" - depends on ((BR2_arm || BR2_armeb) && BR2_ARM_CPU_HAS_ARM) || \ - BR2_i386 || BR2_mips || BR2_mipsel || BR2_powerpc || BR2_x86_64 + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 help C++11 context switching library.
Signature · 1 line
2.14.1
PATCH v2 2/3 boost: coroutine selects context
Replace the coroutine dependency on context by a select
--- package/boost/Config.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
package/boost/Config.in +7 -1
@@ -97,12 +97,18 @@ comment "boost-contract needs a toolchain w/ NPTL" config BR2_PACKAGE_BOOST_COROUTINE bool "boost-coroutine" - depends on BR2_PACKAGE_BOOST_CONTEXT + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context + select BR2_PACKAGE_BOOST_CONTEXT help deprecated coroutine library, the non-depricated coroutine2 library is a header-only library and does not need to be selected. +comment "boost-coroutine needs a toolchain not affected by GCC bug 64735" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 + config BR2_PACKAGE_BOOST_DATE_TIME bool "boost-date_time" help
Signature · 1 line
2.14.1
PATCH v2 3/3 boost: fiber selects context
In reply to Fabrice Fontainefiber needs exception_ptr because context is a dependency of fiber that needs exception_ptr so select it
Fixes:
- http://autobuild.buildroot.net/results/56509d315defb95d4ac6e278a9d40cd98f61baa7
---
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Add BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS in a first patch
- Replace coroutine dependency on context by a select in a second patch
- Make fiber selects context instead of depending on it
package/boost/Config.in | 9 +++++++++ 1 file changed, 9 insertions(+)
package/boost/Config.in +9 -0
@@ -124,18 +124,27 @@ config BR2_PACKAGE_BOOST_EXCEPTION config BR2_PACKAGE_BOOST_FIBER bool "boost-fiber" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mips support uses the "pause" instruction, only available # since mips32r2/mips64r2. depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180 + select BR2_PACKAGE_BOOST_CONTEXT help C++11 userland threads library. comment "boost-fiber needs a toolchain w/ NPTL" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL +comment "boost-fiber needs a toolchain not affected by GCC bug 64735" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 + comment "boost-fiber needs a toolchain not affected by GCC bug 85180" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85180 config BR2_PACKAGE_BOOST_FILESYSTEM
Signature · 1 line
2.14.1
PATCH v2 3/3 boost: fiber selects context
Hello,
Thanks for this new iteration!
Quoted 14 lines · Fabrice Fontaine
config
BR2_PACKAGE_BOOST_FIBERpackage/boost/Config.in +3
-0bool "boost-fiber" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mips support uses the "pause" instruction, only available # since mips32r2/mips64r2. depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180 + select BR2_PACKAGE_BOOST_CONTEXT help C++11 userland threads library. comment "boost-fiber needs a toolchain w/ NPTL"
package/boost/Config.in config BR2_PACKAGE_BOOST_EXCEPTION · line 148
Quoted 10 lines
package/boost/Config.in +6
-0+ depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL +comment "boost-fiber needs a toolchain not affected by GCC bug 64735" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 + comment "boost-fiber needs a toolchain not affected by GCC bug 85180" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85180
Perhaps a single comment for the gcc bugs is enough, i.e:
comment "boost-fiber needs a toolchain not affected by GCC bugs 64735, 85180"
if you agree, no need to respin just for this change, we can fix it when applying.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 3/3 boost: fiber selects context
Dear Thomas,
2018-06-26 9:31 GMT+02:00 Thomas Petazzoni <[email protected]>:
Quoted 33 lines
Hello,
Thanks for this new iteration!
Quoted 14 lines · Fabrice Fontaine
config
BR2_PACKAGE_BOOST_FIBER
bool "boost-fiber"package/boost/Config.in +3
-0+ depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mips support uses the "pause" instruction, only available # since mips32r2/mips64r2. depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85180 + select BR2_PACKAGE_BOOST_CONTEXT help C++11 userland threads library. comment "boost-fiber needs a toolchain w/ NPTL"package/boost/Config.in config BR2_PACKAGE_BOOST_EXCEPTION · line 148
Quoted 10 lines
package/boost/Config.in +6
-0+ depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL +comment "boost-fiber needs a toolchain not affected by GCC bug 64735" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 + comment "boost-fiber needs a toolchain not affected by GCC bug 85180" + depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85180Perhaps a single comment for the gcc bugs is enough, i.e:
Quoted 6 lines
comment "boost-fiber needs a toolchain not affected by GCC bugs 64735, 85180"
if you agree, no need to respin just for this change, we can fix it when applying.
I agree, you can update before applying, thanks.
Quoted 9 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering
https://bootlin.com
Best Regards,
Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180626/c3ecfe07/attachment.html>
Thomas Petazzoni
AppliedPATCH v2 1/3 boost: add BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
In reply to Fabrice FontaineHello,
Quoted 7 lines · Fabrice Fontaine
Rework boost-context dependencies and manage them through the hidden
BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTSSigned-off-by Fabrice Fontaine <[email protected]>--- package/boost/Config.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
I've applied the series, thanks! On PATCH 3/3, as discussed, I refactored the Config.in comment about gcc bugs to have a single one. I also updated the commit log to (I believe) clarify the explanation.
Regarding Boost, I noticed that the dependencies still don't see to be correct. For example, if I enable just boost fiber, the boost fiber library installed looks like this:
$ readelf -d output/target/usr/lib/libboost_fiber.so.1.67.0
Dynamic section at offset 0x44ed0 contains 34 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libboost_context.so.1.67.0] 0x00000001 (NEEDED) Shared library: [libboost_filesystem.so.1.67.0] 0x00000001 (NEEDED) Shared library: [libboost_system.so.1.67.0] 0x00000001 (NEEDED) Shared library: [librt.so.1] 0x00000001 (NEEDED) Shared library: [libstdc++.so.6] 0x00000001 (NEEDED) Shared library: [libm.so.6] 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x00000001 (NEEDED) Shared library: [libpthread.so.0] 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3] 0x0000000e (SONAME) Library soname: [libboost_fiber.so.1.67.0]
I.e, it uses boost context (which is fixed by your patch) but also boost filesystem and boost system, which is not currently accounted by our Config.in dependencies.
It seems like when we disable a library using --without-libraries, it might still get built if we enable a library that uses it. Not nice to catch mistakes in our Config.in selects/dependencies.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/3 boost: add BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
Quoted 35 lines · Thomas Petazzoni
Hello,
Quoted 7 lines · Fabrice Fontaine
Rework boost-context dependencies and manage them through the hidden
BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTSSigned-off-by Fabrice Fontaine <[email protected]>--- package/boost/Config.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)I've applied the series, thanks! On PATCH 3/3, as discussed, I refactored the Config.in comment about gcc bugs to have a single one. I also updated the commit log to (I believe) clarify the explanation.
Regarding Boost, I noticed that the dependencies still don't see to be correct. For example, if I enable just boost fiber, the boost fiber library installed looks like this:
$ readelf -d output/target/usr/lib/libboost_fiber.so.1.67.0Dynamic section at offset
0x44ed0contains 34 entries:
Tag Type Name/Value0x00000001 (NEEDED) Shared library: [libboost_context.so.1.67.0] 0x00000001 (NEEDED) Shared library: [libboost_filesystem.so.1.67.0] 0x00000001 (NEEDED) Shared library: [libboost_system.so.1.67.0] 0x00000001 (NEEDED) Shared library: [librt.so.1] 0x00000001 (NEEDED) Shared library: [libstdc++.so.6] 0x00000001 (NEEDED) Shared library: [libm.so.6] 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x00000001 (NEEDED) Shared library: [libpthread.so.0] 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3] 0x0000000e (SONAME) Library soname: [libboost_fiber.so.1.67.0]
Quoted 7 lines
I.e, it uses boost context (which is fixed by your patch) but also boost filesystem and boost system, which is not currently accounted by our Config.in dependencies.
It seems like when we disable a library using --without-libraries, it might still get built if we enable a library that uses it. Not nice to catch mistakes in our Config.in selects/dependencies.
Perhaps we should add a check post-install, something like:
$(foreach disabled,$(BOOST_WITHOUT_FLAGS),\ test ! -e $(TARGET_DIR)/usr/lib/libboost_$(disabled).so.$(BOOST_VERSION))
That way, the autobuilders should detect such problems.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF