All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] boost.inc: make libboost_python3.so available
@ 2018-10-16  9:00 mingli.yu
  2018-10-16 10:00 ` richard.purdie
  0 siblings, 1 reply; 9+ messages in thread
From: mingli.yu @ 2018-10-16  9:00 UTC (permalink / raw)
  To: openembedded-core, ross.burton, randy.macleod, richard.purdie

From: Mingli Yu <mingli.yu@windriver.com>

Currently boost provides ${libdir}/libboost_python35.so,
but there is some logic as below in CMakeLists.txt
of package cv-bridge under meta-ros layer.
[snip]
if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3)
    find_package(Boost REQUIRED python)
else()
    find_package(Boost REQUIRED python3)
endif()
[snip]

And comes below do_configure error for cv-bridge:
meta-ros/recipes-ros/vision-opencv/cv-bridge_1.11.16.bb:do_configure
| CMake Error at $Prj/cv-bridge/1.11.16-r0/recipe-sysroot-native/usr/share/cmake-3.12/Modules/FindBoost.cmake:2048 (message):
|   Unable to find the requested Boost libraries.
|
|   Boost version: 1.68.0
|
|   Boost include path:
|   $Prj/cv-bridge/1.11.16-r0/recipe-sysroot/usr/include
|
|
|   Could not find the following Boost libraries:
|
|           boost_python3
|
|   No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
|   directory containing Boost libraries or BOOST_ROOT to the location of
|   Boost.
| Call Stack (most recent call first):
|   CMakeLists.txt:11 (find_package)

Can update CMakeLists.txt of cv-bridge as below
to remove the configure error:
 - find_package(Boost REQUIRED python3)
 + find_package(Boost REQUIRED python35)

But once the python version changes such as
python37, it fails again. So make boost provides
libboost_python3.so to make the fix flexibly.

[YOCTO #12833]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 meta/recipes-support/boost/boost.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index c4faea211f0..98f0b71d73a 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -198,6 +198,10 @@ do_install() {
 			ln -s libboost_${lib}.so ${D}${libdir}/libboost_${lib}-mt.so
 		fi
 	done
+	if [ -e ${D}${libdir}/libboost_python3[0-9].so ] && [ ! -e ${D}${libdir}/libboost_python3.so ]; then
+		lib_python3_so=$(basename `ls ${D}${libdir}/libboost_python3[0-9].so`)
+		ln -s ${lib_python3_so} ${D}${libdir}/libboost_python3.so
+	fi
 
 }
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-10-18  9:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-16  9:00 [PATCH] boost.inc: make libboost_python3.so available mingli.yu
2018-10-16 10:00 ` richard.purdie
2018-10-16 10:38   ` Burton, Ross
2018-10-16 11:18     ` Burton, Ross
2018-10-16 12:05       ` Burton, Ross
2018-10-17  5:46         ` Yu, Mingli
2018-10-17  9:39           ` Burton, Ross
2018-10-18  2:28             ` Yu, Mingli
2018-10-18  9:22               ` Burton, Ross

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.