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

'asio.hpp' file not found #include <asio.hpp> #3835

Closed
1 task done
pdl0x0lbq opened this issue Sep 9, 2023 · 1 comment
Closed
1 task done

'asio.hpp' file not found #include <asio.hpp> #3835

pdl0x0lbq opened this issue Sep 9, 2023 · 1 comment
Labels
triage Issue pending classification

Comments

@pdl0x0lbq
Copy link

Is there an already existing issue for this?

  • I have searched the existing issues

Expected behavior

Build successful

Current behavior

In file included from /home/sw/ros2_android_ws/src/eProsima/Fast-DDS/src/cpp/rtps/transport/UDPv4Transport.h:19: /home/sw/ros2_android_ws/src/eProsima/Fast-DDS/src/cpp/rtps/transport/UDPTransportInterface.h:18:10: fatal error: 'asio.hpp' file not found #include <asio.hpp> ^~~~~~~~~~

Steps to reproduce

  1. Download Android studio
  2. Download Android NDK
  3. Add .bashrc
    export ANDROID_HOEM=~/Android/Sdk export PATH=$PATH:$ANDROID_HOEM/tools:$ANDROID_HOEM/platform-tool export ANDROID_NDK=~/Android/ndk-r25c
  4. mkdir -p $HOME/ros2_android_ws/src cd $HOME/ros2_android_ws curl https://raw.githubusercontent.com/pdl0x0lbq/ros2-humble-for-android/main/ros2_java_android.repos | vcs import src
  5. export PYTHON3_EXEC="$( which python3 )" export PYTHON3_LIBRARY="$( ${PYTHON3_EXEC} -c 'import os.path; from distutils import sysconfig; print(os.path.realpath(os.path.join(sysconfig.get_config_var("LIBPL"), sysconfig.get_config_var("LDLIBRARY"))))' )" export PYTHON3_INCLUDE_DIR="$( ${PYTHON3_EXEC} -c 'from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))' )" export ANDROID_ABI=arm64-v8a export ANDROID_NATIVE_API_LEVEL=android-29 export ANDROID_TOOLCHAIN_NAME=aarch64-linux-android-clang
  6. colcon build \ --packages-ignore cyclonedds rcl_logging_log4cxx rcl_logging_spdlog rosidl_generator_py rclandroid ros2_talker_android ros2_listener_android \ --cmake-args \ -DPYTHON_EXECUTABLE=${PYTHON3_EXEC} \ -DPYTHON_LIBRARY=${PYTHON3_LIBRARY} \ -DPYTHON_INCLUDE_DIR=${PYTHON3_INCLUDE_DIR} \ -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \ -DANDROID=ON \ -DANDROID_FUNCTION_LEVEL_LINKING=OFF \ -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} \ -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} \ -DANDROID_STL=c++_shared \ -DANDROID_ABI=${ANDROID_ABI} \ -DANDROID_NDK=${ANDROID_NDK} \ -DTHIRDPARTY=ON \ -DCOMPILE_EXAMPLES=OFF \ -DCMAKE_FIND_ROOT_PATH="${PWD}/install" \ -DBUILD_TESTING=OFF \ -DRCL_LOGGING_IMPLEMENTATION=rcl_logging_noop \ -DTHIRDPARTY_android-ifaddrs=FORCE \ -DTRACETOOLS_DISABLED=ON

Fast DDS version/commit

v2.11.2 master

Platform/Architecture

Other. Please specify in Additional context section.

Transport layer

Default configuration, UDPv4 & SHM

Additional context

I have installed libasio-dev

XML configuration file

No response

Relevant log output

No response

Network traffic capture

No response

@pdl0x0lbq pdl0x0lbq added the triage Issue pending classification label Sep 9, 2023
@pdl0x0lbq
Copy link
Author

I solved it
add
export CPATH=~/ros2_android_ws/src/eProsima/Fast-DDS/thirdparty/asio/asio/include:$CPATH export CPATH=~/ros2_android_ws/src/eProsima/Fast-DDS/thirdparty/tinyxml2:$CPATH
to .bashrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue pending classification
Projects
None yet
Development

No branches or pull requests

1 participant