0
$\begingroup$

I've build a few workspaces for different project but i never got any error, but this time, got this msg.

vyas@vyas-HP-Laptop-14s:~/ROS$ mkdir -p My_turtlesim/src
vyas@vyas-HP-Laptop-14s:~/ROS$ cd My_turtlesim/
vyas@vyas-HP-Laptop-14s:~/ROS/My_turtlesim$ catkin_make
Base path: /home/vyas/ROS/My_turtlesim
Source space: /home/vyas/ROS/My_turtlesim/src
Build space: /home/vyas/ROS/My_turtlesim/build
Devel space: /home/vyas/ROS/My_turtlesim/devel
Install space: /home/vyas/ROS/My_turtlesim/install
Creating symlink "/home/vyas/ROS/My_turtlesim/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/vyas/ROS/My_turtlesim/src -DCATKIN_DEVEL_PREFIX=/home/vyas/ROS/My_turtlesim/devel -DCMAKE_INSTALL_PREFIX=/home/vyas/ROS/My_turtlesim/install -G Unix Makefiles" in "/home/vyas/ROS/My_turtlesim/build"
####
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_policy):
  The OLD behavior for policy CMP0048 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:2 (cmake_policy):
  The OLD behavior for policy CMP0063 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:7 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/vyas/ROS/My_turtlesim/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
CMake Warning (dev) at /opt/ros/noetic/share/catkin/cmake/python.cmake:4 (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):
  /opt/ros/noetic/share/catkin/cmake/all.cmake:164 (include)
  /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:61 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Found PY_em: /usr/lib/python3/dist-packages/em.py  
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/vyas/ROS/My_turtlesim/build/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
CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Warning (dev) at /usr/src/googletest/googletest/cmake/internal_utils.cmake:249 (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):
  /usr/src/googletest/googletest/CMakeLists.txt:91 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") 
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
WARNING: package "moveit_task_constructor_core" should not depend on metapackage "moveit_planners" but on its packages instead
-- Configuring done (1.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/vyas/ROS/My_turtlesim/build
####
#### Running command: "make -j8 -l8" in "/home/vyas/ROS/My_turtlesim/build"

can anyone explain this, also how can i resolve this warning. (I'm using ros noetic on ubuntu 20.04)

These are the apt packages with catkin in there name:

ii  python3-catkin-pkg                                                1.0.0-100                             all          catkin package library
ii  python3-catkin-pkg-modules                                        1.0.0-1                               all          catkin package library
ii  ros-noetic-catkin                                                 0.8.10-1focal.20210423.221558         amd64        Low-level build system macros and infrastructure for ROS.
ii  ros-noetic-pybind11-catkin                                        2.10.3-2focal.20230213.204608         amd64        A package vendoring recent versions of pybind11 and providing extra macros for easier integration.

I've updated the cmake version to 3.16.3 but i'm getting similar msg:

Base path: /home/vyas/ROS/My_turtlesim
Source space: /home/vyas/ROS/My_turtlesim/src
Build space: /home/vyas/ROS/My_turtlesim/build
Devel space: /home/vyas/ROS/My_turtlesim/devel
Install space: /home/vyas/ROS/My_turtlesim/install
Creating symlink "/home/vyas/ROS/My_turtlesim/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/vyas/ROS/My_turtlesim/src -DCATKIN_DEVEL_PREFIX=/home/vyas/ROS/My_turtlesim/devel -DCMAKE_INSTALL_PREFIX=/home/vyas/ROS/My_turtlesim/install -G Unix Makefiles" in "/home/vyas/ROS/My_turtlesim/build"
####
-- 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
-- Using CATKIN_DEVEL_PREFIX: /home/vyas/ROS/My_turtlesim/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Found PY_em: /usr/lib/python3/dist-packages/em.py  
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/vyas/ROS/My_turtlesim/build/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.10") 
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vyas/ROS/My_turtlesim/build
####
#### Running command: "make -j8 -l8" in "/home/vyas/ROS/My_turtlesim/build"
$\endgroup$
3
  • $\begingroup$ My ros-noetic install does not generate those warnings for the commands that you shared. Please edit your question to list the apt packages you have installed which have catkin in the apt package name. $\endgroup$
    – Mike973
    Commented Jan 13 at 19:17
  • $\begingroup$ Also tell us which version of cmake you have installed. It should be v3.16.3. If you have upgraded cmake, your environment is not compatible with ros-noetic. $\endgroup$
    – Mike973
    Commented Jan 13 at 19:26
  • $\begingroup$ my cmake version is 3.27.7 $\endgroup$
    – akash
    Commented Jan 14 at 17:25

2 Answers 2

0
$\begingroup$

You should expect to have weird problems if you use an unsupported version of cmake with ros-noetic. You are expected to use the standard version from the standard ubuntu-20 apt repository.

You need to downgrade your cmake to version 3.16.3. How you do that depends on how you installed the upgrade. If you used apt to upgrade cmake, I expect that you can use apt to downgrade it.

$\endgroup$
3
  • $\begingroup$ How, can I solve this issue?? $\endgroup$
    – akash
    Commented Jan 15 at 7:05
  • $\begingroup$ I updated my answer. $\endgroup$
    – Mike973
    Commented Jan 15 at 14:28
  • $\begingroup$ I've updated the question. $\endgroup$
    – akash
    Commented Jan 16 at 10:16
0
$\begingroup$

These warnings inform us that the Catkin build system uses some features of CMake that are seen as deprecated and will be removed at some point in the future.

Normally, you should just upgrade your project to avoid using deprecated features of CMake, but I understand it is not so easy when the build is tied to the aging Catkin build system or when you are building projects that are not yours and do not plan to maintain them.

As the deprecated features are still supported by the CMake you use, I suggest you ignore these warnings because they are not errors and not something "unclear." Within your project, they be silenced by putting at the top of CMakeLists.txt:

cmake_minimum_required(VERSION 3.27.7)
cmake_policy(SET CMP0148 OLD)

But I suggest not touching CMakeLists.txt of files the projects you just want to build and not edit or maintain.

You may also downgrade CMake as proposed in another answer, but this restricts access to the new features you likely want to learn and use. I think this is not worthwhile as long you still use the backward-compatible CMake version.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.