Skip to contentSkip to conversation

boost: add support for additional boost libs

PATCH In review [email protected] 3 participants 10 messages Sep 26, 2016 – Sep 28, 2016

lore
Share & tools
lore
#0 lore raw

v2 cover boost: add support for additional boost libs

From: Jackie Huang <[email protected]>

Changes in v2:

1. Add a workaround as a separate commit for the issue found in:
http://autobuilder.yocto.io:8010/builders/nightly-x86-64-lsb/builds/56/

2. Add PACKAGECONFIG for graph_parallel and mpi but disable by default since they depend on mpich which is in meta-oe.

3. Add proper configs in user-config.jam for boost-mpi.

Tested with:
- default PACKAGECONFIG
- all libs in PACKAGECONFIG (need to add meta-oe)

Notes:
boost-exception will not be created since it's intentional.

----
The following changes since commit 8dfcfbeb14a179a5d5722007d7c986da1dd41b40:

arch-mips: Add mips64-o32 tunes (2016-09-24 07:30:10 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib.git jhuang0/r_add_boost_libs_160926-1
http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/r_add_boost_libs_160926-1

Jackie Huang (2):
boost: disable pch when build boost-math
boost: add support for additional boost libs

 meta/recipes-support/boost/boost.inc               | 33 ++++++++++++++++++++--
 .../boost/boost-math-disable-pch-for-gcc.patch     | 31 ++++++++++++++++++++
 meta/recipes-support/boost/boost_1.61.0.bb         |  1 +
 3 files changed, 62 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch
Signature · 1 line
2.8.3
#1 lore raw

PATCH v2 1/2 boost: disable pch when build boost-math

From: Jackie Huang <[email protected]>

It's a work around for a defect when build in parallel:
https://svn.boost.org/trac/boost/ticket/12477

---
 .../boost/boost-math-disable-pch-for-gcc.patch     | 31 ++++++++++++++++++++++
 meta/recipes-support/boost/boost_1.61.0.bb         |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch
meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch new file +31 -0
new file mode 100644
index 0000000..595ba17
@@ -0,0 +1,31 @@
+From cabfcba1ff7511ffd6b91ca244288d44f585aad2 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <[email protected]>
+Date: Fri, 23 Sep 2016 01:04:50 -0700
+Subject: [PATCH] boost-math: disable pch for gcc
+
+Upstream-Status: Inappropriate [*]
+
+* It's a work around for a defect when build in parallel:
+https://svn.boost.org/trac/boost/ticket/12477
+
+Signed-off-by: Jackie Huang <[email protected]>
+---
+ libs/math/build/Jamfile.v2 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/math/build/Jamfile.v2 b/libs/math/build/Jamfile.v2
+index e19fb2e..82472a7 100644
+--- a/libs/math/build/Jamfile.v2
++++ b/libs/math/build/Jamfile.v2
+@@ -13,7 +13,7 @@ project
+       #<toolset>intel-linux:<pch>off
+       <toolset>intel-darwin:<pch>off
+       <toolset>msvc-7.1:<pch>off
+-      <toolset>gcc,<target-os>windows:<pch>off
++      <toolset>gcc:<pch>off
+       #<toolset>gcc:<cxxflags>-fvisibility=hidden
+       <toolset>intel-linux:<cxxflags>-fvisibility=hidden
+       #<toolset>sun:<cxxflags>-xldscope=hidden
+-- 
+2.7.4
+
meta/recipes-support/boost/boost_1.61.0.bb +1 -0
index 33f209c..40e3870 100644
@@ -9,4 +9,5 @@ SRC_URI += "\
     file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \
     file://0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch \
     file://0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch \
+    file://boost-math-disable-pch-for-gcc.patch \
 "
Signature · 1 line
2.8.3
#2 lore raw

PATCH v2 2/2 boost: add support for additional boost libs

In reply to [email protected]

From: Jackie Huang <[email protected]>

* Added libs:
- container
- context
- coroutine
- exception
- graph_parallel
- locale
- math
- mpi
- wave

* Add PACKAGECONFIG to add proper dependencies for:
graph_parallel, locale, and mpi.

* boost-mpi depends on mpich which is in meta-oe, and boost-graph_parallel depends on boost-mpi, so they are disabled by default, but can be enabled in a distro that needs them.

* context and coroutine are added only for x86 and powerpc.

---
 meta/recipes-support/boost/boost.inc | 33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)
meta/recipes-support/boost/boost.inc +30 -3
index 5696b6a..7637a4e 100644
@@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
 BOOST_LIBS = "\
 	atomic \
 	chrono \
+	container \
 	date_time \
+	exception \
 	filesystem \
 	graph \
 	iostreams \
 	log \
+	math \
 	program_options \
 	random \
 	regex \
@@ -22,12 +25,28 @@ BOOST_LIBS = "\
 	timer \
 	test \
 	thread \
+	wave \
 	"
 
-# optional boost-python library
-PACKAGECONFIG ??= ""
+# only supported by x86 and powerpc
+BOOST_LIBS_append_x86 = " context coroutine"
+BOOST_LIBS_append_x86-64 = " context coroutine"
+BOOST_LIBS_append_powerpc = " context coroutine"
+
+# optional libraries
+PACKAGECONFIG ??= "locale"
+PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
+PACKAGECONFIG[mpi] = ",,mpich"
 PACKAGECONFIG[python] = ",,python python3"
-BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)}"
+
+BOOST_LIBS += "\
+    ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
+                         bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi', '', d), d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)} \
+"
+
 inherit python-dir
 PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
 
@@ -54,6 +73,10 @@ python __anonymous () {
 }
 
 # Override the contents of specific packages
+FILES_${PN}-graph = "${libdir}/libboost_graph.so.*"
+FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*"
+FILES_${PN}-locale = "${libdir}/libboost_locale.so.*"
+FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"
 FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \
 	${libdir}/libboost_wserialization*.so.*"
 FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \
@@ -159,6 +182,10 @@ do_configure() {
 	echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${WORKDIR}/user-config.jam
 	echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${WORKDIR}/user-config.jam
 
+	if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false', d)}; then
+		echo "using mpi : : <find-shared-library>mpi ;" >> ${WORKDIR}/user-config.jam
+	fi
+
 	CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
 	sed -i '/^using python/d' ${S}/project-config.jam
 }
Signature · 1 line
2.8.3
#3 lore raw
Quoted 75 lines · On Mo, 2016-09-26 at 15:56 +0800, [email protected] wrote:

From: Jackie Huang <[email protected]>

* Added libs:
  - container
  - context
  - coroutine
  - exception
  - graph_parallel
  - locale
  - math
  - mpi
  - wave

* Add PACKAGECONFIG to add proper dependencies for:
  graph_parallel, locale, and mpi.

* boost-mpi depends on mpich which is in meta-oe, and boost-graph_parallel depends on boost-mpi, so they are disabled by default, but can be enabled in a distro that needs them.

* context and coroutine are added only for x86 and powerpc.

---
 meta/recipes-support/boost/boost.inc | 33 ++++++++++++++++++++++++++++++- --

 1 file changed, 30 insertions(+), 3 deletions(-)
meta/recipes- renamed from meta/recipes-support/boost/boost.inc +0 -0

support/boost/boost.inc
index 5696b6a..7637a4e 100644

meta/recipes-support/boost/boost.inc +4 -0
@@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
  BOOST_LIBS = "\
  	atomic \
  	chrono \
+	container \
  	date_time \
+	exception \
  	filesystem \
  	graph \
  	iostreams \
  	log \
+	math \
  	program_options \
  	random \
  	regex \
@@ -22,12 +25,28 @@ BOOST_LIBS = "\
  	timer \
  	test \
  	thread \
+	wave \

  "

meta/recipes-support/boost/boost.inc +10 -2
-# optional boost-python library
-PACKAGECONFIG ??= ""
+# only supported by x86 and powerpc
+BOOST_LIBS_append_x86 = " context coroutine"
+BOOST_LIBS_append_x86-64 = " context coroutine"
+BOOST_LIBS_append_powerpc = " context coroutine"
+
+# optional libraries
+PACKAGECONFIG ??= "locale"
+PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
+PACKAGECONFIG[mpi] = ",,mpich"

 PACKAGECONFIG[python] = ",,python python3"
-BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)}"

meta/recipes-support/boost/boost.inc +4 -0
+
+BOOST_LIBS += "\
+    ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel',
Quoted 6 lines

'graph_parallel mpi', \
+                         bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi', '', d), d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)} \
+"

Rather than having two ways to define what packages to build, PACKAGECONFIG and BOOST_LIBS, where each of them only supports a different subset of boost's libraries, can we just have one, PACKAGECONFIG, and have it support all of the potential libraries?

Cheers,
Andre'

Quoted 35 lines

+
 inherit python-dir
 PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"

meta/recipes-support/boost/boost.inc +0 -0
@@ -54,6 +73,10 @@ python __anonymous () {
  }


 # Override the contents of specific packages

meta/recipes-support/boost/boost.inc +4 -0
+FILES_${PN}-graph = "${libdir}/libboost_graph.so.*"
+FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*"
+FILES_${PN}-locale = "${libdir}/libboost_locale.so.*"
+FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"

 FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \
  ${libdir}/libboost_wserialization*.so.*" FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \

meta/recipes-support/boost/boost.inc +0 -0
@@ -159,6 +182,10 @@ do_configure() {

  echo "using python : ${PYTHON_BASEVERSION} : :
${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${WORKDIR}/user- config.jam
  echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${WORKDIR}/user-config.jam

meta/recipes-support/boost/boost.inc +1 -0
+	if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false',

d)}; then

meta/recipes-support/boost/boost.inc +1 -0
+		echo "using mpi : : <find-shared-library>mpi ;" >>

${WORKDIR}/user-config.jam

meta/recipes-support/boost/boost.inc +2 -0
+	fi
+

  CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with- bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT} sed -i '/^using python/d' ${S}/project-config.jam
 }
--
2.8.3

#4 lore raw
Quoted 85 lines

-----Original Message-----
From: André Draszik [mailto:[email protected]]
Sent: Monday, September 26, 2016 4:54 PM
To: Huang, Jie (Jackie); [email protected]
Subject: Re: [OE-core] [PATCH 2/2 v2] boost: add support for additional boost libs

Quoted 76 lines · On Mo, 2016-09-26 at 15:56 +0800, [email protected] wrote:

From: Jackie Huang <[email protected]>

* Added libs:
  - container
  - context
  - coroutine
  - exception
  - graph_parallel
  - locale
  - math
  - mpi
  - wave

* Add PACKAGECONFIG to add proper dependencies for:
  graph_parallel, locale, and mpi.

* boost-mpi depends on mpich which is in meta-oe, and boost-graph_parallel depends on boost-mpi, so they are disabled by default, but can be enabled in a distro that needs them.

* context and coroutine are added only for x86 and powerpc.

---
 meta/recipes-support/boost/boost.inc | 33 ++++++++++++++++++++++++++++++- --

 1 file changed, 30 insertions(+), 3 deletions(-)
meta/recipes- renamed from meta/recipes-support/boost/boost.inc +0 -0

support/boost/boost.inc
index 5696b6a..7637a4e 100644

meta/recipes-support/boost/boost.inc +4 -0
@@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
  BOOST_LIBS = "\
  	atomic \
  	chrono \
+	container \
  	date_time \
+	exception \
  	filesystem \
  	graph \
  	iostreams \
  	log \
+	math \
  	program_options \
  	random \
  	regex \
@@ -22,12 +25,28 @@ BOOST_LIBS = "\
  	timer \
  	test \
  	thread \
+	wave \

  "

meta/recipes-support/boost/boost.inc +10 -2
-# optional boost-python library
-PACKAGECONFIG ??= ""
+# only supported by x86 and powerpc
+BOOST_LIBS_append_x86 = " context coroutine"
+BOOST_LIBS_append_x86-64 = " context coroutine"
+BOOST_LIBS_append_powerpc = " context coroutine"
+
+# optional libraries
+PACKAGECONFIG ??= "locale"
+PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
+PACKAGECONFIG[mpi] = ",,mpich"

 PACKAGECONFIG[python] = ",,python python3"
-BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)}"

meta/recipes-support/boost/boost.inc +4 -0
+
+BOOST_LIBS += "\
+    ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel',

'graph_parallel mpi', \

Quoted 8 lines
Quoted 5 lines

+                         bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi', '', d), d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)} \
+"

Rather than having two ways to define what packages to build, PACKAGECONFIG and BOOST_LIBS, where each of them only supports a different subset of

I'm not a fan of this way, I just keep using the way it was.

Quoted 2 lines

boost's libraries, can we just have one, PACKAGECONFIG, and have it support all of the potential libraries?

Yes, I think it's possible, but it will most likely end up with many empty PACKAGECONFIG definitions like:
PACKAGECONFIG[atomic] = ",,,"
PACKAGECONFIG[chrono] = ",,,"
PACKAGECONFIG[container] = ",,,"
PACKAGECONFIG[date_time] = ",,,"
PACKAGECONFIG[exception] = ",,,"

If you think it's a better way and no other objection, I think I will do that in a separate commit as follow-up.

Thanks,
Jackie

Quoted 41 lines

Cheers,
Andre'

Quoted 35 lines

+
 inherit python-dir
 PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"

meta/recipes-support/boost/boost.inc +4 -0
@@ -54,6 +73,10 @@ python __anonymous () {
  }
 
  # Override the contents of specific packages
+FILES_${PN}-graph = "${libdir}/libboost_graph.so.*"
+FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*"
+FILES_${PN}-locale = "${libdir}/libboost_locale.so.*"
+FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"
  FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \

  ${libdir}/libboost_wserialization*.so.*" FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \

meta/recipes-support/boost/boost.inc +0 -0
@@ -159,6 +182,10 @@ do_configure() {

  echo "using python : ${PYTHON_BASEVERSION} : :
${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${WORKDIR}/user- config.jam
  echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${WORKDIR}/user-config.jam

meta/recipes-support/boost/boost.inc +1 -0
+	if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false',

d)}; then

meta/recipes-support/boost/boost.inc +1 -0
+		echo "using mpi : : <find-shared-library>mpi ;" >>

${WORKDIR}/user-config.jam

meta/recipes-support/boost/boost.inc +2 -0
+	fi
+

  CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with- bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT} sed -i '/^using python/d' ${S}/project-config.jam
 }
--
2.8.3

#5 lore raw
Quoted 117 lines · Jie (Jackie)
Quoted 93 lines

-----Original Message-----
From: André Draszik [mailto:[email protected]]
Sent: Monday, September 26, 2016 4:54 PM
To: Huang, Jie (Jackie); [email protected]
Subject: Re: [OE-core] [PATCH 2/2 v2] boost: add support for additional boost libs

Quoted 83 lines · On Mo, 2016-09-26 at 15:56 +0800, [email protected] wrote:

From: Jackie Huang <[email protected]>

* Added libs:
  - container
  - context
  - coroutine
  - exception
  - graph_parallel
  - locale
  - math
  - mpi
  - wave

* Add PACKAGECONFIG to add proper dependencies for:
  graph_parallel, locale, and mpi.

* boost-mpi depends on mpich which is in meta-oe, and boost-graph_parallel depends on boost-mpi, so they are disabled by default, but can be enabled in a distro that needs them.

* context and coroutine are added only for x86 and powerpc.

---
 meta/recipes-support/boost/boost.inc | 33
++++++++++++++++++++++++++++++-
--

 1 file changed, 30 insertions(+), 3 deletions(-)
meta/recipes- renamed from meta/recipes-support/boost/boost.inc +0 -0

support/boost/boost.inc
index 5696b6a..7637a4e 100644

meta/recipes-support/boost/boost.inc +4 -0
@@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
  BOOST_LIBS = "\
  	atomic \
  	chrono \
+	container \
  	date_time \
+	exception \
  	filesystem \
  	graph \
  	iostreams \
  	log \
+	math \
  	program_options \
  	random \
  	regex \
@@ -22,12 +25,28 @@ BOOST_LIBS = "\
  	timer \
  	test \
  	thread \
