You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Neither colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja nor colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON produce any ros2_ws/build/compile_commands.json.
Output of colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja:
Starting >>> cpp_pubsub
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ament_cmake: 0.9.11 (/opt/ros/foxy/share/ament_cmake/cmake)
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Found ament_lint_auto: 0.9.8 (/opt/ros/foxy/share/ament_lint_auto/cmake)
-- Added test 'copyright' to check source files copyright and LICENSE
-- Added test 'lint_cmake' to check CMake code style
-- Added test 'xmllint' to check XML markup files
-- Configuring done
-- Generating done
-- Build files have been written to: $mypath/ros_ws/build/cpp_pubsub
ninja: no work to do.
-- Install configuration: ""
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/ament_index/resource_index/package_run_dependencies/cpp_pubsub
-- Installing: /home/eric/Software/ros_ws/install/cpp_pubsub/share/ament_index/resource_index/parent_prefix_path/cpp_pubsub
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/environment/ament_prefix_path.sh
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/environment/ament_prefix_path.dsv
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/environment/path.sh
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/environment/path.dsv
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/local_setup.bash
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/local_setup.sh
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/local_setup.zsh
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/local_setup.dsv
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/package.dsv
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/ament_index/resource_index/packages/cpp_pubsub
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/cmake/cpp_pubsubConfig.cmake
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/cmake/cpp_pubsubConfig-version.cmake
-- Installing: $mypath/ros_ws/install/cpp_pubsub/share/cpp_pubsub/package.xml
Finished <<< cpp_pubsub [0.50s]
Summary: 1 package finished [0.60s]
Edit: #76 (comment) i.e. colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja --no-warn-unused-cli produces the same result.
I just ran into the same problem, while following the same example codebase, if you are using the cpp_pubsub example from the documentation (I'm on ROS2 Humble, with WSL Ubuntu-22.04). However, I noticed that later in the tutorial it is shown that the build configuration files (both the CMakeLists.txt and the package.xml) are incomplete, and you're going to fill them in the tutorial. The compile_commands.json gets generated after. I wonder why this doesn't raise an error, and my guess is that in the CMake file there's no executable specified at first, therefore the build skips it entirely.
Hi,
ISSUE: Neither
colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja
norcolcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
produce anyros2_ws/build/compile_commands.json
.on Ubuntu 20.04 LTS using ROS2 Foxy,
colcon version-check
:especially
colcon-cmake 0.2.27: up-to-date
withNeither
colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja
norcolcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
produce anyros2_ws/build/compile_commands.json
.Output of
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja
:Edit: #76 (comment) i.e.
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja --no-warn-unused-cli
produces the same result.Any suggestions?
Originally posted by @Scoeerg in #61 (comment)
The text was updated successfully, but these errors were encountered: