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

Fix to allow ninja to use make for generators (#123) #128

Conversation

yashi
Copy link

@yashi yashi commented Sep 29, 2023

This is a backport of upstream commit ade88c5. This allows ROS Humble LTS to be compiled with Ninja.

Without this, colcon build with an environment variable CMAKE_GENERATOR=Ninja for packages depending on python_qt_binding fails with the following error.

Starting >>> qt_gui_cpp
-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 12.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/gcc-12 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done      
-- Check for working CXX compiler: /usr/lib/ccache/g++-12 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ament_cmake: 1.3.5 (/home/yashi/work/yoshida/humble/install/share/ament_cmake/cmake)
-- Found Python3: /usr/bin/python3 (found version "3.11.5") found components: Interpreter 
-- Override CMake install command with custom implementation using symlinks instead of copying resources
-- Found pluginlib: 5.1.0 (/home/yashi/work/yoshida/humble/install/share/pluginlib/cmake)
-- Found TinyXML2 via Config file: /usr/lib/x86_64-linux-gnu/cmake/tinyxml2
-- Found TinyXML2 via Config file: /usr/lib/x86_64-linux-gnu/cmake/tinyxml2
-- Found python_qt_binding: 1.1.1 (/home/yashi/work/yoshida/humble/install/share/python_qt_binding/cmake)
CMake Warning (dev) at /home/yashi/work/yoshida/humble/install/share/python_qt_binding/cmake/shiboken_helper.cmake:1 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  src/qt_gui_cpp_shiboken/CMakeLists.txt:43 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.11.5", minimum required is "3.3") 
-- PySide2Config: Using default python: .cpython-311-x86_64-linux-gnu
-- Found PySide2 version 5.15.10
-- Using PYSIDE_INCLUDE_DIR: /usr/lib/../include/PySide2
-- Using PYSIDE_LIBRARY: /usr/lib/x86_64-linux-gnu/libpyside2.cpython-311-x86_64-linux-gnu.so.5.15.10
CMake Warning (dev) at /home/yashi/work/yoshida/humble/install/share/python_qt_binding/cmake/shiboken_helper.cmake:37 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  src/qt_gui_cpp_shiboken/CMakeLists.txt:43 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.11.so (found suitable version "3.11.5", minimum required is "3.11") 
-- Shiboken binding generator NOT available.
-- Found Python3: /usr/include/python3.11 (found version "3.11.5") found components: Development Development.Module Development.Embed 
-- Found python_qt_binding: 1.1.1 (/home/yashi/work/yoshida/humble/install/share/python_qt_binding/cmake)
-- Found Python3: /usr/bin/python3 (found suitable version "3.11.5", minimum required is "3.11.5") found components: Interpreter Development Development.Module Development.Embed 
-- SIP binding generator available at: /usr/bin/sip
-- Python binding generators: sip
-- Configuring done (1.1s)                     
-- Generating done (0.0s)
CMake Error:
  Running

   '/usr/bin/ninja' '-C' '/home/yashi/work/yoshida/test-rqt/build/qt_gui_cpp' '-t' 'recompact'

  failed with:

   ninja: error: build.ninja:526: bad $-escape (literal $ must be written as $$)

  



CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_CLOUD_CLIENT


CMake Generate step failed.  Build files cannot be regenerated correctly.
ninja: error: loading 'build.ninja': No such file or directory

[ Upstream commit ade88c5 ]

Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, thanks!

@clalancette
Copy link
Contributor

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@clalancette clalancette merged commit 2cc0552 into ros-visualization:humble Oct 17, 2023
2 checks passed
@yashi yashi deleted the backport-fix-to-allow-ninja-to-use-make-for-generators branch October 17, 2023 13:54
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

Successfully merging this pull request may close these issues.

None yet

3 participants