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

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

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

Comments

@bionade24
Copy link
Member

@bionade24 bionade24 commented Oct 14, 2019

@jwhendy

This comment has been minimized.

Copy link
Contributor

@jwhendy 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

This comment has been minimized.

Copy link
Member Author

@bionade24 bionade24 commented Oct 14, 2019

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

@bionade24

This comment has been minimized.

Copy link
Member Author

@bionade24 bionade24 commented Oct 14, 2019

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

@jwhendy

This comment has been minimized.

Copy link
Contributor

@jwhendy 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

This comment has been minimized.

Copy link
Member Author

@bionade24 bionade24 commented Oct 14, 2019

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

This comment has been minimized.

Copy link
Contributor

@jwhendy 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

This comment has been minimized.

Copy link
Member Author

@bionade24 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

This comment has been minimized.

Copy link
Member Author

@bionade24 bionade24 commented Oct 14, 2019

I currently detected that I not even maintain this package

@bionade24

This comment has been minimized.

Copy link
Member Author

@bionade24 bionade24 commented Oct 14, 2019

Installing everything didn't help.

@acxz

This comment has been minimized.

Copy link
Member

@acxz acxz commented Oct 25, 2019

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

@acxz

This comment has been minimized.

Copy link
Member

@acxz 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 Nov 1, 2019
@bionade24

This comment has been minimized.

Copy link
Member Author

@bionade24 bionade24 commented Dec 6, 2019

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

@bionade24 bionade24 reopened this Dec 6, 2019
@acxz acxz added the build error label Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.