Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libuvc_camera install fails, OS X 10.11.12, ROS Indigo #31

Open
gunshi opened this issue May 2, 2016 · 6 comments
Open

libuvc_camera install fails, OS X 10.11.12, ROS Indigo #31

gunshi opened this issue May 2, 2016 · 6 comments

Comments

@gunshi
Copy link

gunshi commented May 2, 2016

Hi, I cloned the most recent version of the libuvc_ros repo (master) into my src folder and ran catkin_make_isolated --pkg libuvc_camera --install , and then I got an error while building, I reproduced the error, as suggested, and got:

<== Failed to process package 'libuvc_camera':
Command '['/Users/gunshigupta/ros_catkin_ws/install_isolated/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /Users/gunshigupta/ros_catkin_ws/build_isolated/libuvc_camera && /Users/gunshigupta/ros_catkin_ws/install_isolated/env.sh make -j4 -l4

Command failed, exiting.
yguns-MacBook-Pro:ros_catkin_ws gunshigupta$ cd /Users/gunshigupta/ros_catkin_ws/build_isolated/libuvc_camera && /Users/gunshigupta/ros_catkin_ws/install_isolated/env.sh make -j4 -l4
[ 14%] Built target libuvc_camera_gencfg
[ 42%] Building CXX object CMakeFiles/libuvc_camera_nodelet.dir/src/camera_driver.cpp.o
[ 42%] Building CXX object CMakeFiles/camera_node.dir/src/camera_driver.cpp.o
/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:193:/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp28::193 :28: error: error:
use
ofuse undeclaredof identifierundeclared 'uvc_mjpeg2rgb'identifier
'uvc_mjpeg2rgb'
uvc_error_t conv_ret = uvc_mjpeg2rgb(frame, rgb_frame_); uvc_error_t conv_ret = uvc_mjpeg2rgb(frame, rgb_frame_);

                       ^
                       ^

/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:242::24259::59 : warning: warning:

        formatformat  specifiesspecifies  typetype  'unsigned int''unsigned int'  butbut  thethe  argumentargument  hashas  typetype  'size_t''size_t'

        (aka 'unsigned long')(aka 'unsigned long')  [-Wformat][-Wformat]

     status_class, event, selector, status_attribute, data_en);
     status_class, event, selector, status_attribute, data_len);                                                          ^~~~~~~~

                                                      ^~~~~~~~

/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:245:13: warning: /Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp
: 245enumeration: 13value: 'UVC_STATUS_CLASS_CONTROL' notwarning : handled in
switch enumeration
value[-Wswitch] 'UVC_STATUS_CLASS_CONTROL'
not handled in switch
[-Wswitch]
switch (status_class) {
^
switch (status_class) {
^
/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:323:26: error:
use of undeclared identifier 'uvc_find_devices'; did you mean
'uv_find_device'?
uvc_error_t find_err = uvc_find_devices(
^~~~~~~~~~~~~~~~
uv_find_device
/usr/local/Cellar/libuvc/0.0.5/include/libuvc/libuvc.h:371:13: note:
'uvc_find_device' declared here
uvc_error_t uvc_find_device(
^
/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:323:26: error:
use of undeclared identifier 'uvc_find_devices'; did you mean
'uv_find_device'?
uvc_error_t find_err = uvc_find_devices(
^~~~~~~~~~~~~~~~
uv_find_device
/usr/local/Cellar/libuvc/0.0.5/include/libuvc/libuvc.h:371:13: note:
'uvc_find_device' declared here
uvc_error_t uvc_find_device(
^
/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp:/Users/gunshigupta/ros_catkin_ws/src/libuvc_ros/libuvc_camera/src/camera_driver.cpp324::32411::11 : errorerror: :

        cannotcannot  initializeinitialize  aa  parameterparameter  ofof  typetype  'uvc_device_t **''uvc_device_t **'

        (aka 'uvc_device **')(aka 'uvc_device **')  withwith  anan  rvaluervalue  ofof  typetype  'uvc_device_t ***''uvc_device_t ***'

        (aka 'uvc_device ***')(aka 'uvc_device ***')

ctx_, &devs,    ctx_, &devs,

      ^~~~~          ^~~~~

/usr/local/Cellar/libuvc/0.0.5/include/libuvc/libuvc.h:373:20: note: passing
argument to parameter 'dev' here
uvc_device_t *_dev,
^
/usr/local/Cellar/libuvc/0.0.5/include/libuvc/libuvc.h:373:20: note: passing
argument to parameter 'dev' here
uvc_device_t *_dev,
^
2 warnings and 3 errors generated.
2 warnings and 3 errors generated.
make[2]: *** [CMakeFiles/camera_node.dir/src/camera_driver.cpp.o] Error 1
make[2]: *** [CMakeFiles/libuvc_camera_nodelet.dir/src/camera_driver.cpp.o] Error 1
make[1]: *** [CMakeFiles/camera_node.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/libuvc_camera_nodelet.dir/all] Error 2
make: *** [all] Error 2

What do I do to fix it?
Thanks!

@gunshi
Copy link
Author

gunshi commented May 2, 2016

It looks like a version error, I have libuvc-0.0.5 from brew.

@gunshi
Copy link
Author

gunshi commented May 9, 2016

Will downgrading libuvc to a lower version to test if this package builds, lead to errors with the already built ROS that I have?

@pdvelez
Copy link

pdvelez commented May 18, 2016

I'm facing the same issue.

OS X Yosemite 10.10.5
ROS indigo
brew libuvc version 0.0.5

EDIT:
I was able to compile it by uninstalling brew libuvc, and installing it using cmake.
https://int80k.com/libuvc/doc/index.html

@gunshi
Copy link
Author

gunshi commented May 22, 2016

Hi, I just wanted to ask, why not libuvc_ros, and why libuvc?
I mean in which case is installing the latter recommended?

@pdvelez
Copy link

pdvelez commented May 24, 2016

Hi, actually I installed libuvc_ros but it worked only after installing libuvc.

@3rd3
Copy link

3rd3 commented Jul 2, 2016

This also solved it for me:

brew remove libuvc
git clone https://github.com/ktossell/libuvc.git
cd libuvc
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make && make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants