ros2-gbp / sophus-release

0 stars 3 forks source link

About rollback version in rolling/jazzy distro #3

Open wep21 opened 4 months ago

wep21 commented 4 months ago

The version in rolling/jazzy distro is old one which causes compiler warning when using macros.

wep21 commented 4 months ago

@clalancette is it possible to release 1.3.x to jazzy/rolling distro?

clalancette commented 4 months ago

@clalancette is it possible to release 1.3.x to jazzy/rolling distro?

No, that is the old version and doesn't compile on Jazzy and Rolling. The version that is currently released (1.22.x) should compile without warnings; see https://build.ros2.org/job/Rbin_uN64__sophus__ubuntu_noble_amd64__binary/. What problems are you running into?

wep21 commented 4 months ago

Does 1.22.x include this change? I have met the error below in jazzy.

In file included from /opt/ros/jazzy/include/sophus/types.hpp:7,
                 from /opt/ros/jazzy/include/sophus/rotation_matrix.hpp:9,
                 from /opt/ros/jazzy/include/sophus/so2.hpp:12,
                 from /opt/ros/jazzy/include/sophus/se2.hpp:6,
                 from /opt/ros/jazzy/include/sophus/geometry.hpp:6,
                 from /home/daisuke/workspace/autoware/src/universe/autoware.universe/localization/yabloc/yabloc_particle_filter/src/prediction/predictor.cpp:22:
/opt/ros/jazzy/include/sophus/common.hpp:213:45: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  213 |     SOPHUS_ENSURE(is_valid_, "must be valid");
      |                                             ^
/opt/ros/jazzy/include/sophus/common.hpp:146:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  146 |       SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
      |                                                                     ^~~~~~~~
/opt/ros/jazzy/include/sophus/common.hpp:213:5: note: in expansion of macro ‘SOPHUS_ENSURE’
  213 |     SOPHUS_ENSURE(is_valid_, "must be valid");
      |     ^~~~~~~~~~~~~
/opt/ros/jazzy/include/sophus/common.hpp:218:45: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  218 |     SOPHUS_ENSURE(is_valid_, "must be valid");
      |                                             ^
/opt/ros/jazzy/include/sophus/common.hpp:146:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  146 |       SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
      |                                                                     ^~~~~~~~
/opt/ros/jazzy/include/sophus/common.hpp:218:5: note: in expansion of macro ‘SOPHUS_ENSURE’
  218 |     SOPHUS_ENSURE(is_valid_, "must be valid");
      |     ^~~~~~~~~~~~~
/opt/ros/jazzy/include/sophus/common.hpp:223:45: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  223 |     SOPHUS_ENSURE(is_valid_, "must be valid");
      |                                             ^
/opt/ros/jazzy/include/sophus/common.hpp:146:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  146 |       SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
      |                                                                     ^~~~~~~~
/opt/ros/jazzy/include/sophus/common.hpp:223:5: note: in expansion of macro ‘SOPHUS_ENSURE’
  223 |     SOPHUS_ENSURE(is_valid_, "must be valid");
      |     ^~~~~~~~~~~~~
/opt/ros/jazzy/include/sophus/common.hpp:228:45: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  228 |     SOPHUS_ENSURE(is_valid_, "must be valid");
      |                                             ^
/opt/ros/jazzy/include/sophus/common.hpp:146:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  146 |       SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
      |                                                                     ^~~~~~~~
/opt/ros/jazzy/include/sophus/common.hpp:228:5: note: in expansion of macro ‘SOPHUS_ENSURE’
  228 |     SOPHUS_ENSURE(is_valid_, "must be valid");
      |     ^~~~~~~~~~~~~
/opt/ros/jazzy/include/sophus/so2.hpp:178:64: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  178 |                   "Complex number should not be close to zero!");
      |                                                                ^
/opt/ros/jazzy/include/sophus/common.hpp:146:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  146 |       SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
      |                                                                     ^~~~~~~~
/opt/ros/jazzy/include/sophus/so2.hpp:177:5: note: in expansion of macro ‘SOPHUS_ENSURE’
  177 |     SOPHUS_ENSURE(length >= Constants<Scalar>::epsilon(),
      |     ^~~~~~~~~~~~~
/opt/ros/jazzy/include/sophus/se2.hpp:663:66: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  663 |     SOPHUS_ENSURE(i >= 0 || i <= 2, "i should be in range [0,2].");
      |                                                                  ^
/opt/ros/jazzy/include/sophus/common.hpp:146:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  146 |       SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
      |                                                                     ^~~~~~~~
/opt/ros/jazzy/include/sophus/se2.hpp:663:5: note: in expansion of macro ‘SOPHUS_ENSURE’
  663 |     SOPHUS_ENSURE(i >= 0 || i <= 2, "i should be in range [0,2].");
      |     ^~~~~~~~~~~~~
In file included from /opt/ros/jazzy/include/sophus/se3.hpp:6,
                 from /opt/ros/jazzy/include/sophus/geometry.hpp:7:
/opt/ros/jazzy/include/sophus/so3.hpp:696:59: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  696 |     SOPHUS_ENSURE(theta != nullptr, "must not be nullptr.");
      |                                                           ^
/opt/ros/jazzy/include/sophus/common.hpp:146:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  146 |       SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
      |                                                                     ^~~~~~~~
/opt/ros/jazzy/include/sophus/so3.hpp:696:5: note: in expansion of macro ‘SOPHUS_ENSURE’
  696 |     SOPHUS_ENSURE(theta != nullptr, "must not be nullptr.");
      |     ^~~~~~~~~~~~~
/opt/ros/jazzy/include/sophus/so3.hpp:762:66: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  762 |     SOPHUS_ENSURE(i >= 0 && i <= 2, "i should be in range [0,2].");
      |                                                                  ^
/opt/ros/jazzy/include/sophus/common.hpp:146:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  146 |       SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
      |                                                                     ^~~~~~~~
/opt/ros/jazzy/include/sophus/so3.hpp:762:5: note: in expansion of macro ‘SOPHUS_ENSURE’
  762 |     SOPHUS_ENSURE(i >= 0 && i <= 2, "i should be in range [0,2].");
      |     ^~~~~~~~~~~~~
/opt/ros/jazzy/include/sophus/se3.hpp:911:66: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  911 |     SOPHUS_ENSURE(i >= 0 && i <= 5, "i should be in range [0,5].");
      |                                                                  ^
/opt/ros/jazzy/include/sophus/common.hpp:146:69: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
  146 |       SOPHUS_DEDAULT_ENSURE_FAILURE_IMPL(SOPHUS_FUNCTION, __FILE__, __LINE__, \
      |                                                                     ^~~~~~~~
/opt/ros/jazzy/include/sophus/se3.hpp:911:5: note: in expansion of macro ‘SOPHUS_ENSURE’
  911 |     SOPHUS_ENSURE(i >= 0 && i <= 5, "i should be in range [0,5].");
      |     ^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/predictor.dir/build.make:76: CMakeFiles/predictor.dir/src/prediction/predictor.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:702: CMakeFiles/predictor.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< yabloc_particle_filter [14.8s, exited with code 2]

Summary: 27 packages finished [21.2s]
  1 package failed: yabloc_particle_filter
  2 packages had stderr output: yabloc_common yabloc_particle_filter
wep21 commented 4 months ago

I confirmed cherry-picking the commit fixes the issue.

clalancette commented 4 months ago

I confirmed cherry-picking the commit fixes the issue.

All right, that is probably the right solution then. Please feel free to open a PR to https://github.com/clalancette/sophus (targeting the release/1.22.x branch) and I'm happy to review it.