intel-aero / meta-intel-aero

Yocto layer to support Intel Aero platform
https://github.com/intel-aero/meta-intel-aero
GNU General Public License v2.0
218 stars 119 forks source link

make error trying to build Intel Aero Realsense #412

Closed RohanKurane closed 4 years ago

RohanKurane commented 4 years ago

Hi - I have also opened a similar issue on Realsense github.

I am following the steps in the Intel Aero Wiki to install librealsense but run into the following error during the make step.

 sudo apt-get -y install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev cmake
 git clone -b legacy --single-branch https://github.com/IntelRealSense/librealsense.git
 cd librealsense
 mkdir build && cd build
 cmake ../ 
  make     -->  fails

Here is the output from make

make
Scanning dependencies of target realsense
[  1%] Building CXX object CMakeFiles/realsense.dir/src/archive.cpp.o
[  3%] Building CXX object CMakeFiles/realsense.dir/src/context.cpp.o
[  5%] Building CXX object CMakeFiles/realsense.dir/src/device.cpp.o
[  7%] Building CXX object CMakeFiles/realsense.dir/src/ds-device.cpp.o
[  9%] Building CXX object CMakeFiles/realsense.dir/src/ds-private.cpp.o
[ 11%] Building CXX object CMakeFiles/realsense.dir/src/f200.cpp.o
[ 13%] Building CXX object CMakeFiles/realsense.dir/src/hw-monitor.cpp.o
[ 15%] Building CXX object CMakeFiles/realsense.dir/src/image.cpp.o
[ 17%] Building CXX object CMakeFiles/realsense.dir/src/ivcam-private.cpp.o
[ 19%] Building CXX object CMakeFiles/realsense.dir/src/ivcam-device.cpp.o
[ 21%] Building CXX object CMakeFiles/realsense.dir/src/log.cpp.o
[ 23%] Building CXX object CMakeFiles/realsense.dir/src/motion-module.cpp.o
[ 25%] Building CXX object CMakeFiles/realsense.dir/src/r200.cpp.o
[ 26%] Building CXX object CMakeFiles/realsense.dir/src/rs.cpp.o
[ 28%] Building CXX object CMakeFiles/realsense.dir/src/sr300.cpp.o
[ 30%] Building CXX object CMakeFiles/realsense.dir/src/stream.cpp.o
[ 32%] Building CXX object CMakeFiles/realsense.dir/src/sync.cpp.o
[ 34%] Building CXX object CMakeFiles/realsense.dir/src/timestamps.cpp.o
[ 36%] Building CXX object CMakeFiles/realsense.dir/src/types.cpp.o
[ 38%] Building CXX object CMakeFiles/realsense.dir/src/uvc-libuvc.cpp.o
[ 40%] Building CXX object CMakeFiles/realsense.dir/src/uvc-v4l2.cpp.o
/home/ubuntu/librealsense/src/uvc-v4l2.cpp: In constructor ‘rsimpl::uvc::subdevice::subdevice(const string&)’:
/home/ubuntu/librealsense/src/uvc-v4l2.cpp:158:39: error: ‘V4L2_CAP_META_CAPTURE’ was not declared in this scope
                 if((cap.device_caps & V4L2_CAP_META_CAPTURE)){
                                       ^
CMakeFiles/realsense.dir/build.make:542: recipe for target 'CMakeFiles/realsense.dir/src/uvc-v4l2.cpp.o' failed
make[2]: *** [CMakeFiles/realsense.dir/src/uvc-v4l2.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/realsense.dir/all' failed
make[1]: *** [CMakeFiles/realsense.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

The variable V4L2_CAP_META_CAPTURE is not defined anywhere in the source code after the git clone.

Am I missing a command or 2 ?

@lfelipe @anselmolsm

Thanks

RohanKurane commented 4 years ago

If I comment out these 3 lines from src/uvc-v4l2.cpp everything works fine

        if((cap.device_caps & V4L2_CAP_META_CAPTURE)){
            is_metastream=true;
        }

Where is this variable defined ? Looks like it is defined in linux/videodev2.h. For some reason my copy of that header file does not have it defined. How can I upgrade the copy to include the variable ?