+	wave \

  "

meta/recipes-support/boost/boost.inc +10 -2
-# optional boost-python library
-PACKAGECONFIG ??= ""
+# only supported by x86 and powerpc
+BOOST_LIBS_append_x86 = " context coroutine"
+BOOST_LIBS_append_x86-64 = " context coroutine"
+BOOST_LIBS_append_powerpc = " context coroutine"
+
+# optional libraries
+PACKAGECONFIG ??= "locale"
+PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
+PACKAGECONFIG[mpi] = ",,mpich"

 PACKAGECONFIG[python] = ",,python python3" -BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python
python3', '', d)}"

meta/recipes-support/boost/boost.inc +3 -0
+
+BOOST_LIBS += "\
+    ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)}

\
+    ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
+                         bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi',
'', d), d)} \

Quoted 8 lines
Quoted 4 lines

+    ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '',
d)} \
+"

Rather than having two ways to define what packages to build, PACKAGECONFIG
and BOOST_LIBS, where each of them only supports a different subset of

I'm not a fan of this way, I just keep using the way it was.

Quoted 4 lines

boost's libraries, can we just have one, PACKAGECONFIG, and have it support
all of the potential libraries?

Yes, I think it's possible, but it will most likely end up with many empty PACKAGECONFIG definitions like:
PACKAGECONFIG[atomic] = ",,,"
PACKAGECONFIG[chrono] = ",,,"
PACKAGECONFIG[container] = ",,,"
PACKAGECONFIG[date_time] = ",,,"
PACKAGECONFIG[exception] = ",,,"

Quoted 3 lines

If you think it's a better way and no other objection, I think I will do that in a
separate commit as follow-up.

I don't think you'd need empty PACKAGECONFIG[flag] definitions, see base.bbclass.

Cheers,
Andre'

#6 lore raw
Quoted 126 lines

-----Original Message-----
From: André Draszik [mailto:[email protected]]
Sent: Tuesday, September 27, 2016 4:09 PM
To: Huang, Jie (Jackie); [email protected]
Subject: Re: [OE-core] [PATCH 2/2 v2] boost: add support for additional boost libs

Quoted 117 lines · Jie (Jackie)
Quoted 93 lines

-----Original Message-----
From: André Draszik [mailto:[email protected]]
Sent: Monday, September 26, 2016 4:54 PM
To: Huang, Jie (Jackie); [email protected]
Subject: Re: [OE-core] [PATCH 2/2 v2] boost: add support for additional boost libs

Quoted 83 lines · On Mo, 2016-09-26 at 15:56 +0800, [email protected] wrote:

From: Jackie Huang <[email protected]>

* Added libs:
  - container
  - context
  - coroutine
  - exception
  - graph_parallel
  - locale
  - math
  - mpi
  - wave

* Add PACKAGECONFIG to add proper dependencies for:
  graph_parallel, locale, and mpi.

* boost-mpi depends on mpich which is in meta-oe, and boost-graph_parallel depends on boost-mpi, so they are disabled by default, but can be enabled in a distro that needs them.

* context and coroutine are added only for x86 and powerpc.

---
 meta/recipes-support/boost/boost.inc | 33
++++++++++++++++++++++++++++++-
--

 1 file changed, 30 insertions(+), 3 deletions(-)
meta/recipes- renamed from meta/recipes-support/boost/boost.inc +0 -0

support/boost/boost.inc
index 5696b6a..7637a4e 100644

meta/recipes-support/boost/boost.inc +4 -0
@@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
  BOOST_LIBS = "\
  	atomic \
  	chrono \
+	container \
  	date_time \
+	exception \
  	filesystem \
  	graph \
  	iostreams \
  	log \
+	math \
  	program_options \
  	random \
  	regex \
@@ -22,12 +25,28 @@ BOOST_LIBS = "\
  	timer \
  	test \
  	thread \
+	wave \

  "

meta/recipes-support/boost/boost.inc +10 -2
-# optional boost-python library
-PACKAGECONFIG ??= ""
+# only supported by x86 and powerpc
+BOOST_LIBS_append_x86 = " context coroutine"
+BOOST_LIBS_append_x86-64 = " context coroutine"
+BOOST_LIBS_append_powerpc = " context coroutine"
+
+# optional libraries
+PACKAGECONFIG ??= "locale"
+PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
+PACKAGECONFIG[mpi] = ",,mpich"

 PACKAGECONFIG[python] = ",,python python3" -BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python
python3', '', d)}"

meta/recipes-support/boost/boost.inc +3 -0
+
+BOOST_LIBS += "\
+    ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)}

\
+    ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
+                         bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi',
'', d), d)} \

Quoted 8 lines
Quoted 4 lines

+    ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '',
d)} \
+"

Rather than having two ways to define what packages to build, PACKAGECONFIG
and BOOST_LIBS, where each of them only supports a different subset of

I'm not a fan of this way, I just keep using the way it was.

Quoted 4 lines

boost's libraries, can we just have one, PACKAGECONFIG, and have it support
all of the potential libraries?

Yes, I think it's possible, but it will most likely end up with many empty PACKAGECONFIG definitions like:
PACKAGECONFIG[atomic] = ",,,"
PACKAGECONFIG[chrono] = ",,,"
PACKAGECONFIG[container] = ",,,"
PACKAGECONFIG[date_time] = ",,,"
PACKAGECONFIG[exception] = ",,,"

Quoted 6 lines
Quoted 3 lines

If you think it's a better way and no other objection, I think I will do that in a
separate commit as follow-up.

I don't think you'd need empty PACKAGECONFIG[flag] definitions, see base.bbclass.

Could you be more specific?

I think it's needed because I got QA issues without the definitions:

WARNING: boost-1.61.0-r0 do_configure: QA Issue: boost: invalid PACKAGECONFIG: atomic [invalid-packageconfig]

Thanks,
Jackie

Quoted 3 lines

Cheers,
Andre'

#7 lore raw
Quoted 145 lines · Jie (Jackie)
Quoted 137 lines

-----Original Message-----
From: André Draszik [mailto:[email protected]]
Sent: Tuesday, September 27, 2016 4:09 PM
To: Huang, Jie (Jackie); [email protected]
Subject: Re: [OE-core] [PATCH 2/2 v2] boost: add support for additional boost libs

Quoted 127 lines · Jie (Jackie)
Quoted 101 lines

-----Original Message-----
From: André Draszik [mailto:[email protected]]
Sent: Monday, September 26, 2016 4:54 PM
To: Huang, Jie (Jackie); [email protected]
Subject: Re: [OE-core] [PATCH 2/2 v2] boost: add support for additional
boost libs

Quoted 88 lines · On Mo, 2016-09-26 at 15:56 +0800, [email protected] wrote:

From: Jackie Huang <[email protected]>

* Added libs:
  - container
  - context
  - coroutine
  - exception
  - graph_parallel
  - locale
  - math
  - mpi
  - wave

* Add PACKAGECONFIG to add proper dependencies for:
  graph_parallel, locale, and mpi.

* boost-mpi depends on mpich which is in meta-oe, and boost-graph_parallel depends on boost-mpi, so they are disabled by default, but can be enabled in a distro that needs them.

* context and coroutine are added only for x86 and powerpc.

---
 meta/recipes-support/boost/boost.inc | 33
++++++++++++++++++++++++++++++-
--

 1 file changed, 30 insertions(+), 3 deletions(-)
meta/recipes- renamed from meta/recipes-support/boost/boost.inc +0 -0

support/boost/boost.inc
index 5696b6a..7637a4e 100644

meta/recipes-support/boost/boost.inc +4 -0
@@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
  BOOST_LIBS = "\
  	atomic \
  	chrono \
+	container \
  	date_time \
+	exception \
  	filesystem \
  	graph \
  	iostreams \
  	log \
+	math \
  	program_options \
  	random \
  	regex \
@@ -22,12 +25,28 @@ BOOST_LIBS = "\
  	timer \
  	test \
  	thread \
