librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Build with TM2 not working android

Open anjosyula opened this issue 3 years ago • 1 comments

I am trying to use the T265 with android and when I enable BUILD_WITH_TM2 and IMPORT_DEPTH_CAM_FW in the android_config.cmake in the cmake folder, the build for the android wrapper fails. If I disable those two, then the build works. I have attached the build output. I am on Kubuntu 23.04.

Build command failed.
Error while executing process /home/cheeseboy/Android/Sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /home/cheeseboy/StudioProjects/librealsense/wrappers/android/librealsense/.cxx/cmake/debug/armeabi-v7a realsense2}
ninja: Entering directory `/home/cheeseboy/StudioProjects/librealsense/wrappers/android/librealsense/.cxx/cmake/debug/armeabi-v7a'
[1/168] Performing update step for 'libusb'
[2/168] Performing configure step for 'libusb'
FAILED: /home/cheeseboy/StudioProjects/librealsense/wrappers/android/build/libusb-prefix/src/libusb-stamp/libusb-configure 
cd /home/cheeseboy/StudioProjects/librealsense/wrappers/android/build/libusb-prefix/src/libusb-build && /home/cheeseboy/Android/Sdk/cmake/3.10.2.4988404/bin/cmake "-DCMAKE_CXX_STANDARD_LIBRARIES=-latomic -lm" -DCMAKE_TOOLCHAIN_FILE=/home/cheeseboy/Android/Sdk/ndk/21.1.6352462/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -DANDROID_ABI=armeabi-v7a -DANDROID_STL=c++_static -DCMAKE_INSTALL_PREFIX=/home/cheeseboy/StudioProjects/librealsense/wrappers/android/build/libusb_install -GNinja /home/cheeseboy/StudioProjects/librealsense/wrappers/android/build/third-party/libusb && /home/cheeseboy/Android/Sdk/cmake/3.10.2.4988404/bin/cmake -E touch /home/cheeseboy/StudioProjects/librealsense/wrappers/android/build/libusb-prefix/src/libusb-stamp/libusb-configure
-- ANDROID_PLATFORM not set. Defaulting to minimum supported version
16.
CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/home/cheeseboy/StudioProjects/librealsense/wrappers/android/build/libusb-prefix/src/libusb-build/CMakeFiles/CMakeOutput.log".
[3/168] Linking CXX static library /home/cheeseboy/StudioProjects/librealsense/wrappers/android/build/third-party/realsense-file/librealsense-file.a
ninja: build stopped: subcommand failed.


anjosyula avatar May 02 '23 21:05 anjosyula

I got it working by using this.

anjosyula avatar May 02 '23 22:05 anjosyula