ros2-dotnet / ros2_dotnet

.NET bindings for ROS2
Apache License 2.0
139 stars 57 forks source link

Issues building for humble using pre-build binaries LNK1104 #115

Closed InfoShellTex closed 1 year ago

InfoShellTex commented 1 year ago

Hello, I'm new to ros2 and tried building various things and sheesh my head hurts lol. My Environment: Windows 10 .NET Core 6 and 7 installed Visual Studio 2022 (I also have 2019 installed as well) I use the visual studio 2022 Developer PowerShell terminal for doing all these commands I've installed all the Prerequisites listed here from binary and here from source

I was using following the pre-built binary packages instructions I have it installed/unzipped at "C:\ProgramFilesAlt\Ros2Humble". Following this repos README, i create a directory "C:\ProgramFilesAlt\Ros2Workspaces\ros2_dotnet". From there i call the "C:\ProgramFilesAlt\Ros2Humble\local_setup.ps1" and then continue the windows desktop instructions. For the curl command i had to use "curl -s -k https://raw.githubusercontent.com/ros2-dotnet/ros2_dotnet/main/ros2_dotnet_humble.repos -o ros2_dotnet_humble.repos". I basically replace "foxy" with "humble" in these instructions. After running the build command, this is the error: [Processing: builtin_interfaces, lifecycle_msgs, rosidl_typesupport_introspection_tests, std_srvs, unique_identifier_msgs] --- stderr: unique_identifier_msgs CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed tofind_package_handle_standard_args (DOTNET_CORE) does not match the name of the calling package (DotNetCore). This can lead to problems in calling code that expectsfind_package result variables (e.g.,_FOUND`) to follow a certain pattern. Call Stack (most recent call first): C:/ProgramFilesAlt/Ros2Workspaces/ros2_dotnet/install/share/dotnet_cmake_module/cmake/Modules/dotnet/FindDotNetCore.cmake:37 (find_package_handle_standard_args) C:/ProgramFilesAlt/Ros2Workspaces/ros2_dotnet/install/share/dotnet_cmake_module/cmake/Modules/FindCSBuild.cmake:20 (find_package) C:/ProgramFilesAlt/Ros2Workspaces/ros2_dotnet/install/share/dotnet_cmake_module/cmake/Modules/FindDotNETExtra.cmake:15 (find_package) C:/ProgramFilesAlt/Ros2Workspaces/ros2_dotnet/install/share/rosidl_generator_dotnet/cmake/rosidl_generator_dotnet_generate_interfaces.cmake:23 (find_package) C:/ProgramFilesAlt/Ros2Humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include) C:/ProgramFilesAlt/Ros2Workspaces/ros2_dotnet/install/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions) CMakeLists.txt:21 (rosidl_generate_interfaces) This warning is for project developers. Use -Wno-dev to suppress it.

ERRORFailed to load RTI Connext DDS Micro CMake Deprecation Warning at C:/ProgramFilesAlt/Ros2Workspaces/ros2_dotnet/install/share/rosidl_cmake/cmake/rosidl_target_interfaces.cmake:32 (message): Use rosidl_get_typesupport_target() and target_link_libraries() instead of rosidl_target_interfaces() Call Stack (most recent call first): C:/ProgramFilesAlt/Ros2Workspaces/ros2_dotnet/install/share/rosidl_generator_dotnet/cmake/rosidl_generator_dotnet_generate_interfaces.cmake:203 (rosidl_target_interfaces) C:/ProgramFilesAlt/Ros2Humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include) C:/ProgramFilesAlt/Ros2Workspaces/ros2_dotnet/install/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions) CMakeLists.txt:21 (rosidl_generate_interfaces)


Failed <<< unique_identifier_msgs [48.3s, exited with code 1] Aborted <<< builtin_interfaces [49.6s] Aborted <<< std_srvs [51.2s] Aborted <<< lifecycle_msgs [1min 4s] Aborted <<< rosidl_typesupport_introspection_tests [2min 31s]

Summary: 18 packages finished [4min 55s] 1 package failed: unique_identifier_msgs 4 packages aborted: builtin_interfaces lifecycle_msgs rosidl_typesupport_introspection_tests std_srvs 7 packages had stderr output: builtin_interfaces lifecycle_msgs rcldotnet_common rosidl_cli rosidl_typesupport_introspection_tests std_srvs unique_identifier_msgs 20 packages not processed WNDPROC return value cannot be converted to LRESULT TypeError: WPARAM is simple, so must be an int object (got NoneType)`

After checking the logs, this is the contents of the "C:\ProgramFilesAlt\Ros2Workspaces\ros2_dotnet\log\latest_build\unique_identifier_msgs\stdout_stderr.log": Ive attached the log stdout_stderr.log

or TLDR: I get "LINK : fatal error LNK1104: cannot open file 'fastcdr-1.0.lib' [C:\ProgramFilesAlt\Ros2Workspaces\ros2_dotnet\build\unique_identifier_msgs\unique_identifier_msgsrosidl_typesupport_fastrtps_c.vcxproj] Generating C++ type support for eProsima Fast-RTPS Building Custom Rule C:/ProgramFilesAlt/Ros2Workspaces/ros2_dotnet/src/ros2/unique_identifier_msgs/CMakeLists.txt uuidtype_support.cpp"

Any help is appreciated