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

Various Fixes for January Rebuild on Windows #137

Merged
merged 24 commits into from
Feb 12, 2024

Conversation

traversaro
Copy link
Member

Fix part of #136 backporting part of PickNikRobotics/RSL#116 .

@Tobias-Fischer Tobias-Fischer changed the title Add ros-humble-rsl.win.patch Add ros-humble-rsl.win.patch + hardware-interface.patch Feb 9, 2024
@Tobias-Fischer
Copy link
Contributor

Thanks a lot for looking into this @traversaro! I deleted the previous build of yaml-cpp-vendor. Unfortunately our patch does not seem to apply at the moment.

@Tobias-Fischer Tobias-Fischer changed the title Add ros-humble-rsl.win.patch + hardware-interface.patch Various Fixes for January Rebuild on Windows Feb 11, 2024
@traversaro
Copy link
Member Author

traversaro commented Feb 11, 2024

We need a few fixes for shared library support on Windows for ros2_controllers, I will do that.

@Tobias-Fischer
Copy link
Contributor

It would be great if you could also check my hack in b0ea3c3

@traversaro
Copy link
Member Author

It would be great if you could also check my hack in b0ea3c3

Thanks, that seems ok, the problem of ros2_controllers instead is that visibility headers are presents, but they are not used properly.

@traversaro
Copy link
Member Author

We need a few fixes for shared library support on Windows for ros2_controllers, I will do that.

Done in ros-controls/ros2_controllers#1039, let me transform this in patches for each package.

@Tobias-Fischer
Copy link
Contributor

Unfortunately there are still quite a few more visibility related issues:

     Creating library C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707692495805/work/build/Release/ackermann_steering_controller.lib and object C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707692495805/work/build/Release/ackermann_steering_controller.exp
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: bool __cdecl steering_odometry::SteeringOdometry::update_from_position(double,double,double,double,double)" (?update_from_position@SteeringOdometry@steering_odometry@@QEAA_NNNNNN@Z) referenced in function "public: virtual bool __cdecl ackermann_steering_controller::AckermannSteeringController::update_odometry(class rclcpp::Duration const &)" (?update_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA_NAEBVDuration@rclcpp@@@Z) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: bool __cdecl steering_odometry::SteeringOdometry::update_from_velocity(double,double,double,double,double)" (?update_from_velocity@SteeringOdometry@steering_odometry@@QEAA_NNNNNN@Z) referenced in function "public: virtual bool __cdecl ackermann_steering_controller::AckermannSteeringController::update_odometry(class rclcpp::Duration const &)" (?update_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA_NAEBVDuration@rclcpp@@@Z) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: void __cdecl steering_odometry::SteeringOdometry::update_open_loop(double,double,double)" (?update_open_loop@SteeringOdometry@steering_odometry@@QEAAXNNN@Z) referenced in function "public: virtual bool __cdecl ackermann_steering_controller::AckermannSteeringController::update_odometry(class rclcpp::Duration const &)" (?update_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA_NAEBVDuration@rclcpp@@@Z) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: void __cdecl steering_odometry::SteeringOdometry::set_odometry_type(unsigned int)" (?set_odometry_type@SteeringOdometry@steering_odometry@@QEAAXI@Z) referenced in function "public: virtual enum rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn __cdecl ackermann_steering_controller::AckermannSteeringController::configure_odometry(void)" (?configure_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA?AW4CallbackReturn@LifecycleNodeInterface@node_interfaces@rclcpp_lifecycle@@XZ) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: void __cdecl steering_odometry::SteeringOdometry::set_wheel_params(double,double,double)" (?set_wheel_params@SteeringOdometry@steering_odometry@@QEAAXNNN@Z) referenced in function "public: virtual enum rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn __cdecl ackermann_steering_controller::AckermannSteeringController::configure_odometry(void)" (?configure_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA?AW4CallbackReturn@LifecycleNodeInterface@node_interfaces@rclcpp_lifecycle@@XZ) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "protected: enum rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn __cdecl steering_controllers_library::SteeringControllersLibrary::set_interface_numbers(unsigned __int64,unsigned __int64,unsigned __int64)" (?set_interface_numbers@SteeringControllersLibrary@steering_controllers_library@@IEAA?AW4CallbackReturn@LifecycleNodeInterface@node_interfaces@rclcpp_lifecycle@@_K00@Z) referenced in function "public: virtual enum rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn __cdecl ackermann_steering_controller::AckermannSteeringController::configure_odometry(void)" (?configure_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA?AW4CallbackReturn@LifecycleNodeInterface@node_interfaces@rclcpp_lifecycle@@XZ) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2001: unresolved external symbol "protected: virtual class std::vector<class hardware_interface::CommandInterface,class std::allocator<class hardware_interface::CommandInterface> > __cdecl steering_controllers_library::SteeringControllersLibrary::on_export_reference_interfaces(void)" (?on_export_reference_interfaces@SteeringControllersLibrary@steering_controllers_library@@MEAA?AV?$vector@VCommandInterface@hardware_interface@@V?$allocator@VCommandInterface@hardware_interface@@@std@@@std@@XZ) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl steering_controllers_library::SteeringControllersLibrary::on_set_chained_mode(bool)" (?on_set_chained_mode@SteeringControllersLibrary@steering_controllers_library@@MEAA_N_N@Z) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
%SRC_DIR%\build\Release\ackermann_steering_controller.dll : fatal error LNK1120: 8 unresolved externals [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]

@traversaro
Copy link
Member Author

Unfortunately there are still quite a few more visibility related issues:

     Creating library C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707692495805/work/build/Release/ackermann_steering_controller.lib and object C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707692495805/work/build/Release/ackermann_steering_controller.exp
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: bool __cdecl steering_odometry::SteeringOdometry::update_from_position(double,double,double,double,double)" (?update_from_position@SteeringOdometry@steering_odometry@@QEAA_NNNNNN@Z) referenced in function "public: virtual bool __cdecl ackermann_steering_controller::AckermannSteeringController::update_odometry(class rclcpp::Duration const &)" (?update_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA_NAEBVDuration@rclcpp@@@Z) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: bool __cdecl steering_odometry::SteeringOdometry::update_from_velocity(double,double,double,double,double)" (?update_from_velocity@SteeringOdometry@steering_odometry@@QEAA_NNNNNN@Z) referenced in function "public: virtual bool __cdecl ackermann_steering_controller::AckermannSteeringController::update_odometry(class rclcpp::Duration const &)" (?update_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA_NAEBVDuration@rclcpp@@@Z) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: void __cdecl steering_odometry::SteeringOdometry::update_open_loop(double,double,double)" (?update_open_loop@SteeringOdometry@steering_odometry@@QEAAXNNN@Z) referenced in function "public: virtual bool __cdecl ackermann_steering_controller::AckermannSteeringController::update_odometry(class rclcpp::Duration const &)" (?update_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA_NAEBVDuration@rclcpp@@@Z) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: void __cdecl steering_odometry::SteeringOdometry::set_odometry_type(unsigned int)" (?set_odometry_type@SteeringOdometry@steering_odometry@@QEAAXI@Z) referenced in function "public: virtual enum rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn __cdecl ackermann_steering_controller::AckermannSteeringController::configure_odometry(void)" (?configure_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA?AW4CallbackReturn@LifecycleNodeInterface@node_interfaces@rclcpp_lifecycle@@XZ) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "public: void __cdecl steering_odometry::SteeringOdometry::set_wheel_params(double,double,double)" (?set_wheel_params@SteeringOdometry@steering_odometry@@QEAAXNNN@Z) referenced in function "public: virtual enum rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn __cdecl ackermann_steering_controller::AckermannSteeringController::configure_odometry(void)" (?configure_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA?AW4CallbackReturn@LifecycleNodeInterface@node_interfaces@rclcpp_lifecycle@@XZ) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2019: unresolved external symbol "protected: enum rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn __cdecl steering_controllers_library::SteeringControllersLibrary::set_interface_numbers(unsigned __int64,unsigned __int64,unsigned __int64)" (?set_interface_numbers@SteeringControllersLibrary@steering_controllers_library@@IEAA?AW4CallbackReturn@LifecycleNodeInterface@node_interfaces@rclcpp_lifecycle@@_K00@Z) referenced in function "public: virtual enum rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn __cdecl ackermann_steering_controller::AckermannSteeringController::configure_odometry(void)" (?configure_odometry@AckermannSteeringController@ackermann_steering_controller@@UEAA?AW4CallbackReturn@LifecycleNodeInterface@node_interfaces@rclcpp_lifecycle@@XZ) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2001: unresolved external symbol "protected: virtual class std::vector<class hardware_interface::CommandInterface,class std::allocator<class hardware_interface::CommandInterface> > __cdecl steering_controllers_library::SteeringControllersLibrary::on_export_reference_interfaces(void)" (?on_export_reference_interfaces@SteeringControllersLibrary@steering_controllers_library@@MEAA?AV?$vector@VCommandInterface@hardware_interface@@V?$allocator@VCommandInterface@hardware_interface@@@std@@@std@@XZ) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
ackermann_steering_controller.obj : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl steering_controllers_library::SteeringControllersLibrary::on_set_chained_mode(bool)" (?on_set_chained_mode@SteeringControllersLibrary@steering_controllers_library@@MEAA_N_N@Z) [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]
%SRC_DIR%\build\Release\ackermann_steering_controller.dll : fatal error LNK1120: 8 unresolved externals [%SRC_DIR%\build\ackermann_steering_controller.vcxproj]

