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
Then I issued colcon build and got an error when compiling kobuki_core
--- stderr: kobuki_core
In file included from /home/ubuntu/ros2_ws/install/sophus/include/sophus/types.hpp:7,
from /home/ubuntu/ros2_ws/install/sophus/include/sophus/rotation_matrix.hpp:9,
from /home/ubuntu/ros2_ws/install/sophus/include/sophus/so3.hpp:6,
from /home/ubuntu/ros2_ws/install/sophus/include/sophus/se3.hpp:6,
from /home/ubuntu/ros2_ws/install/ecl_linear_algebra/include/ecl/linear_algebra/sophus.hpp:15,
from /home/ubuntu/ros2_ws/install/ecl_linear_algebra/include/ecl/linear_algebra.hpp:25,
from /home/ubuntu/ros2_ws/install/ecl_geometry/include/ecl/geometry/pose2d.hpp:21,
from /home/ubuntu/ros2_ws/install/ecl_geometry/include/ecl/geometry.hpp:20,
from /home/ubuntu/ros2_ws/src/kobuki_core/src/driver/../../include/kobuki_core/modules/diff_drive.hpp:23,
from /home/ubuntu/ros2_ws/src/kobuki_core/src/driver/diff_drive.cpp:14:
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:206:45: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
206 | SOPHUS_ENSURE(is_valid_, "must be valid");
| ^
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:139:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
139 | SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
| ^~~~~~~~
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:139:69: note: in definition of macro ‘SOPHUS_ENSURE’
139 | SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
| ^~~~~~~~
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:211:45: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
211 | SOPHUS_ENSURE(is_valid_, "must be valid");
| ^
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:139:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
139 | SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
| ^~~~~~~~
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:139:69: note: in definition of macro ‘SOPHUS_ENSURE’
139 | SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
| ^~~~~~~~
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:216:45: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
216 | SOPHUS_ENSURE(is_valid_, "must be valid");
| ^
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:139:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
139 | SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
| ^~~~~~~~
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:139:69: note: in definition of macro ‘SOPHUS_ENSURE’
139 | SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
| ^~~~~~~~
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:221:45: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
221 | SOPHUS_ENSURE(is_valid_, "must be valid");
| ^
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:139:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
139 | SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
| ^~~~~~~~
/home/ubuntu/ros2_ws/install/sophus/include/sophus/common.hpp:139:69: note: in definition of macro ‘SOPHUS_ENSURE’
139 | SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
.............
If I'm not wrong, due to the ecl_enable_cxx14_compiler() , the CMAKE_CXX_STANDARD is set to C++14.
I do not know if this is the correct fix , but then I added set(CMAKE_CXX_STANDARD 20) just after the ecl_enable_xxxxx in the kobuki_core/CMakeLists.txt and then the compilation succeded.
It has something to do with variadic macros and I blindly applied this standard change by going through this gnu gcc doc page telling C++20 is less restrictive on variadic macros.
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to compile kobuki_core for ros2 humble.
I git cloned the package list
Then I issued
colcon build
and got an error when compiling kobuki_coreIf I'm not wrong, due to the ecl_enable_cxx14_compiler() , the CMAKE_CXX_STANDARD is set to C++14.
I do not know if this is the correct fix , but then I added
set(CMAKE_CXX_STANDARD 20)
just after the ecl_enable_xxxxx in thekobuki_core/CMakeLists.txt
and then the compilation succeded.It has something to do with variadic macros and I blindly applied this standard change by going through this gnu gcc doc page telling C++20 is less restrictive on variadic macros.
The text was updated successfully, but these errors were encountered: