RoboStack / ros-humble

Recipes for ROS 2 Humble Hawksbill
81 stars 32 forks source link

Fix Windows build follow up and enable more Windows packages #143

Closed traversaro closed 3 months ago

traversaro commented 3 months ago

Remove a regression of https://github.com/RoboStack/ros-humble/pull/141 .

traversaro commented 3 months ago

I tried to enable a couple new package, now failing with:

fetch: 3 objects found, done.
fetch: Fetching all references...
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
error: failed to fetch some objects from 'https://github.com/ros2-gbp/moveit_resources-release.git/info/lfs'
fatal: destination path 'C:\Users\runneradmin\micromamba\envs\testpr_env\conda-bld\git_cache\github.com\ros2-gbp\moveit_resources-release.git' already exists and is not an empty directory.
Traceback (most recent call last):
  File "C:\Users\runneradmin\micromamba\envs\testpr_env\Lib\site-packages\conda_build\source.py", line 322, in git_mirror_checkout_recursive
    git_lfs_fetch(git, mirror_dir, stdout, stderr)
  File "C:\Users\runneradmin\micromamba\envs\testpr_env\Lib\site-packages\conda_build\source.py", line 215, in git_lfs_fetch
    check_call_env(
  File "C:\Users\runneradmin\micromamba\envs\testpr_env\Lib\site-packages\conda_build\utils.py", line 445, in check_call_env
    return _func_defaulting_env_to_os_environ("call", *popenargs, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\runneradmin\micromamba\envs\testpr_env\Lib\site-packages\conda_build\utils.py", line 436, in _func_defaulting_env_to_os_environ
    subprocess.check_call(_args, **kwargs)
  File "C:\Users\runneradmin\micromamba\envs\testpr_env\Lib\subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\Git\\cmd\\git.exe', 'lfs', 'fetch', 'origin', '--all']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

That I guess is already tracked in https://github.com/ros2-gbp/moveit_resources-release/issues/1 .

traversaro commented 3 months ago
2024-02-13T22:50:33.6748965Z RuntimeError: Solver could not find solution.Mamba failed to solve:
2024-02-13T22:50:33.6749430Z  - gflags 2.2.*
2024-02-13T22:50:33.6749677Z  - libignition-gazebo6
2024-02-13T22:50:33.6749917Z  - libignition-math6
2024-02-13T22:50:33.6750148Z  - numpy 1.23.*
2024-02-13T22:50:33.6750351Z  - pip
2024-02-13T22:50:33.6750531Z  - pkg-config
2024-02-13T22:50:33.6750735Z  - pkg-config
2024-02-13T22:50:33.6750943Z  - python 3.11.* *_cpython
2024-02-13T22:50:33.6751200Z  - ros-humble-ament-cmake
2024-02-13T22:50:33.6751475Z  - ros-humble-ament-index-python
2024-02-13T22:50:33.6751772Z  - ros-humble-ament-lint-auto
2024-02-13T22:50:33.6752053Z  - ros-humble-ament-lint-common
2024-02-13T22:50:33.6752342Z  - ros-humble-rclcpp
2024-02-13T22:50:33.6752590Z  - ros-humble-ros-environment
2024-02-13T22:50:33.6752861Z  - ros-humble-ros-workspace
2024-02-13T22:50:33.6753121Z  - ros-humble-std-msgs
2024-02-13T22:50:33.6753381Z  - ros2-distro-mutex 0.5.* humble
2024-02-13T22:50:33.6753649Z  - vc >=14.2,<15
2024-02-13T22:50:33.6753871Z  - vc14_runtime >=14.29.30139
2024-02-13T22:50:33.6754124Z  - ucrt >=10.0.20348.0
2024-02-13T22:50:33.6754270Z 
2024-02-13T22:50:33.6754348Z with channels:
2024-02-13T22:50:33.6754516Z 
2024-02-13T22:50:33.6754606Z The reported errors are:
2024-02-13T22:50:33.6754883Z - Encountered problems while solving:
2024-02-13T22:50:33.6755343Z -   - package libignition-gazebo6-6.0.0-hf633310_0 requires tinyxml2 
2024-02-13T22:50:33.6755881Z >=9.0.0,<10.0a0, but none of the providers can be installed
2024-02-13T22:50:33.6756245Z - 
traversaro commented 3 months ago
2024-02-13T22:50:33.6748965Z RuntimeError: Solver could not find solution.Mamba failed to solve:
2024-02-13T22:50:33.6749430Z  - gflags 2.2.*
2024-02-13T22:50:33.6749677Z  - libignition-gazebo6
2024-02-13T22:50:33.6749917Z  - libignition-math6
2024-02-13T22:50:33.6750148Z  - numpy 1.23.*
2024-02-13T22:50:33.6750351Z  - pip
2024-02-13T22:50:33.6750531Z  - pkg-config
2024-02-13T22:50:33.6750735Z  - pkg-config
2024-02-13T22:50:33.6750943Z  - python 3.11.* *_cpython
2024-02-13T22:50:33.6751200Z  - ros-humble-ament-cmake
2024-02-13T22:50:33.6751475Z  - ros-humble-ament-index-python
2024-02-13T22:50:33.6751772Z  - ros-humble-ament-lint-auto
2024-02-13T22:50:33.6752053Z  - ros-humble-ament-lint-common
2024-02-13T22:50:33.6752342Z  - ros-humble-rclcpp
2024-02-13T22:50:33.6752590Z  - ros-humble-ros-environment
2024-02-13T22:50:33.6752861Z  - ros-humble-ros-workspace
2024-02-13T22:50:33.6753121Z  - ros-humble-std-msgs
2024-02-13T22:50:33.6753381Z  - ros2-distro-mutex 0.5.* humble
2024-02-13T22:50:33.6753649Z  - vc >=14.2,<15
2024-02-13T22:50:33.6753871Z  - vc14_runtime >=14.29.30139
2024-02-13T22:50:33.6754124Z  - ucrt >=10.0.20348.0
2024-02-13T22:50:33.6754270Z 
2024-02-13T22:50:33.6754348Z with channels:
2024-02-13T22:50:33.6754516Z 
2024-02-13T22:50:33.6754606Z The reported errors are:
2024-02-13T22:50:33.6754883Z - Encountered problems while solving:
2024-02-13T22:50:33.6755343Z -   - package libignition-gazebo6-6.0.0-hf633310_0 requires tinyxml2 
2024-02-13T22:50:33.6755881Z >=9.0.0,<10.0a0, but none of the providers can be installed
2024-02-13T22:50:33.6756245Z - 

This is a consequence of https://github.com/conda-forge/libignition-gazebo-feedstock/pull/59#issuecomment-1902107706 and https://github.com/conda-forge/dartsim-feedstock/pull/43#issuecomment-1743074655 .

Tobias-Fischer commented 3 months ago

It's very odd - on buildbranch_win, we're failing with:

C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__struct.hpp(143,28): error C2059: syntax error: 'constant' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__struct.hpp(216): message : see reference to class template instantiation 'controller_manager_msgs::srv::SwitchController_Request_<ContainerAllocator>' being compiled [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__struct.hpp(144,1): error C2238: unexpected token(s) preceding ';' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__struct.hpp(231,66): error C2589: 'constant': illegal token on right side of '::' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__struct.hpp(231): error C2062: type 'unknown-type' unexpected [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__builder.hpp(28,3): error C2059: syntax error: ':' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__builder.hpp(44,3): error C2059: syntax error: ':' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__builder.hpp(60,3): error C2059: syntax error: ':' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__builder.hpp(76,3): error C2059: syntax error: ':' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__builder.hpp(92,3): error C2059: syntax error: ':' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__builder.hpp(108,3): error C2059: syntax error: ':' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__builder.hpp(124,3): error C2059: syntax error: ':' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]
C:/bld/ros-humble-gazebo-ros2-control-0_1707878560410/_h_env/Library/include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__builder.hpp(140,3): error C2059: syntax error: ':' [%SRC_DIR%\build\gazebo_ros2_control.vcxproj]

This does not seem to happen here. I have no idea what the difference is. I already patched some other stuff in gazebo-ros2-control, see https://github.com/RoboStack/ros-humble/blob/main/patch/ros-humble-gazebo-ros2-control.patch

Any idea what this one is about @traversaro?

traversaro commented 3 months ago

For reference, this is the related code in include/controller_manager_msgs\controller_manager_msgs/srv/detail/switch_controller__struct.hpp:

  // constant declarations
  static constexpr int32_t BEST_EFFORT =
    1;
  static constexpr int32_t STRICT =
    2;

where in particular the static constexpr int32_t STRICT = is line 143 . Apparently STRICT is a Windows macro (see https://learn.microsoft.com/en-us/windows/win32/winprog/enabling-strict), so I guess there is some subtle difference for which that symbols get defined in azure and not in GitHub Actions (perhaps some difference in Windows SDK or Compiler version, thank changes the transitive include included?).

Tobias-Fischer commented 3 months ago

We use GitHub actions for both PRs and the main branches these days. We should add the cleanup path action to the generate gha script in vinca, maybe that would help?

traversaro commented 3 months ago

We use GitHub actions for both PRs and the main branches these days. We should add the cleanup path action to the generate gha script in vinca, maybe that would help?

Good point, I forgot that. We already do something similar to that in https://github.com/RoboStack/ros-humble/blob/e1cbca34dd2b7c14257ed1941d80a7614a47769b/.github/workflows/win.yml#L47-L60, but I can't see how this is related. Something that may be more related is https://github.com/RoboStack/ros-humble/blob/e1cbca34dd2b7c14257ed1941d80a7614a47769b/.github/workflows/win.yml#L110 . The logic of CMake (if I recall correctly) is to use the older Windows SDK it founds. Perhaps the Windows SDK that we remove is the one that works? At least for try we can remove the same SDK in the PR and check if we have the same problem.

traversaro commented 3 months ago

By the way, now also in the PR we have a similar (but different) failure:

2024-02-14T08:51:35.9409115Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include/ignition/math6\gz/math/Vector3.hh(770): message : see declaration of 'ignition::math::v6::Vector3<double>' [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9413840Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include\hardware_interface/types/hardware_interface_return_values.hpp(25,3): error C2143: syntax error: missing '}' before 'constant' [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9417494Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include\hardware_interface/types/hardware_interface_return_values.hpp(25,3): error C2059: syntax error: 'constant' [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9421388Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include\hardware_interface/types/hardware_interface_return_values.hpp(26,1): error C2143: syntax error: missing ';' before '}' [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9425381Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include\hardware_interface/types/hardware_interface_return_values.hpp(28,1): error C2059: syntax error: '}' [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9429271Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include\hardware_interface/types/hardware_interface_return_values.hpp(28,1): error C2143: syntax error: missing ';' before '}' [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9433248Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include\hardware_interface/types/lifecycle_state_names.hpp(23,1): error C2143: syntax error: missing ';' before '{' [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9437230Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include\hardware_interface/types/lifecycle_state_names.hpp(23,1): error C2447: '{': missing function header (old-style formal list?) [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9441262Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include\hardware_interface/system_interface.hpp(77,58): error C2653: 'lifecycle_state_names': is not a class or namespace name [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9445065Z C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707899074550/_h_env/Library/include\hardware_interface/system_interface.hpp(77,81): error C2065: 'UNKNOWN': undeclared identifier [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
2024-02-14T08:51:35.9449324Z %PREFIX%\Library\include\gazebo-11\gazebo/sensors/Sensor.hh(53,5): warning C4251: 'std::enable_shared_from_this<gazebo::sensors::Sensor>::_Wptr': class 'std::weak_ptr<_Ty>' needs to have dll-interface to be used by clients of class 'std::enable_shared_from_this<gazebo::sensors::Sensor>' [%SRC_DIR%\build\gazebo_hardware_plugins.vcxproj]
Tobias-Fischer commented 3 months ago

It seems like this is the good old issue of a polluted global namespace, in this case ERROR: https://github.com/ros-controls/ros2_control/blob/7ea4f4dd0686d3306889c6149430893be5156fec/hardware_interface/include/hardware_interface/types/hardware_interface_return_values.hpp#L25