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

catkin_make error #2

Closed
ans-qureshi opened this issue Apr 2, 2021 · 13 comments
Closed

catkin_make error #2

ans-qureshi opened this issue Apr 2, 2021 · 13 comments

Comments

@ans-qureshi
Copy link

Hi!
I have run the command: catkin_make_isolated --cmake-args -D depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/ and I'm getting this error:

image

@saching13
Copy link
Contributor

saching13 commented Apr 2, 2021

Hi,
Can you steps from 1-6 work without any errors?
And also share your system configuration so that I can debug it.

@ans-qureshi
Copy link
Author

ans-qureshi commented Apr 2, 2021

@saching13 Yess, 1-15 worked without any errors.
I am using Ubuntu 20.04
P.S. is the depthai_DIR path that I gave correct? depthaiConfig.cmake is located in this path.

@themarpe
Copy link

themarpe commented Apr 2, 2021

@ans-qureshi 2 things that come to mind:

  • does the folder contain the specified file? Was the install command run?
  • you may also try pointing to build directory and just build (without installing)

@ans-qureshi
Copy link
Author

ans-qureshi commented Apr 2, 2021

  1. Folder contains specified file
  2. Install command from point 7 was run
  3. Tried pointing to build directory only, same issue :/
    @themarpe

@saching13
Copy link
Contributor

saching13 commented Apr 2, 2021

Your command should be
catkin_make_isolated --cmake-args -D depthai_DIR=/home/srl/depthai-core/build/install/lib/cmake/depthai/

Not
catkin_make_isolated --cmake-args -D depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/

There is a $ after depthai_DIR=.
$ is used when representing the path using a variable.

Modified this in the steps to avoid further confusions.

@ans-qureshi
Copy link
Author

ans-qureshi commented Apr 2, 2021

Sadly, no effect:

srl@srl-HP-ProBook-440-G5:~/ros_ws$ catkin_make_isolated --cmake-args -D depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/
Base path: /home/srl/ros_ws
Source space: /home/srl/ros_ws/src
Build space: /home/srl/ros_ws/build_isolated
Devel space: /home/srl/ros_ws/devel_isolated
Install space: /home/srl/ros_ws/install_isolated
Additional CMake Arguments: -D depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/

~~  traversing 4 packages in topological order:
~~  - vision_msgs
~~  - depthai_ros_msgs
~~  - depthai_bridge
~~  - depthai_examples

The packages or cmake arguments have changed, forcing cmake invocation

==> Processing catkin package: 'vision_msgs'
==> cmake /home/srl/ros_ws/src/vision_msgs -DCATKIN_DEVEL_PREFIX=/home/srl/ros_ws/devel_isolated/vision_msgs -DCMAKE_INSTALL_PREFIX=/home/srl/ros_ws/install_isolated -D depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/ -G Unix Makefiles in '/home/srl/ros_ws/build_isolated/vision_msgs'
-- Using CATKIN_DEVEL_PREFIX: /home/srl/ros_ws/devel_isolated/vision_msgs
-- Using CMAKE_PREFIX_PATH: /home/srl/catkin_ws/devel;/home/srl/ros_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/srl/catkin_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.5", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/srl/ros_ws/build_isolated/vision_msgs/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.5")
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.9
-- BUILD_SHARED_LIBS is on
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- vision_msgs: 12 messages, 0 services
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

depthai_DIR

