Difference between revisions of "Thread:User talk:Eli.sherman/Installing PyCaffe"

From eLinux.org
Jump to: navigation, search
m
m
Line 4: Line 4:
 
Unfortunately I am having trouble installing the python bindings for caffe (which allows one to simply import caffe in python and run caffe commands natively in python). I tried to do this by changing the CMake parameter -DBUILD_python in caffe_git.bb to ON. My error is as follows. I've tried setting the various python (and git and boost) paths manually but none seem to work correctly. Has anybody else had experience with this?
 
Unfortunately I am having trouble installing the python bindings for caffe (which allows one to simply import caffe in python and run caffe commands natively in python). I tried to do this by changing the CMake parameter -DBUILD_python in caffe_git.bb to ON. My error is as follows. I've tried setting the various python (and git and boost) paths manually but none seem to work correctly. Has anybody else had experience with this?
  
 +
  DEBUG: Executing python function sysroot_cleansstate
  
  DEBUG: Executing python function sysroot_cleansstate
+
  DEBUG: Python function sysroot_cleansstate finished
  
DEBUG: Python function sysroot_cleansstate finished
+
  DEBUG: Executing shell function do_configure
  
DEBUG: Executing shell function do_configure
+
  -- The C compiler identification is GNU 5.2.1
  
-- The C compiler identification is GNU 5.2.1
+
  -- The CXX compiler identification is GNU 5.2.1
  
-- The CXX compiler identification is GNU 5.2.1
+
  -- Check for working C compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc
  
-- Check for working C compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc
+
  -- Check for working C compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -- works
  
-- Check for working C compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -- works
+
  -- Detecting C compiler ABI info
  
-- Detecting C compiler ABI info
+
  -- Detecting C compiler ABI info - done
  
-- Detecting C compiler ABI info - done
+
  -- Detecting C compile features
  
-- Detecting C compile features
+
  -- Detecting C compile features - done
  
-- Detecting C compile features - done
+
  -- Check for working CXX compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++
  
-- Check for working CXX compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++
+
  -- Check for working CXX compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -- works
  
-- Check for working CXX compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -- works
+
  -- Detecting CXX compiler ABI info
  
-- Detecting CXX compiler ABI info
+
  -- Detecting CXX compiler ABI info - done
  
-- Detecting CXX compiler ABI info - done
+
  -- Detecting CXX compile features
  
-- Detecting CXX compile features
+
  -- Detecting CXX compile features - done
  
-- Detecting CXX compile features - done
+
  -- Boost version: 1.60.0
  
-- Boost version: 1.60.0
+
  -- Found the following Boost libraries:
  
-- Found the following Boost libraries:
+
  --   system
  
--  system
+
  --  thread
  
--  thread
+
  --  filesystem
  
--   filesystem
+
  -- Looking for pthread.h
  
-- Looking for pthread.h
+
  -- Looking for pthread.h - found
  
-- Looking for pthread.h - found
+
  -- Looking for pthread_create
  
-- Looking for pthread_create
+
  -- Looking for pthread_create - not found
  
-- Looking for pthread_create - not found
+
  -- Looking for pthread_create in pthreads
  
-- Looking for pthread_create in pthreads
+
  -- Looking for pthread_create in pthreads - not found
  
-- Looking for pthread_create in pthreads - not found
+
  -- Looking for pthread_create in pthread
  
-- Looking for pthread_create in pthread
+
  -- Looking for pthread_create in pthread - found
  
-- Looking for pthread_create in pthread - found
+
  -- Found Threads: TRUE 
  
-- Found Threads: TRUE  
+
  -- Found GFlags: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include  
  
-- Found GFlags: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
+
  -- Found gflags  (include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include, library: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libgflags.so)
  
-- Found gflags  (include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include, library: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libgflags.so)
+
  -- Found Glog: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
  
-- Found Glog: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
+
  -- Found glog    (include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include, library: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libglog.so)
  
-- Found glog    (include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include, library: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libglog.so)
+
  -- Found PROTOBUF: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libprotobuf.so
  
-- Found PROTOBUF: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libprotobuf.so 
+
  -- Found PROTOBUF Compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/protoc
  
-- Found PROTOBUF Compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/protoc
+
  -- -- CUDA is disabled. Building without it...
  
-- -- CUDA is disabled. Building without it...
+
  -- Found ViennaCL include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
  
-- Found ViennaCL include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
+
  -- Found OpenCL: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libOpenCL.so 
  
-- Found OpenCL: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libOpenCL.so 
+
  -- Found OpenCL include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
  
-- Found OpenCL include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
+
  -- OpenCV found (/home/eli/build/build/tmp/sysroots/h3ulcb/usr/share/OpenCV)
  
-- OpenCV found (/home/eli/build/build/tmp/sysroots/h3ulcb/usr/share/OpenCV)
+
  -- Found OpenBLAS libraries: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libopenblas.so
  
-- Found OpenBLAS libraries: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libopenblas.so
+
  -- Found OpenBLAS include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
  
-- Found OpenBLAS include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
+
  -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
  
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
+
  -- Found PythonLibs: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libpython2.7.so (found suitable version "2.7.11", minimum required is "2.7")  
  
-- Found PythonLibs: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libpython2.7.so (found suitable version "2.7.11", minimum required is "2.7")
+
  -- To find NumPy Python interpretator is required to be found.
  
-- To find NumPy Python interpretator is required to be found.
+
  -- Could NOT find NumPy (missing:  NUMPY_INCLUDE_DIR NUMPY_VERSION) (Required is at least version "1.7.1")
  
-- Could NOT find NumPy (missing:  NUMPY_INCLUDE_DIR NUMPY_VERSION) (Required is at least version "1.7.1")
+
  -- Could NOT find Boost
  
-- Could NOT find Boost
+
  -- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
  
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
+
  -- Python interface is disabled or not all required dependencies found. Building without it...
  
-- Python interface is disabled or not all required dependencies found. Building without it...
+
  -- Could NOT find Git (missing:  GIT_EXECUTABLE)
  
-- Could NOT find Git (missing:  GIT_EXECUTABLE)
+
  --  
  
--  
+
  -- ******************* Caffe Configuration Summary *******************
  
-- ******************* Caffe Configuration Summary *******************
+
  -- General:
  
-- General:
+
  --   Version          :   1.0.0
  
--  Version          1.0.0
+
  --  Git              unknown
  
--  Git              unknown
+
  --  System            Linux
  
--  System            Linux
+
  --  C++ compiler      /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++
  
--  C++ compiler      :  /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++
+
  --  Release CXX flags -DNDEBUG -march=armv8-a -mtune=cortex-a57.cortex-a53  --sysroot=/home/eli/build/build/tmp/sysroots/h3ulcb  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-
 +
  map=/home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0=/usr/src/debug/caffe/git-r0 -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-
 +
  map=/home/eli/build/build/tmp/sysroots/h3ulcb=  -fvisibility-inlines-hidden -fPIC -Wall -std=c++11 -DCMAKE_BUILD -Wno-sign-compare -Wno-uninitialized
  
--  Release CXX flags :  -DNDEBUG -march=armv8-a -mtune=cortex-a57.cortex-a53  --sysroot=/home/eli/build/build/tmp/sysroots/h3ulcb  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-
+
  --  Debug CXX flags   :  -g -march=armv8-a -mtune=cortex-a57.cortex-a53  --sysroot=/home/eli/build/build/tmp/sysroots/h3ulcb  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-
map=/home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0=/usr/src/debug/caffe/git-r0 -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/h3ulcb=  -fvisibility-inlines-hidden -fPIC -Wall -std=c++11 -DCMAKE_BUILD -Wno-sign-compare -Wno-uninitialized
+
  map=/home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0=/usr/src/debug/caffe/git-r0 -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-
 +
  map=/home/eli/build/build/tmp/sysroots/h3ulcb=  -fvisibility-inlines-hidden -fPIC -Wall -std=c++11 -DCMAKE_BUILD -Wno-sign-compare -Wno-uninitialized
  
--  Debug CXX flags  -g -march=armv8-a -mtune=cortex-a57.cortex-a53  --sysroot=/home/eli/build/build/tmp/sysroots/h3ulcb  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-
+
  --  Build type        Release
map=/home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0=/usr/src/debug/caffe/git-r0 -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/h3ulcb=  -fvisibility-inlines-hidden -fPIC -Wall -std=c++11 -DCMAKE_BUILD -Wno-sign-compare -Wno-uninitialized
 
  
--   Build type        :  Release
+
  --  
  
--  
+
  --   BUILD_SHARED_LIBS :  ON
  
--  BUILD_SHARED_LIBS :  ON
+
  --  BUILD_python      :  ON
  
