hi,I'm trying to build native ROS nodes using the Android NDK by this tutorial[http://wiki.ros.org/android_ndk/Tutorials/BuildingNativeROSPackages]. I use Ubuntu 64bit 14.04LTS as the host on the VM. I installed docker by step 1 and step 2 successfully and run ./do_docker.sh cmd,then something goes wrong with this:
[ 84%] Building CXX object modules/ts/CMakeFiles/opencv_ts.dir/src/ts.cpp.o
Linking CXX static library ../../lib/libopencv_ts.a
[ 84%] Built target opencv_ts
[ 84%] Generating OpenCV Android library project. SDK target: lib_target_sdk_target-NOTFOUND
make[2]: *** [build.xml] Error 1
make[1]: *** [modules/java/CMakeFiles/opencv_java.dir/all] Error 2
make: *** [all] Error 2
Cross-compiling ROS.
Running catkin_make.
Base path: /opt/roscpp_output/catkin_ws
Source space: /opt/roscpp_output/catkin_ws/src
Build space: /opt/roscpp_output/catkin_ws/build
Devel space: /opt/roscpp_output/catkin_ws/devel
Install space: /opt/roscpp_output/target
Then the cmake comeout some errors :
CMake Error at catkin/cmake/catkin_workspace.cmake:95 (message):
This workspace contains non-catkin packages in it, and catkin cannot build
a non-homogeneous workspace without isolation. Try the
'catkin_make_isolated' command instead.
Call Stack (most recent call first):
CMakeLists.txt:63 (catkin_workspace)
-- Configuring incomplete, errors occurred!
See also "/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
Installing.
make: *** No rule to make target `install'. Stop.
build_cpp.sh /opt/roscpp_output died with error code 2
Creating output/roscpp_android_ndk.tar.gz.
tar: roscpp_android_ndk: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
the CMakeError.log shows like :
CheckIncludeFile.c:1:22: fatal error: execinfo.h: No such file or directory
compilation terminated.
make[1]: Leaving directory `/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec2484976465.dir/CheckIncludeFile.c.o] Error 1
make: *** [cmTryCompileExec2484976465/fast] Error 2
and
/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeTmp/src.cxx:2:8: error: expected constructor, destructor, or type conversion before '(' token
make[1]: Leaving directory `/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec640946834.dir/src.cxx.o] Error 1
make: *** [cmTryCompileExec640946834/fast] Error 2
main:CheckFunctionExists.c(.text.main+0x14): error: undefined reference to 'backtrace'
collect2: ld returned 1 exit status
make[1]: Leaving directory `/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec4272716319] Error 1
make: *** [cmTryCompileExec4272716319/fast] Error 2
I don't know if the cmake errors come from the opencv errors. Any one Know something about this problem?Thanks a lot!
Originally posted by xy1zzz on ROS Answers with karma: 26 on 2015-11-21
Post score: 0
Original comments
Comment by Gary Servin on 2015-11-25:
It seems like opencv is failing to build, I just cleaned my workspace and started a new do_docker from scratch to see if I can reproduce this issue. I'll let you know.
Comment by xy1zzz on 2015-11-25:
Thanks a lot !
Comment by Gary Servin on 2015-11-26:
It seems it failed to install correctly the Android SDK inside the container, thus the "SDK target: lib_target_sdk_target-NOTFOUND".
Can you manually install the SDK again inside the container? Here are the instructions: https://gist.github.com/garyservin/34bea53e53690ccc966d
Comment by xy1zzz on 2015-11-26:
THANKS,I'm trying
Comment by xy1zzz on 2015-11-27:
I have delete all docker images,and reinstall again,and the problem shows again:"SDK target: lib_target_sdk_target-NOTFOUND"
I have checked the docker images by your advice in ”https://gist.github.com/garyservin/34bea53e53690ccc966d“,and rosndk and android sdk is ok.
Comment by xy1zzz on 2015-11-27:
then I echo $PATH shows:/usr/lib/ccache:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
echo $ANDROID_HOME shows:/opt/android-sdk-linux
seems ok?
Comment by xy1zzz on 2015-11-27:
maybe the step 27 have something wrong,I'm trying
Comment by xy1zzz on 2015-11-27:
I found some in opencv build:
-- Android:
-- Android ABI: armeabi-v7a
-- STL type: gnustl_static
-- Native API level: android-14
-- SDK target: android_sdk_target_status-NOTFOUND
do I need install android API 14?
Comment by xy1zzz on 2015-11-28:
still shows the same problem SDK target: lib_target_sdk_target-NOTFOUND
Comment by Gary Servin on 2015-11-30:
I've upload my rosndk image for now, can you try using it instead of building? https://hub.docker.com/r/garyservin/rosndk/
Comment by xy1zzz on 2015-11-30:
Thanks so much,I have build successfully by your previous suggestion.It's the Android SDK update errors,I'm writing the answer.