Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

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

Open
bionade24 opened this issue Oct 14, 2019 · 14 comments

Comments

@bionade24
Copy link
Member

ros-drivers/libuvc_ros#63

@jwhendy
Copy link
Contributor

jwhendy commented Oct 14, 2019

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

@bionade24
Copy link
Member Author

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

@bionade24
Copy link
Member Author

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

@jwhendy
Copy link
Contributor

jwhendy commented Oct 14, 2019

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
Copy link
Member Author

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
Copy link
Contributor

jwhendy commented Oct 14, 2019

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
Copy link
Member Author

bionade24 commented Oct 14, 2019

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
Copy link
Member Author

I currently detected that I not even maintain this package

@bionade24
Copy link
Member Author

Installing everything didn't help.

@acxz
Copy link
Member

acxz commented Oct 25, 2019

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

@acxz
Copy link
Member

acxz commented Nov 1, 2019

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

@acxz acxz closed this as completed Nov 1, 2019
@bionade24
Copy link
Member Author

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

@bionade24 bionade24 reopened this Dec 6, 2019
@acxz
Copy link
Member

acxz commented May 22, 2020

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

@bionade24
Copy link
Member Author

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

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

No branches or pull requests

3 participants