-- Build files have been written to: /home/srl/ros_ws/build_isolated/vision_msgs
==> make -j8 -l8 in '/home/srl/ros_ws/build_isolated/vision_msgs'
[ 0%] Built target _vision_msgs_generate_messages_check_deps_ObjectHypothesisWithPose
[ 0%] Built target _vision_msgs_generate_messages_check_deps_Detection2DArray
[ 0%] Built target _vision_msgs_generate_messages_check_deps_Detection3D
[ 0%] Built target _vision_msgs_generate_messages_check_deps_Detection3DArray
[ 0%] Built target _vision_msgs_generate_messages_check_deps_Detection2D
[ 0%] Built target _vision_msgs_generate_messages_check_deps_BoundingBox3D
[ 0%] Built target _vision_msgs_generate_messages_check_deps_Classification3D
[ 0%] Built target _vision_msgs_generate_messages_check_deps_VisionInfo
[ 0%] Built target sensor_msgs_generate_messages_nodejs
[ 0%] Built target geometry_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_py
[ 0%] Built target sensor_msgs_generate_messages_py
[ 0%] Built target geometry_msgs_generate_messages_py
[ 0%] Built target sensor_msgs_generate_messages_cpp
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target _vision_msgs_generate_messages_check_deps_ObjectHypothesis
[ 0%] Built target _vision_msgs_generate_messages_check_deps_Classification2D
[ 0%] Built target _vision_msgs_generate_messages_check_deps_BoundingBox2D
[ 0%] Built target _vision_msgs_generate_messages_check_deps_BoundingBox3DArray
[ 0%] Built target geometry_msgs_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_eus
[ 0%] Built target std_msgs_generate_messages_eus
[ 0%] Built target geometry_msgs_generate_messages_eus
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target geometry_msgs_generate_messages_lisp
[ 0%] Built target sensor_msgs_generate_messages_lisp
[ 20%] Built target vision_msgs_generate_messages_py
[ 40%] Built target vision_msgs_generate_messages_nodejs
[ 59%] Built target vision_msgs_generate_messages_cpp
[ 80%] Built target vision_msgs_generate_messages_eus
[100%] Built target vision_msgs_generate_messages_lisp
[100%] Built target vision_msgs_generate_messages
<== Finished processing package [1 of 4]: 'vision_msgs'

==> Processing catkin package: 'depthai_ros_msgs'
==> Building with env: '/home/srl/ros_ws/devel_isolated/vision_msgs/env.sh'
==> cmake /home/srl/ros_ws/src/depthai-ros/depthai_ros_msgs -DCATKIN_DEVEL_PREFIX=/home/srl/ros_ws/devel_isolated/depthai_ros_msgs -DCMAKE_INSTALL_PREFIX=/home/srl/ros_ws/install_isolated -D depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/ -G Unix Makefiles in '/home/srl/ros_ws/build_isolated/depthai_ros_msgs'
-- Using CATKIN_DEVEL_PREFIX: /home/srl/ros_ws/devel_isolated/depthai_ros_msgs
-- Using CMAKE_PREFIX_PATH: /home/srl/ros_ws/devel_isolated/vision_msgs;/home/srl/catkin_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/srl/ros_ws/devel_isolated/vision_msgs;/home/srl/catkin_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.5", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/srl/ros_ws/build_isolated/depthai_ros_msgs/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.5")
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.9
-- BUILD_SHARED_LIBS is on
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- depthai_ros_msgs: 3 messages, 1 services
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

depthai_DIR

