Skip to content

No UVC backend selected in python wrappers. #1220

@pedrogasg

Description

@pedrogasg
Contributor

Issue Description

After building the lib from source, everything seems to work fine with examples, then when I try to build the python wrapper, the follow error was show to me

[  5%] Building CXX object CMakeFiles/pyrealsense2.dir/python.cpp.o
[ 11%] Linking CXX shared library pyrealsense2.cpython-36m-x86_64-linux-gnu.so
[ 11%] Built target pyrealsense2
Scanning dependencies of target pybackend2
[ 17%] Building CXX object CMakeFiles/pybackend2.dir/home/real/librealsense/src/backend.cpp.o
/home/real/librealsense/src/backend.cpp:11:2: error: #error No UVC backend selected. Please #define exactly one of RS2_USE_LIBUVC_BACKEND, RS2_USE_WMF_BACKEND, or RS2_USE_V4L2_BACKEND
 #error No UVC backend selected. Please #define exactly one of RS2_USE_LIBUVC_BA
  ^
CMakeFiles/pybackend2.dir/build.make:62: recipe for target 'CMakeFiles/pybackend2.dir/home/real/librealsense/src/backend.cpp.o' failed
make[2]: *** [CMakeFiles/pybackend2.dir/home/real/librealsense/src/backend.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/pybackend2.dir/all' failed
make[1]: *** [CMakeFiles/pybackend2.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I try to add the definition of v4l2 in the CMakeList.text but the build show me the following error


Scanning dependencies of target pyrealsense2
[  5%] Building CXX object CMakeFiles/pyrealsense2.dir/python.cpp.o
[ 11%] Linking CXX shared library pyrealsense2.cpython-36m-x86_64-linux-gnu.so
[ 11%] Built target pyrealsense2
Scanning dependencies of target pybackend2
[ 17%] Building CXX object CMakeFiles/pybackend2.dir/home/real/librealsense/src/backend.cpp.o
[ 23%] Building CXX object CMakeFiles/pybackend2.dir/home/real/librealsense/src/win/win-helpers.cpp.o
[ 29%] Building CXX object CMakeFiles/pybackend2.dir/home/real/librealsense/src/win/win-uvc.cpp.o
[ 35%] Building CXX object CMakeFiles/pybackend2.dir/pybackend_extras.cpp.o
[ 41%] Building CXX object CMakeFiles/pybackend2.dir/pybackend.cpp.o
[ 47%] Building CXX object CMakeFiles/pybackend2.dir/home/real/librealsense/src/win/win-usb.cpp.o
[ 52%] Building CXX object CMakeFiles/pybackend2.dir/home/real/librealsense/src/win/win-backend.cpp.o
[ 58%] Building CXX object CMakeFiles/pybackend2.dir/home/real/librealsense/src/linux/backend-v4l2.cpp.o
In file included from /home/real/librealsense/src/linux/backend-v4l2.cpp:6:0:
/home/real/librealsense/src/linux/backend-v4l2.h:6:21: fatal error: backend.h: No such file or directory
compilation terminated.
CMakeFiles/pybackend2.dir/build.make:230: recipe for target 'CMakeFiles/pybackend2.dir/home/real/librealsense/src/linux/backend-v4l2.cpp.o' failed
make[2]: *** [CMakeFiles/pybackend2.dir/home/real/librealsense/src/linux/backend-v4l2.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/pybackend2.dir/all' failed
make[1]: *** [CMakeFiles/pybackend2.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Required Info
Camera Model D400
Firmware Version 05.08.15.00
Operating System & Version Linux Ubuntu 16
Kernel Version (Linux Only) 4.10.0-28-generic
Platform PC
SDK Version git

Activity

changed the title [-]No UVC backend selected.[/-] [+]No UVC backend selected in python wrappers.[/+] on Feb 23, 2018
zivsha

zivsha commented on Feb 24, 2018

@zivsha
Contributor

Are you building the main Cmakelists.txt or the one inside the python folder?
You should build the main one and only pass the -DBUILD_PYTHON_BINDINGS=ON flag.

pedrogasg

pedrogasg commented on Feb 24, 2018

@pedrogasg
ContributorAuthor

or the one inside the python folder <- Yeah this one was my problem, thanks for the help
It works like a charm once you add the
-DBUILD_PYTHON_BINDINGS=bool:true
and the version on python you are using
-DPYTHON_EXECUTABLE=/home/real/miniconda3/envs/py36/bin/python
miniconda python 3.6 in my case

One question though is necesary to add all the suffix to the build ?

My build name -> pyrealsense2.cpython-36m-x86_64-linux-gnu.so

Thanks again this issue ca be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pedrogasg@dorodnic@jlgarcia75@zivsha

        Issue actions

          No UVC backend selected in python wrappers. · Issue #1220 · IntelRealSense/librealsense