From: Mingli Yu <[email protected]>

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 <[email protected]>
---
 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

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to