-- Build files have been written to: /home/srl/ros_ws/build_isolated/depthai_ros_msgs
==> make -j8 -l8 in '/home/srl/ros_ws/build_isolated/depthai_ros_msgs'
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_cpp
[ 0%] Built target std_msgs_generate_messages_py
[ 0%] Built target vision_msgs_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_py
[ 0%] Built target vision_msgs_generate_messages_py
[ 0%] Built target sensor_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_nodejs
[ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_TriggerNamed
[ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_SpatialDetectionArray
[ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_SpatialDetection
[ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_AutoFocusCtrl
[ 0%] Built target vision_msgs_generate_messages_nodejs
[ 0%] Built target sensor_msgs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target vision_msgs_generate_messages_lisp
[ 0%] Built target sensor_msgs_generate_messages_eus
[ 0%] Built target vision_msgs_generate_messages_eus
[ 0%] Built target std_msgs_generate_messages_eus
[ 26%] Built target depthai_ros_msgs_generate_messages_py
[ 43%] Built target depthai_ros_msgs_generate_messages_cpp
[ 60%] Built target depthai_ros_msgs_generate_messages_nodejs
[ 78%] Built target depthai_ros_msgs_generate_messages_lisp
[100%] Built target depthai_ros_msgs_generate_messages_eus
[100%] Built target depthai_ros_msgs_generate_messages
<== Finished processing package [2 of 4]: 'depthai_ros_msgs'

==> Processing catkin package: 'depthai_bridge'
==> Building with env: '/home/srl/ros_ws/devel_isolated/depthai_ros_msgs/env.sh'
==> cmake /home/srl/ros_ws/src/depthai-ros/depthai_bridge -DCATKIN_DEVEL_PREFIX=/home/srl/ros_ws/devel_isolated/depthai_bridge -DCMAKE_INSTALL_PREFIX=/home/srl/ros_ws/install_isolated -D depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/ -G Unix Makefiles in '/home/srl/ros_ws/build_isolated/depthai_bridge'
-- Using CATKIN_DEVEL_PREFIX: /home/srl/ros_ws/devel_isolated/depthai_bridge
-- Using CMAKE_PREFIX_PATH: /home/srl/ros_ws/devel_isolated/depthai_ros_msgs;/home/srl/ros_ws/devel_isolated/vision_msgs;/home/srl/catkin_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/srl/ros_ws/devel_isolated/depthai_ros_msgs;/home/srl/ros_ws/devel_isolated/vision_msgs;/home/srl/catkin_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.5", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/srl/ros_ws/build_isolated/depthai_bridge/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.5")
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.9
-- BUILD_SHARED_LIBS is on


-- Depthai bridge is being built using CATKIN.


CMake Error at CMakeLists.txt:82 (find_package):
Could not find a package configuration file provided by "depthai" with any
of the following names:

depthaiConfig.cmake
depthai-config.cmake

Add the installation prefix of "depthai" to CMAKE_PREFIX_PATH or set
"depthai_DIR" to a directory containing one of the above files. If
"depthai" provides a separate development package or SDK, be sure it has
been installed.

-- Configuring incomplete, errors occurred!
See also "/home/srl/ros_ws/build_isolated/depthai_bridge/CMakeFiles/CMakeOutput.log".
See also "/home/srl/ros_ws/build_isolated/depthai_bridge/CMakeFiles/CMakeError.log".
<== Failed to process package 'depthai_bridge':
Command '['/home/srl/ros_ws/devel_isolated/depthai_ros_msgs/env.sh', 'cmake', '/home/srl/ros_ws/src/depthai-ros/depthai_bridge', '-DCATKIN_DEVEL_PREFIX=/home/srl/ros_ws/devel_isolated/depthai_bridge', '-DCMAKE_INSTALL_PREFIX=/home/srl/ros_ws/install_isolated', '-D', 'depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/', '-G', 'Unix Makefiles']' returned non-zero exit status 1.

Reproduce this error by running:
==> cd /home/srl/ros_ws/build_isolated/depthai_bridge && /home/srl/ros_ws/devel_isolated/depthai_ros_msgs/env.sh cmake /home/srl/ros_ws/src/depthai-ros/depthai_bridge -DCATKIN_DEVEL_PREFIX=/home/srl/ros_ws/devel_isolated/depthai_bridge -DCMAKE_INSTALL_PREFIX=/home/srl/ros_ws/install_isolated -D 'depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/' -G 'Unix Makefiles'

Command failed, exiting.

@saching13

@saching13
Copy link
Contributor

The command executed is still wrong.

srl@srl-HP-ProBook-440-G5:~/ros_ws$ catkin_make_isolated --cmake-args -D depthai_DIR=$/home/srl/depthai-core/build/install/lib/cmake/depthai/"

There should be no $ in the command.

@ans-qureshi
Copy link
Author

@saching13 oh crap, yuppp works! 💯
Thanks for bearing me :)

@ans-qureshi
Copy link
Author

Hi! I'm getting following error after running command # 16 on ROS Melodic:

==> Processing catkin package: 'depthai_examples'
==> Building with env: '/home/srl/ros_ws/devel_isolated/depthai_bridge/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/home/srl/ros_ws/build_isolated/depthai_examples'
==> make -j8 -l8 in '/home/srl/ros_ws/build_isolated/depthai_examples'
[ 0%] Built target vision_msgs_generate_messages_cpp
[ 0%] Built target vision_msgs_generate_messages_eus
[ 0%] Built target vision_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target sensor_msgs_generate_messages_eus
[ 0%] Built target sensor_msgs_generate_messages_cpp
[ 0%] Built target geometry_msgs_generate_messages_cpp
[ 0%] Built target geometry_msgs_generate_messages_py
[ 0%] Built target vision_msgs_generate_messages_py
[ 0%] Built target sensor_msgs_generate_messages_py
[ 0%] Built target sensor_msgs_generate_messages_nodejs
[ 0%] Built target geometry_msgs_generate_messages_lisp
[ 0%] Built target roscpp_generate_messages_py
[ 0%] Built target roscpp_generate_messages_cpp
[ 0%] Built target depthai_ros_msgs_generate_messages_eus
[ 0%] Built target vision_msgs_generate_messages_lisp
[ 0%] Built target roscpp_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_eus
[ 0%] Built target rosgraph_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_nodejs
[ 0%] Built target geometry_msgs_generate_messages_eus
[ 0%] Built target std_msgs_generate_messages_py
[ 0%] Built target roscpp_generate_messages_nodejs
[ 0%] Built target rosgraph_msgs_generate_messages_cpp
[ 0%] Built target roscpp_generate_messages_eus
[ 0%] Built target rosgraph_msgs_generate_messages_lisp
[ 0%] Built target rosgraph_msgs_generate_messages_eus
[ 0%] Built target rosgraph_msgs_generate_messages_py
[ 0%] Built target depthai_ros_msgs_generate_messages_nodejs
[ 0%] Built target depthai_ros_msgs_generate_messages_cpp
[ 0%] Built target depthai_ros_msgs_generate_messages_py
[ 0%] Built target geometry_msgs_generate_messages_nodejs
[ 0%] Built target depthai_ros_msgs_generate_messages_lisp
[ 30%] Built target depthai_examples
[ 40%] Built target rgb_stereo_node
[ 45%] Linking CXX executable /home/srl/ros_ws/devel_isolated/depthai_examples/lib/depthai_examples/rgb_subscriber_node
[ 55%] Built target rgb_node
[ 65%] Built target mobilenet_node
[ 75%] Built target stereo_node
[ 95%] Built target stereo_mimic_node
[ 95%] Built target nodelet_stereo
CMakeFiles/rgb_subscriber_node.dir/src/rgb_video_subscriber.cpp.o: In function rgbCallback(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > > const&)': rgb_video_subscriber.cpp:(.text+0x88): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)'
rgb_video_subscriber.cpp:(.text+0xb0): undefined reference to `cv::waitKey(int)'
collect2: error: ld returned 1 exit status
CMakeFiles/rgb_subscriber_node.dir/build.make:150: recipe for target '/home/srl/ros_ws/devel_isolated/depthai_examples/lib/depthai_examples/rgb_subscriber_node' failed
make[2]: *** [/home/srl/ros_ws/devel_isolated/depthai_examples/lib/depthai_examples/rgb_subscriber_node] Error 1
CMakeFiles/Makefile2:1173: recipe for target 'CMakeFiles/rgb_subscriber_node.dir/all' failed
make[1]: *** [CMakeFiles/rgb_subscriber_node.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'depthai_examples':
Command '['/home/srl/ros_ws/devel_isolated/depthai_bridge/env.sh', 'make', '-j8', '-l8']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/srl/ros_ws/build_isolated/depthai_examples && /home/srl/ros_ws/devel_isolated/depthai_bridge/env.sh make -j8 -l8

Command failed, exiting.

@ans-qureshi ans-qureshi reopened this Apr 15, 2021
@ans-qureshi
Copy link
Author

Worked after adding following to CMakeList of depthai_examples:

include_directories(
#include
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
)

@Luxonis-Brandon
Copy link
Contributor

Thanks for circling back!

@saching13
Copy link
Contributor

saching13 commented Apr 15, 2021

Thanks.
Commenting include shouldn't fix the issue actually.
I am working on opencv linking errors in noetic-opencv-fix will add the fix real soon..

@saching13
Copy link
Contributor

@ans-qureshi I used base ubuntu dockers and fixed this issue on both Ubuntu 18 and 20. you shouldn't experience this error anymore. Feel free to try it out and let me know if you have any feedback.

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

4 participants