--  BUILD_python     :  ON
+
  --  BUILD_matlab     :  OFF
  
--  BUILD_matlab      OFF
+
  --  BUILD_docs        ON
  
--  BUILD_docs        ON
+
  --  CPU_ONLY          OFF
  
--  CPU_ONLY          OFF
+
  --  USE_OPENCV        ON
  
--  USE_OPENCV        ON
+
  --  USE_FFT          OFF
  
--  USE_FFT          :  OFF
+
  --  USE_LEVELDB      :  OFF
  
--  USE_LEVELDB      :  OFF
+
  --  USE_LMDB          :  OFF
  
--  USE_LMDB         :  OFF
+
  --  USE_NCCL         :  OFF
  
--  USE_NCCL          :  OFF
+
  --  ALLOW_LMDB_NOLOCK :  OFF
  
--  ALLOW_LMDB_NOLOCK :  OFF
+
  --  USE_HDF5          :  OFF
  
--   USE_HDF5          :  OFF
+
  --  
  
--  
+
  -- Dependencies:
  
-- Dependencies:
+
  --   BLAS              :   Yes (open)
  
--  BLAS              :  Yes (open)
+
  --  Boost            :  Yes (ver. 1.60)
  
--  Boost            :  Yes (ver. 1.60)
+
  --  glog              :  Yes
  
--  glog              :  Yes
+
  --  gflags            :  Yes
  
--  gflags            :  Yes
+
  --  protobuf          :  Yes (ver. 2.6.1)
  
--  protobuf          :  Yes (ver. 2.6.1)
+
  --  OpenCV            :  Yes (ver. 3.1.0)
  
--  OpenCV            Yes (ver. 3.1.0)
+
  --  CUDA              No
  
--   CUDA              :  No
+
  --  
  
--  
+
  -- Documentaion:
  
-- Documentaion:
+
  --   Doxygen          :   No
  
--  Doxygen          No
+
  --  config_file      :   
  
--   config_file      : 
+
  --  
  
--  
+
  -- Install:
  
-- Install:
+
  --   Install path      :   /usr
  
--   Install path      :  /usr
+
  --
  
--  
+
  -- Configuring done
  
-- Configuring done
+
  CMake Error at CMakeLists.txt:211 (add_dependencies):
 
 
CMake Error at CMakeLists.txt:211 (add_dependencies):
 
  
 
   The dependency target "pycaffe" of target "pytest" does not exist.
 
   The dependency target "pycaffe" of target "pytest" does not exist.
  
 +
  -- Generating done
  
  
 +
  -- Build files have been written to: /home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0/build
  
 +
  WARNING: exit code 1 from a shell command.
  
-- Generating done
+
  ERROR: Function failed: do_configure (log file is located at /home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0/temp/log.do_configure.27252)
 
 
 
 
-- Build files have been written to: /home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0/build
 
 
 
WARNING: exit code 1 from a shell command.
 
 
 
ERROR: Function failed: do_configure (log file is located at /home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0/temp/log.do_configure.27252)
 

Revision as of 01:09, 3 August 2017

Hello,

