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

Cmake Error #49

Open
gzucatelli opened this issue Jul 3, 2024 · 1 comment
Open

Cmake Error #49

gzucatelli opened this issue Jul 3, 2024 · 1 comment

Comments

@gzucatelli
Copy link

"I am following the installation steps and the error occurs:"

xxxxxx@raspberrypi:~/ros2_ws$ sudo colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> orbbec_camera_msgs
Starting >>> orbbec_description
-- The C compiler identification is GNU 11.4.0
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:9 (find_package):
By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ament_cmake", but CMake did not find one.

Could not find a package configuration file provided by "ament_cmake" with
any of the following names:

ament_cmakeConfig.cmake
ament_cmake-config.cmake

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

-- Configuring incomplete, errors occurred!
CMake Error at CMakeLists.txt:4 (find_package):
By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ament_cmake", but CMake did not find one.

Could not find a package configuration file provided by "ament_cmake" with
any of the following names:

ament_cmakeConfig.cmake
ament_cmake-config.cmake

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

See also "/home/guilherme/ros2_ws/build/orbbec_camera_msgs/CMakeFiles/CMakeOutput.log".
-- Configuring incomplete, errors occurred!
See also "/home/guilherme/ros2_ws/build/orbbec_description/CMakeFiles/CMakeOutput.log".
--- stderr: orbbec_camera_msgs
CMake Error at CMakeLists.txt:9 (find_package):
By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ament_cmake", but CMake did not find one.

Could not find a package configuration file provided by "ament_cmake" with
any of the following names:

ament_cmakeConfig.cmake
ament_cmake-config.cmake

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


Failed <<< orbbec_camera_msgs [8.43s, exited with code 1]
Aborted <<< orbbec_description [8.37s]

Summary: 0 packages finished [13.3s]
1 package failed: orbbec_camera_msgs
1 package aborted: orbbec_description
2 packages had stderr output: orbbec_camera_msgs orbbec_description
1 package not processed

@jian-dong
Copy link
Contributor

I suspect that you haven't sourced the ROS2 environment. Assuming you are using Humble, you can try the following command:

source /opt/ros/humble/setup.bash

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

2 participants