+	wave \

  "

meta/recipes-support/boost/boost.inc +10 -2
-# optional boost-python library
-PACKAGECONFIG ??= ""
+# only supported by x86 and powerpc
+BOOST_LIBS_append_x86 = " context coroutine"
+BOOST_LIBS_append_x86-64 = " context coroutine"
+BOOST_LIBS_append_powerpc = " context coroutine"
+
+# optional libraries
+PACKAGECONFIG ??= "locale"
+PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
+PACKAGECONFIG[mpi] = ",,mpich"

 PACKAGECONFIG[python] = ",,python python3" -BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python
python3', '', d)}"

meta/recipes-support/boost/boost.inc +3 -0
+
+BOOST_LIBS += "\
+    ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '',

d)}
\
+    ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
+                         bb.utils.contains('PACKAGECONFIG', 'mpi',
'mpi',
'', d), d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3',

Quoted 8 lines
Quoted 3 lines

'',
d)} \
+"

Rather than having two ways to define what packages to build, PACKAGECONFIG
and BOOST_LIBS, where each of them only supports a different subset of

I'm not a fan of this way, I just keep using the way it was.

Quoted 5 lines

boost's libraries, can we just have one, PACKAGECONFIG, and have it support
all of the potential libraries?

Yes, I think it's possible, but it will most likely end up with many empty
PACKAGECONFIG definitions like:
PACKAGECONFIG[atomic] = ",,,"
PACKAGECONFIG[chrono] = ",,,"
PACKAGECONFIG[container] = ",,,"
PACKAGECONFIG[date_time] = ",,,"
PACKAGECONFIG[exception] = ",,,"

Quoted 7 lines
Quoted 4 lines

If you think it's a better way and no other objection, I think I will do
that in a
separate commit as follow-up.

I don't think you'd need empty PACKAGECONFIG[flag] definitions, see base.bbclass.

Quoted 6 lines

Could you be more specific?

I think it's needed because I got QA issues without the definitions:

WARNING: boost-1.61.0-r0 do_configure: QA Issue: boost: invalid
PACKAGECONFIG: atomic [invalid-packageconfig]

OK, you're right. That's from insane.bbclass :-(

Cheers,
Andre'

#8 lore raw
In reply to [email protected]

meta/recipes-support/boost/boost.inc python __anonymous () { · line 79

Quoted 5 lines · On 26 September 2016 at 08:56, <[email protected]> wrote:
meta/recipes-support/boost/boost.inc +4 -0
+FILES_${PN}-graph = "${libdir}/libboost_graph.so.*"
+FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*"
+FILES_${PN}-locale = "${libdir}/libboost_locale.so.*"
+FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"

Are all of these really required? Apart from ${libdir}/mpi.so they look like they'll be handled by the Python logic in the recipe.

Ross

#9 lore raw

Yes, they are needed for the cases not handled by the python logic, or I met QA issues:

WARNING: Variable key FILES_${PN}-locale (${datadir}/locale) replaces original key FILES_boost-locale (${libdir}/libboost_locale.so.*)
WARNING: boost-1.61.0-r0 do_package: QA Issue: boost: Files/directories were installed but not shipped in any package:
/usr/lib64/libboost_locale.so.1.61.0

For the graph parts, all libboost_graph* will go into PN-graph and PN-graph_parallel will be empty.

Thanks,
Jackie

From: Burton, Ross [mailto:[email protected]]
Sent: Tuesday, September 27, 2016 8:29 PM
To: Huang, Jie (Jackie)
Cc: OE-core
Subject: Re: [OE-core] [PATCH 2/2 v2] boost: add support for additional boost libs

On 26 September 2016 at 08:56, <[email protected]<mailto:[email protected]>> wrote:
+FILES_${PN}-graph = "${libdir}/libboost_graph.so.*"
+FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*" +FILES_${PN}-locale = "${libdir}/libboost_locale.so.*"
+FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"

Are all of these really required? Apart from ${libdir}/mpi.so they look like they'll be handled by the Python logic in the recipe.

Ross