I have managed to successfully build OpenCL/ViennaCL, OpenCV, Caffe, etc. following the instructions here http://elinux.org/R-Car/Boards/Yocto-Gen3/OpenCL Unfortunately I am having trouble installing the python bindings for caffe (which allows one to simply import caffe in python and run caffe commands natively in python). I tried to do this by changing the CMake parameter -DBUILD_python in caffe_git.bb to ON. My error is as follows. I've tried setting the various python (and git and boost) paths manually but none seem to work correctly. Has anybody else had experience with this?

 DEBUG: Executing python function sysroot_cleansstate
 DEBUG: Python function sysroot_cleansstate finished
 DEBUG: Executing shell function do_configure
 -- The C compiler identification is GNU 5.2.1
 -- The CXX compiler identification is GNU 5.2.1
 -- Check for working C compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc
 -- Check for working C compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -- works
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - done
 -- Detecting C compile features
 -- Detecting C compile features - done
 -- Check for working CXX compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++
 -- Check for working CXX compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -- works
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - done
 -- Detecting CXX compile features
 -- Detecting CXX compile features - done
 -- Boost version: 1.60.0
 -- Found the following Boost libraries:
 --   system
 --   thread
 --   filesystem
 -- Looking for pthread.h
 -- Looking for pthread.h - found
 -- Looking for pthread_create
 -- Looking for pthread_create - not found
 -- Looking for pthread_create in pthreads
 -- Looking for pthread_create in pthreads - not found
 -- Looking for pthread_create in pthread
 -- Looking for pthread_create in pthread - found
 -- Found Threads: TRUE  
 -- Found GFlags: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include  
 -- Found gflags  (include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include, library: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libgflags.so)
 -- Found Glog: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include  
 -- Found glog    (include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include, library: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libglog.so)
 -- Found PROTOBUF: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libprotobuf.so  
 -- Found PROTOBUF Compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/protoc
 -- -- CUDA is disabled. Building without it...
 -- Found ViennaCL include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
 -- Found OpenCL: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libOpenCL.so  
 -- Found OpenCL include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
 -- OpenCV found (/home/eli/build/build/tmp/sysroots/h3ulcb/usr/share/OpenCV)
 -- Found OpenBLAS libraries: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libopenblas.so
 -- Found OpenBLAS include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include
 -- Could NOT find PythonInterp (missing:  PYTHON_EXECUTABLE) (Required is at least version "2.7")
 -- Found PythonLibs: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libpython2.7.so (found suitable version "2.7.11", minimum required is "2.7") 
 -- To find NumPy Python interpretator is required to be found.
 -- Could NOT find NumPy (missing:  NUMPY_INCLUDE_DIR NUMPY_VERSION) (Required is at least version "1.7.1")
 -- Could NOT find Boost
 -- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
 -- Python interface is disabled or not all required dependencies found. Building without it...
 -- Could NOT find Git (missing:  GIT_EXECUTABLE) 
 -- 
 -- ******************* Caffe Configuration Summary *******************
 -- General:
 --   Version           :   1.0.0
 --   Git               :   unknown
 --   System            :   Linux
 --   C++ compiler      :   /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++
 --   Release CXX flags :   -DNDEBUG -march=armv8-a -mtune=cortex-a57.cortex-a53  --sysroot=/home/eli/build/build/tmp/sysroots/h3ulcb  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-
 map=/home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0=/usr/src/debug/caffe/git-r0 -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-
 map=/home/eli/build/build/tmp/sysroots/h3ulcb=  -fvisibility-inlines-hidden -fPIC -Wall -std=c++11 -DCMAKE_BUILD -Wno-sign-compare -Wno-uninitialized
 --   Debug CXX flags   :   -g -march=armv8-a -mtune=cortex-a57.cortex-a53  --sysroot=/home/eli/build/build/tmp/sysroots/h3ulcb  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-
 map=/home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0=/usr/src/debug/caffe/git-r0 -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-
 map=/home/eli/build/build/tmp/sysroots/h3ulcb=  -fvisibility-inlines-hidden -fPIC -Wall -std=c++11 -DCMAKE_BUILD -Wno-sign-compare -Wno-uninitialized
 --   Build type        :   Release
 -- 
 --   BUILD_SHARED_LIBS :   ON
 --   BUILD_python      :   ON
 --   BUILD_matlab      :   OFF
 --   BUILD_docs        :   ON
 --   CPU_ONLY          :   OFF
 --   USE_OPENCV        :   ON
 --   USE_FFT           :   OFF
 --   USE_LEVELDB       :   OFF
 --   USE_LMDB          :   OFF
 --   USE_NCCL          :   OFF
 --   ALLOW_LMDB_NOLOCK :   OFF
 --   USE_HDF5          :   OFF
 -- 
 -- Dependencies:
 --   BLAS              :   Yes (open)
 --   Boost             :   Yes (ver. 1.60)
 --   glog              :   Yes
 --   gflags            :   Yes
 --   protobuf          :   Yes (ver. 2.6.1)
 --   OpenCV            :   Yes (ver. 3.1.0)
 --   CUDA              :   No
 -- 
 -- Documentaion:
 --   Doxygen           :   No
 --   config_file       :   
 -- 
 -- Install:
 --   Install path      :   /usr
 --  
 -- Configuring done
 CMake Error at CMakeLists.txt:211 (add_dependencies):
 The dependency target "pycaffe" of target "pytest" does not exist.
 -- Generating done


 -- Build files have been written to: /home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0/build
 WARNING: exit code 1 from a shell command.
 ERROR: Function failed: do_configure (log file is located at /home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0/temp/log.do_configure.27252)