ros-melodic-arch / ros-melodic-libuvc-camera

ros-melodic-libuvc-cameraAUR package
0 stars 0 forks source link

Build issue: uvc_mjpeg2rgb’ was not declared in this scope; did you mean ‘uvc_any2rgb #1

Open bionade24 opened 5 years ago

bionade24 commented 5 years ago

https://github.com/ros-drivers/libuvc_ros/issues/63

jwhendy commented 5 years ago

I can't reproduce. I just built ros-melodic-libuvc, ros-melodic-libuvc-camera and ros-melodic-libuvc-ros.

bionade24 commented 5 years ago

Have you built ros-melodic-libuvc-camera in a clean chroot?

bionade24 commented 5 years ago

Strange. I rebuilt ros-melodic-libuvc but it hasn't changed anything.

jwhendy commented 5 years ago

I don't generally do that, no. I'm in a clean build folder...

Also, just for the heck of it, I cloned the repo into ~/catkin_ws/src to use catkin build directly. I get this!

Errors     << libuvc_camera:make /home/jwhendy/catkin_ws/logs/libuvc_camera/build.make.001.log                                                                                           
Traceback (most recent call last):
  File "/home/jwhendy/catkin_ws/src/libuvc_ros/libuvc_camera/cfg/UVCCamera.cfg", line 4, in <module>
    from dynamic_reconfigure.parameter_generator_catkin import *
  File "/opt/ros/melodic/lib/python3.7/site-packages/dynamic_reconfigure/__init__.py", line 38, in <module>
    import roslib
  File "/opt/ros/melodic/lib/python3.7/site-packages/roslib/__init__.py", line 50, in <module>
    from roslib.launcher import load_manifest
  File "/opt/ros/melodic/lib/python3.7/site-packages/roslib/launcher.py", line 42, in <module>
    import rospkg
ImportError: No module named rospkg
make[2]: *** [CMakeFiles/libuvc_camera_gencfg.dir/build.make:64: /home/jwhendy/catkin_ws/devel/.private/libuvc_camera/include/libuvc_camera/UVCCameraConfig.h] Error 1
make[1]: *** [CMakeFiles/Makefile2:1430: CMakeFiles/libuvc_camera_gencfg.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

But:

$ python
Python 3.7.4 (default, Oct  4 2019, 06:57:26) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rospkg
>>> rospkg
<module 'rospkg' from '/home/jwhendy/.local/lib/python3.7/site-packages/rospkg/__init__.py'>

I realized it's pulling from my pip install, so I removed that just to be sure:

$ python
Python 3.7.4 (default, Oct  4 2019, 06:57:26) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rospkg
>>> rospkg
<module 'rospkg' from '/usr/lib/python3.7/site-packages/rospkg/__init__.py'>

So it was in both places and the build still fails. Build looks to be using python3, so no idea.

$ catkin build
---------------------------------------------------------------------------------------------------------------------------------------------------------
Profile:                     default
Extending:          [cached] /opt/ros/melodic
Workspace:                   /home/jwhendy/catkin_ws
---------------------------------------------------------------------------------------------------------------------------------------------------------
Build Space:        [exists] /home/jwhendy/catkin_ws/build
Devel Space:        [exists] /home/jwhendy/catkin_ws/devel
Install Space:      [unused] /home/jwhendy/catkin_ws/install
Log Space:          [exists] /home/jwhendy/catkin_ws/logs
Source Space:       [exists] /home/jwhendy/catkin_ws/src
DESTDIR:            [unused] None
---------------------------------------------------------------------------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
---------------------------------------------------------------------------------------------------------------------------------------------------------
Additional CMake Args:       -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m -DPYTHON_LIBRARY=/usr/lib/libpython3.7m.so
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
---------------------------------------------------------------------------------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
---------------------------------------------------------------------------------------------------------------------------------------------------------
Workspace configuration appears valid.

I then installed pip2 install --user rospkg and it built. Then I discovered:

$ grep -R python libuvc_ros/*
libuvc_ros/libuvc_camera/cfg/UVCCamera.cfg:#! /usr/bin/env python2

I changed that to /usr/bin/env python instead and it build in catkin workspace as well.

Not sure if any of that is helpful to you or not!

bionade24 commented 5 years ago

No, that's a python2/3 problem, solved by line 55 in https://github.com/ros-melodic-arch/ros-melodic-libuvc-camera/blob/master/PKGBUILD I first thought It could somehow crazily cause that issue since this patch is very old, but it still fails without and on your machine it simply built fine.

jwhendy commented 5 years ago

Ah, duh. I hadn't thought of that line doing a bunch of stuff behind the scenes that wouldn't happen normally in catkin_ws. I'm unsure on your error as this release hasn't changed in a long time (apr 2018).

You rebuilt ros-melodic-libuvc successfully?

bionade24 commented 5 years ago

Yes, ros-melodic-libuvc has always built successfully. Will now install full ROS into a clean container and then check if it still fails.

bionade24 commented 5 years ago

I currently detected that I not even maintain this package

bionade24 commented 5 years ago

Installing everything didn't help.

acxz commented 5 years ago

@kwrazi just updated the package on the AUR, and it installs just fine for me.

acxz commented 5 years ago

I'll go ahead and close this issue, since the package installs properly. @bionade24 please let us know if the issue still persists.

bionade24 commented 4 years ago

Reopening this because issue persists on CI and my local machine.

acxz commented 4 years ago

Did you end up trying the latest package on the AUR: https://aur.archlinux.org/packages/ros-melodic-libuvc-camera?

bionade24 commented 4 years ago

This package still fails for me everywhere, and the build containers are clean. If you could give me a hint it would be nice.