eProsima / Micro-XRCE-DDS-Agent

Micro XRCE-DDS Agent respository. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
112 stars 81 forks source link

need a way to disable asio, tinyxml2, fastcdr and fastrts and take them from the colcon build instead #168

Open razr opened 4 years ago

razr commented 4 years ago

Hello @julibert, I did this, but it does not help.

diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake
index 3095517..a47b61c 100644
--- a/cmake/SuperBuild.cmake
+++ b/cmake/SuperBuild.cmake
@@ -49,7 +49,7 @@ endif()

 # Fast CDR.
 unset(fastcdr_DIR CACHE)
-find_package(fastcdr ${_fastcdr_version} EXACT QUIET)
+find_package(fastcdr ${_fastcdr_version} QUIET)
 if(NOT fastcdr_FOUND)
     ExternalProject_Add(fastcdr
         GIT_REPOSITORY
@@ -80,7 +80,7 @@ endif()
 if(UAGENT_FAST_PROFILE)
     # Fast RTPS.
     unset(fastrtps_DIR CACHE)
-    find_package(fastrtps ${_fastrtps_version} EXACT QUIET)
+    find_package(fastrtps ${_fastrtps_version} QUIET)
     if(NOT fastrtps_FOUND)
         ExternalProject_Add(fastrtps
             GIT_REPOSITORY
@@ -242,4 +242,4 @@ ExternalProject_Add(uagent

It still tries to build fastrtps. I need a way to disable asio, tinyxml2, fastcdr and fastrts

241.664s] CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
[241.664s]   Could NOT find Threads (missing: Threads_FOUND)
[241.664s] Call Stack (most recent call first):
[241.664s]   /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
[241.664s]   cmake/modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
[241.664s]   src/cpp/CMakeLists.txt:245 (find_package)
[241.665s]
[241.665s]
[241.665s] -- Configuring incomplete, errors occurred!
[241.665s] See also "/home/akholodn/github/Wind-River/vxworks7-ros2-build/build/ros2/ros2_ws/build/microxrcedds_agent/fastrtps/src/fastrtps-build/CMakeFiles/CMakeOutput.log".
[241.665s] See also "/home/akholodn/github/Wind-River/vxworks7-ros2-build/build/ros2/ros2_ws/build/microxrcedds_agent/fastrtps/src/fastrtps-build/CMakeFiles/CMakeError.log".
julionce commented 4 years ago

Hi @razr,

I have some questions about your environment:

It seems that CMake is not able to find FastRTPS neither FastCDR and that is because they are not in any path that CMake is searching for. Therefore I would try to source the ROS 2 installation or add -DCMAKE_PREFIX_PATH=<fast-path> flag to Agent build.

razr commented 4 years ago

@julibert, I have successfully built FastRTPS with my patches applied as a part of the ROS2 source build. So, it finds properly FastRTPS libs e.g. while building rmw etc. Why it should be different here. But let me check.

razr commented 4 years ago

@pablogs9, even I'm on your dashing release for Micro-XRCE-DDS-Agent

akholodn@windix:~/github/Wind-River/vxworks7-ros2-build/build/ros2/ros2_ws/src/eProsima/Micro-XRCE-DDS-Agent$ git branch
* dashing

I see that you are building your own Fast-RTPS version 1.8.3 instead of an official one from the ROS2 dashing repo which is 1.8.2

  eProsima/Fast-RTPS:
    type: git
    url: https://github.com/eProsima/Fast-RTPS.git
    version: v1.8.2

I have patched CMakeFiles.txt and it takes 1.8.2 now from my build but fails here:

/home/akholodn/github/Wind-River/vxworks7-ros2-build/build/ros2/ros2_ws/src/eProsima/Micro-XRCE-DDS-Agent/src/cpp/xmlobjects/xmlobjects.cpp:18:10: fatal error: 'fastrtps/attributes/ReplierAttributes.hpp' file not found
#include <fastrtps/attributes/ReplierAttributes.hpp>
julionce commented 4 years ago

Hi @razr,

We need that Fast RTPS version because it has support for Requester and Replier entities, which are the entities Micro XRCE-DDS uses to handle services in micro-ROS. Is there any possibility to compile this particular version for the Agent?