Open mpconte opened 2 years ago
The issues with getifaddrs
and pthreads are somewhat strange: I would not expect problems there. Unfortunately, I don't have any experience using the Android NDK. Possibly building via colcon
doesn't allow you to control the build settings, like https://github.com/eclipse-cyclonedds/cyclonedds/tree/master/ports/android suggests?
The issues in the IDL compiler, I would "solve" by not building it: it is not needed at run-time anyway.
At ROSCon there was a presentation about using ROS on Android (https://roscon.ros.org/2022/ "Building ROS 2 enabled Android apps with C++"). I suspect you have more chance of finding useful info here then I can provide you with ...
When trying to build the cyclonedds package with the following dependencies in the repos:
I receive an error when trying to build these packages using the Android NDK as follows:
colcon build --cmake-args -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=30 -DCMAKE_ANDROID_NDK=/mnt/d/android-sdk/ndk/25.1.8937393 -DCMAKE_ANDROID_ARCH_ABI=x86_64 -DCMAKE_TOOLCHAIN_FILE=/mnt/d/android-sdk/ndk/25.1.8937393/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH="/mnt/d/ros2-humble/install/ament_cmake_core/share/ament_cmake_core;/mnt/d/ros2-humble/install/ament_cmake_python/share/ament_cmake_python/cmake;/mnt/d/ros2-humble/install/osrf_testing_tools_cpp/share/osrf_testing_tools_cpp/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_dependencies/share/ament_cmake_export_dependencies/cmake;/mnt/d/ros2-humble/install/ament_cmake_test/share/ament_cmake_test/cmake;/mnt/d/ros2-humble/install/ament_cmake_lint_cmake/share/ament_cmake_lint_cmake/cmake;/mnt/d/ros2-humble/install/ament_cmake_gtest/share/ament_cmake_gtest/cmake;/mnt/d/ros2-humble/install/ament_cmake_copyright/share/ament_cmake_copyright/cmake;/mnt/d/ros2-humble/install/ament_cmake/share/ament_cmake/cmake;/mnt/d/ros2-humble/install/ament_cmake_libraries/share/ament_cmake_libraries/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_definitions/share/ament_cmake_export_definitions/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_include_directories/share/ament_cmake_export_include_directories/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_interfaces/share/ament_cmake_export_interfaces/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_libraries/share/ament_cmake_export_libraries/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_link_flags/share/ament_cmake_export_link_flags/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_targets/share/ament_cmake_export_targets/cmake;/mnt/d/ros2-humble/install/ament_cmake_gen_version_h/share/ament_cmake_gen_version_h/cmake;/mnt/d/ros2-humble/install/ament_cmake_target_dependencies/share/ament_cmake_target_dependencies/cmake;/mnt/d/ros2-humble/install/ament_cmake_include_directories/share/ament_cmake_include_directories/cmake;/mnt/d/ros2-humble/install/ament_cmake_version/share/ament_cmake_version/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_core/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_python/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_test/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_dependencies/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_gtest/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_lint_cmake/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_copyright/cmake;/mnt/d/ros2-humble/install/share/ament_cmake/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_libraries/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_definitions/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_include_directories/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_interfaces/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_libraries/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_link_flags/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_targets/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_gen_version_h/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_target_dependencies/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_include_directories/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_version/cmake;/mnt/d/ros2-humble/install/share/ament_lint_auto/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_pytest/cmake" --merge-install --cmake-clean-cache --cmake-clean-first
I receive the following error when building cyclonedds: