Perhaps a bug in the cmake detect which is part of boost, because I am not 
using python2 for caffe.

I used the path of least resistance because as far as I could tell boost only 
let you build one or the other and in my case it was the python3 boost api. In 
the end caffe was working and all the python3 tests with the Movidius SDK pass 
(which use python3).

Jason.

On 03/14/2018 09:50 AM, Burton, Ross wrote:
I thought that boost_python was the py2 binary, and boost_python3 was the py3 
one?  Is this not a bug in caffe?

On 13 March 2018 at 03:08, Jason Wessel <jason.wes...@windriver.com 
<mailto:jason.wes...@windriver.com>> wrote:

    When using an image built with the Yocto Project which has a compiler
    and all the required libraries, projects such as caffe for the
    Movidius SDK which use python3 and boost fail to build because they
    look for libboost_python.so.  The error that cmake returns doesn't
    even point to the fact that this is why the configuration fails.

    Example showing the problem with the missing symlink:
    ================
      git clone https://github.com/weiliu89/caffe.git 
<https://github.com/weiliu89/caffe.git>
      cd caffe
      mkdir build
      cd build
      cmake -DBLAS=Open ..

    -- Configuring done
    CMake Error at CMakeLists.txt:85 (add_dependencies):
      The dependency target "pycaffe" of target "pytest" does not exist.
    ================

    Conditionally creating the link when building python3 support into
    boost is all that is needed.

    Signed-off-by: Jason Wessel <jason.wes...@windriver.com 
<mailto:jason.wes...@windriver.com>>
    ---
     meta/recipes-support/boost/boost.inc | 3 +++
     1 file changed, 3 insertions(+)

    diff --git a/meta/recipes-support/boost/boost.inc 
b/meta/recipes-support/boost/boost.inc
    index 0461ec6..c53edf7 100644
    --- a/meta/recipes-support/boost/boost.inc
    +++ b/meta/recipes-support/boost/boost.inc
    @@ -195,6 +195,9 @@ do_install() {
                    fi
            done

    +       if [ -e ${D}${libdir}/libboost_python3.so ]; then
    +               ln -s libboost_python3.so ${D}${libdir}/libboost_python.so
    +       fi
     }

     BBCLASSEXTEND = "native nativesdk"
    --
    2.7.4

    --
    _______________________________________________
    Openembedded-core mailing list
    Openembedded-core@lists.openembedded.org 
<mailto:Openembedded-core@lists.openembedded.org>
    http://lists.openembedded.org/mailman/listinfo/openembedded-core 
<http://lists.openembedded.org/mailman/listinfo/openembedded-core>



-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to