* [Buildroot] [PATCH v2,1/2] boost: locale needs thread with icu
@ 2018-08-14 20:34 Fabrice Fontaine
2018-08-14 20:34 ` [Buildroot] [PATCH v2,2/2] boost: thread needs chrono Fabrice Fontaine
2018-08-15 22:12 ` [Buildroot] [PATCH v2,1/2] boost: locale needs thread with icu Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2018-08-14 20:34 UTC (permalink / raw)
To: buildroot
output/host/usr/bin/nios2-linux-readelf -d output/staging/usr/lib/libboost_locale.so
Dynamic section at offset 0x125ec0 contains 36 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libboost_chrono.so.1.67.0]
0x00000001 (NEEDED) Shared library: [libboost_thread.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: [libicudata.so.60]
0x00000001 (NEEDED) Shared library: [libicui18n.so.60]
0x00000001 (NEEDED) Shared library: [libicuuc.so.60]
Fixes:
- http://autobuild.buildroot.net/results/57838f7cd84f37b66ab7007deaea847af8f54b72
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Split patch in two and move select of chrono from locale to thread
package/boost/Config.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/boost/Config.in b/package/boost/Config.in
index 42428fab10..69fd6158ca 100644
--- a/package/boost/Config.in
+++ b/package/boost/Config.in
@@ -190,6 +190,7 @@ config BR2_PACKAGE_BOOST_LOCALE
# details.
depends on !(BR2_STATIC_LIBS && BR2_PACKAGE_ICU)
select BR2_PACKAGE_BOOST_SYSTEM
+ select BR2_PACKAGE_BOOST_THREAD if BR2_PACKAGE_ICU
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
help
Provide localization and Unicode handling tools for C++.
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2,2/2] boost: thread needs chrono
2018-08-14 20:34 [Buildroot] [PATCH v2,1/2] boost: locale needs thread with icu Fabrice Fontaine
@ 2018-08-14 20:34 ` Fabrice Fontaine
2018-08-15 22:12 ` [Buildroot] [PATCH v2,1/2] boost: locale needs thread with icu Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2018-08-14 20:34 UTC (permalink / raw)
To: buildroot
chrono is selected by thread (see libs/thread/build/Jamfile.v2):
rule usage-requirements ( properties * )
{
[...]
result += <library>/boost/chrono//boost_chrono ;
}
So add this select for BR2_PACKAGE_BOOST_THREAD and remove it from
BR2_PACKAGE_BOOST_COROUTINE, BR2_PACKAGE_BOOST_LOG,
BR2_PACKAGE_TYPE_ERASURE and BR2_PACKAGE_BOOST_WAVE
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Split patch in two and move select of chrono from locale to thread
package/boost/Config.in | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/package/boost/Config.in b/package/boost/Config.in
index 69fd6158ca..b3f5f6aea6 100644
--- a/package/boost/Config.in
+++ b/package/boost/Config.in
@@ -101,7 +101,6 @@ config BR2_PACKAGE_BOOST_COROUTINE
bool "boost-coroutine"
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
- select BR2_PACKAGE_BOOST_CHRONO
select BR2_PACKAGE_BOOST_CONTEXT
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_THREAD
@@ -206,7 +205,6 @@ config BR2_PACKAGE_BOOST_LOG
# log module
depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC)
select BR2_PACKAGE_BOOST_ATOMIC
- select BR2_PACKAGE_BOOST_CHRONO
select BR2_PACKAGE_BOOST_DATE_TIME
select BR2_PACKAGE_BOOST_FILESYSTEM
select BR2_PACKAGE_BOOST_REGEX
@@ -315,6 +313,7 @@ config BR2_PACKAGE_BOOST_TEST
config BR2_PACKAGE_BOOST_THREAD
bool "boost-thread"
select BR2_PACKAGE_BOOST_ATOMIC if BR2_TOOLCHAIN_HAS_GCC_BUG_64735
+ select BR2_PACKAGE_BOOST_CHRONO
select BR2_PACKAGE_BOOST_SYSTEM
help
Portable C++ multi-threading. C++11, C++14.
@@ -328,7 +327,6 @@ config BR2_PACKAGE_BOOST_TIMER
config BR2_PACKAGE_BOOST_TYPE_ERASURE
bool "boost-type_erasure"
- select BR2_PACKAGE_BOOST_CHRONO
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_THREAD
help
@@ -339,7 +337,6 @@ config BR2_PACKAGE_BOOST_WAVE
# limitation of assembler for coldfire
# error: Tried to convert PC relative branch to absolute jump
depends on !BR2_m68k_cf
- select BR2_PACKAGE_BOOST_CHRONO
select BR2_PACKAGE_BOOST_DATE_TIME
select BR2_PACKAGE_BOOST_FILESYSTEM
select BR2_PACKAGE_BOOST_SYSTEM
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2,1/2] boost: locale needs thread with icu
2018-08-14 20:34 [Buildroot] [PATCH v2,1/2] boost: locale needs thread with icu Fabrice Fontaine
2018-08-14 20:34 ` [Buildroot] [PATCH v2,2/2] boost: thread needs chrono Fabrice Fontaine
@ 2018-08-15 22:12 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-08-15 22:12 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 14 Aug 2018 22:34:19 +0200, Fabrice Fontaine wrote:
> output/host/usr/bin/nios2-linux-readelf -d output/staging/usr/lib/libboost_locale.so
>
> Dynamic section at offset 0x125ec0 contains 36 entries:
> Tag Type Name/Value
> 0x00000001 (NEEDED) Shared library: [libboost_chrono.so.1.67.0]
> 0x00000001 (NEEDED) Shared library: [libboost_thread.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: [libicudata.so.60]
> 0x00000001 (NEEDED) Shared library: [libicui18n.so.60]
> 0x00000001 (NEEDED) Shared library: [libicuuc.so.60]
>
> Fixes:
> - http://autobuild.buildroot.net/results/57838f7cd84f37b66ab7007deaea847af8f54b72
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
I have applied both patches to master, but I think we still do have a
bunch of issues to resolve.
Issue 1
=======
First of all, ICU support is not always detected by Boost. For example,
the following glibc-based defconfig builds boost_locale with ICU
support:
BR2_arm=y
BR2_cortex_a8=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_BOOST=y
BR2_PACKAGE_BOOST_LOCALE=y
BR2_PACKAGE_ICU=y
# BR2_TARGET_ROOTFS_TAR is not set
We have:
- icu : yes
And libboost_locale.so is indeed linked with libicu.
However, the following uclibc-based defconfig builds boost_locale
without ICU, even though ICU is enabled and built before boost:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2018.05.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_BOOST=y
BR2_PACKAGE_BOOST_LOCALE=y
BR2_PACKAGE_ICU=y
# BR2_TARGET_ROOTFS_TAR is not set
We have:
- icu : no
- icu (lib64) : no
If I understand correctly, it tries to detect if ICU is available by
building the program libs/locale/build/has_icu_test.cpp. With the glibc
toolchain:
$ ./host/bin/arm-linux-gnueabihf-g++ -o foo build/boost-1.67.0/libs/locale/build/has_icu_test.cpp -licui18n -licuuc -licudata
$
I.e, it builds fine. With the uClibc toolchain:
$ ./host/bin/arm-linux-g++ -o foo build/boost-1.67.0/libs/locale/build/has_icu_test.cpp -licui18n -licuuc -licudata
... lots and lots of errors about char16_t ...
Issue 2
=======
This is a rather minor issue, but if ICU is available, Boost doesn't
need iconv support to build boost_locale. So probably, we need to change:
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
into:
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE && !BR2_PACKAGE_ICU
(and boost.mk to be adjusted accordingly)
Issue 3
=======
In your PATCH 2/2, you remove a lot of select on the chrono module.
Indeed, for example, boost_locale is linked against boost_chrono, but
the Jamfile of boost_locale doesn't describe this dependency, and it's
just because boost_locale -> boost_thread -> boost_chrono that
boost_locale gets linked against boost_chrono.
So I grepped the Boost source code to see which Boost modules directly
use chrono:
find . -name 'Jamfile*' | xargs grep "library.*chrono"
So indeed the log, type erasure, and wave modules don't use chrono
directly. However, the coroutine module does use chrono directly:
./libs/coroutine/performance/asymmetric/segmented/Jamfile.v2: <library>/boost/chrono//boost_chrono
./libs/coroutine/performance/asymmetric/Jamfile.v2: <library>/boost/chrono//boost_chrono
./libs/coroutine/performance/symmetric/segmented/Jamfile.v2: <library>/boost/chrono//boost_chrono
./libs/coroutine/performance/symmetric/Jamfile.v2: <library>/boost/chrono//boost_chrono
So perhaps BR2_PACKAGE_BOOST_COROUTINE should continue to select
BR2_PACKAGE_BOOST_CHRONO ?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-15 22:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-14 20:34 [Buildroot] [PATCH v2,1/2] boost: locale needs thread with icu Fabrice Fontaine
2018-08-14 20:34 ` [Buildroot] [PATCH v2,2/2] boost: thread needs chrono Fabrice Fontaine
2018-08-15 22:12 ` [Buildroot] [PATCH v2,1/2] boost: locale needs thread with icu Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.