ros2-android-tutorial icon indicating copy to clipboard operation
ros2-android-tutorial copied to clipboard

gnustl_shared is no longer supported | CMAKE_MAKE_PROGRAM is not set

Open PGTav opened this issue 5 years ago • 0 comments

Background: I have successfully created an Android app. using rosJava that controls (publishes and subscribes) to a robot with ROS1 Kinetic (Ubuntu 16.04). I have now migrated the robot from ROS1 to ROS2 Dashing (Ubuntu 18.04) successfully. Now I want to migrate my rosJava Android app. to rclJava to control the ROS2 robot. I have written the ROS1 Android app. in Koltin (although Java is OK) using Android Studio on a Windows 10 PC.

Process: Upon reading through https://github.com/esteve/ros2_android_examples and your repository I have amended my development environment to run Android Studio on Ubuntu 18.04 (Java).

Issue: I followed the tutorial at https://github.com/songshan0321/ros2-android-tutorial:

  • [OK] Download Android Studio

  • [OK] Download the latest stable version Android NDK

  • [OK] Check your JAVA version

  • [OK] Add to /etc/environment

  • [ERR] Build ROS2_JAVA on Linux computer

    • [OK] Define Paths I had to modify as follows:

    export ROOT_DIR=${HOME} export AMENT_WORKSPACE=${ROOT_DIR}/ament_ws export ROS2_ANDROID_WORKSPACE=${ROOT_DIR}/ros2_android_ws

    • [OK] # pull and build ament
    • [OK] # android build configuration
    • [ERR] # pull and build ros2 for android At the ament build --isolated --skip-packages… command I get the following errors (edited for errors only, no duplicates):
# Topological order
…
# Skipping: test_msgs
…
+++ Building 'poco_vendor'
…
-- Setting build type to 'Release' as none was specified.
…
CMake Error at /home/dash/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake:249 (message):
  gnustl_shared is no longer supported.  Please switch to either c++_shared
  or c++_static.  See
  https://developer.android.com/ndk/guides/cpp-support.html for more
  information.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:94 (include)
  CMakeLists.txt:3 (project)
…
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
…
  /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:94 (include)
  CMakeLists.txt:84 (project)
…
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
…
  /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:94 (include)
  CMakeLists.txt:17 (project)
…
DCMAKE_INSTALL_PREFIX=/home/dash/ros2_android_ws/install_isolated/libyaml_vendor /home/dash/ros2_android_ws/src/ros2/libyaml_vendor' failed in '/home/dash/ros2_android_ws/build_isolated/libyaml_vendor' with exit code '1'
Traceback (most recent call last):
  File "/home/dash/ament_ws/build_isolated/ament_tools/ament_tools/verbs/build_pkg/cli.py", line 253, in run_command
    subprocess.check_call(cmd, shell=True, cwd=cwd, env=build_action.env)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
…
Traceback (most recent call last):
  File "/home/dash/ament_ws/build_isolated/ament_tools/ament_tools/verbs/build/cli.py", line 384, in process_in_parallel
    result = done_future.result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/dash/ament_ws/build_isolated/ament_tools/ament_tools/verbs/build_pkg/cli.py", line 280, in main
    return run(opts, context)
  File "/home/dash/ament_ws/build_isolated/ament_tools/ament_tools/verbs/build_pkg/cli.py", line 331, in run
    handle_build_action(on_build_ret, context)
  File "/home/dash/ament_ws/build_isolated/ament_tools/ament_tools/verbs/build_pkg/cli.py", line 270, in handle_build_action
    run_command(build_action, context)
  File "/home/dash/ament_ws/build_isolated/ament_tools/ament_tools/verbs/build_pkg/cli.py", line 262, in run_command
    sys.exit(msg)
DCMAKE_INSTALL_PREFIX=/home/dash/ros2_android_ws/install_isolated/ament_cmake_ros /home/dash/ros2_android_ws/src/ros2/ament_cmake_ros/ament_cmake_ros' failed in '/home/dash/ros2_android_ws/build_isolated/ament_cmake_ros' with exit code '1'
CMake Error at /home/dash/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake:249 (message):
  gnustl_shared is no longer supported.  Please switch to either c++_shared
  or c++_static.  See
  https://developer.android.com/ndk/guides/cpp-support.html for more
  information.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:94 (include)
  CMakeLists.txt:2 (project)
…
DCMAKE_INSTALL_PREFIX=/home/dash/ros2_android_ws/install_isolated/poco_vendor /home/dash/ros2_android_ws/src/ros2/poco_vendor' failed in '/home/dash/ros2_android_ws/build_isolated/poco_vendor' with exit code '1'
Failed packages: ament_cmake_ros
Traceback (most recent call last):
  File "/home/dash/ament_ws/install_isolated/ament_tools/bin/ament", line 11, in <module>
    load_entry_point('ament-tools', 'console_scripts', 'ament')()
  File "/home/dash/ament_ws/build_isolated/ament_tools/ament_tools/commands/ament.py", line 88, in main
    rc = args.main(args)
  File "/home/dash/ament_ws/build_isolated/ament_tools/ament_tools/verbs/build/cli.py", line 172, in main
    return iterate_packages(opts, packages, per_package_main)
  File "/home/dash/ament_ws/build_isolated/ament_tools/ament_tools/verbs/build/cli.py", line 329, in iterate_packages
    shutil.copy(template_path, dst)
  File "/usr/lib/python3.6/shutil.py", line 245, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.6/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/home/dash/ros2_android_ws/install_isolated/local_setup.bash'

I can post the entire output if so desired.

Thank you in advance for any help provided, much appreciated.

PGTav avatar Oct 01 '19 05:10 PGTav