I tried to fix this in 05aaac5 (see ros-controls/ros2_controllers@master...traversaro:ros2_controllers:steeringexport). However, I suspect all these ros2_controllers code was never compiled on Windows, so it may be easier for me to set the compilation locally to be able to iterate faster.

@traversaro
Copy link
Member Author

However, I suspect all these ros2_controllers code was never compiled on Windows, so it may be easier for me to set the compilation locally to be able to iterate faster.

As expected, we have a new failure exactly for the following package:

2024-02-12T11:32:50.9768184Z   Running `C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/_h_env/Library/bin/generate_parameter_library_cpp.exe C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/build/admittance_controller_parameters/include//admittance_controller_parameters.hpp C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/ros-humble-admittance-controller/src/work/src/admittance_controller_parameters.yaml `
2024-02-12T11:32:50.9771963Z   Building Custom Rule C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/ros-humble-admittance-controller/src/work/CMakeLists.txt
2024-02-12T11:32:50.9773205Z   Ignoring COMPILE_WARNING_AS_ERROR target property and CMAKE_COMPILE_WARNING_AS_ERROR variable.
2024-02-12T11:32:50.9774312Z   Building Custom Rule C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/ros-humble-admittance-controller/src/work/CMakeLists.txt
2024-02-12T11:32:50.9775380Z   Ignoring COMPILE_WARNING_AS_ERROR target property and CMAKE_COMPILE_WARNING_AS_ERROR variable.
2024-02-12T11:32:50.9775934Z   admittance_controller.cpp
2024-02-12T11:32:50.9777259Z      Creating library C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/build/Release/admittance_controller.lib and object C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/build/Release/admittance_controller.exp
2024-02-12T11:32:50.9779818Z admittance_controller.obj : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl controller_interface::ChainableControllerInterface::on_set_chained_mode(bool)" (?on_set_chained_mode@ChainableControllerInterface@controller_interface@@MEAA_N_N@Z) [%SRC_DIR%\build\admittance_controller.vcxproj]
2024-02-12T11:32:50.9781666Z %SRC_DIR%\build\Release\admittance_controller.dll : fatal error LNK1120: 1 unresolved externals [%SRC_DIR%\build\admittance_controller.vcxproj]

@traversaro
Copy link
Member Author

However, I suspect all these ros2_controllers code was never compiled on Windows, so it may be easier for me to set the compilation locally to be able to iterate faster.

As expected, we have a new failure exactly for the following package:

2024-02-12T11:32:50.9768184Z   Running `C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/_h_env/Library/bin/generate_parameter_library_cpp.exe C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/build/admittance_controller_parameters/include//admittance_controller_parameters.hpp C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/ros-humble-admittance-controller/src/work/src/admittance_controller_parameters.yaml `
2024-02-12T11:32:50.9771963Z   Building Custom Rule C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/ros-humble-admittance-controller/src/work/CMakeLists.txt
2024-02-12T11:32:50.9773205Z   Ignoring COMPILE_WARNING_AS_ERROR target property and CMAKE_COMPILE_WARNING_AS_ERROR variable.
2024-02-12T11:32:50.9774312Z   Building Custom Rule C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/ros-humble-admittance-controller/src/work/CMakeLists.txt
2024-02-12T11:32:50.9775380Z   Ignoring COMPILE_WARNING_AS_ERROR target property and CMAKE_COMPILE_WARNING_AS_ERROR variable.
2024-02-12T11:32:50.9775934Z   admittance_controller.cpp
2024-02-12T11:32:50.9777259Z      Creating library C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/build/Release/admittance_controller.lib and object C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1707731398549/work/build/Release/admittance_controller.exp
2024-02-12T11:32:50.9779818Z admittance_controller.obj : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl controller_interface::ChainableControllerInterface::on_set_chained_mode(bool)" (?on_set_chained_mode@ChainableControllerInterface@controller_interface@@MEAA_N_N@Z) [%SRC_DIR%\build\admittance_controller.vcxproj]
2024-02-12T11:32:50.9781666Z %SRC_DIR%\build\Release\admittance_controller.dll : fatal error LNK1120: 1 unresolved externals [%SRC_DIR%\build\admittance_controller.vcxproj]

Fix ros-controls/ros2_control@master...traversaro:ros2_control:patch-2 .

@traversaro
Copy link
Member Author

@Tobias-Fischer Green CI!

@Tobias-Fischer Tobias-Fischer merged commit ef86fee into RoboStack:main Feb 12, 2024
5 checks passed
@Tobias-Fischer
Copy link
Contributor

Thanks so much @traversaro for all the fixes :)!!!

@Tobias-Fischer
Copy link
Contributor

Hopefully there won't be many more patches needed for the remaining packages - I'll trigger another PR as soon as these packages are built.

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.

2 participants