how to add new pkg to ros_android?

asked 2019-03-27 03:14:08 -0600

yueweiliang gravatar image

updated 2019-03-27 04:34:26 -0600

gvdhoorn gravatar image

hi ,nowdays I want to move my ros code to android, I finish the ros_android_ndk, when I compile my own c++ ros node, I face some errors.

I have successfully add new msgs to the docker. What I do is put the new msg's folder to ros-android-ndk/roscoo_android/output/catkin_make/src/ and run ./do_docker.sh.

But now when can compile my new node using the same method many errors coming.it says:

/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot open crtbegin_dynamic.o: No such file or directory
/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot open crtend_android.o: No such file or directory
/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot find -lm
/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot find -lc
/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot find -ldl
/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: CMakeFiles/docking_node.dir/src/node.cpp.o: in function _GLOBAL__sub_I_node.cpp:node.cpp(.text.startup+0x7c): error: undefined reference to '__dso_handle'
/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: /opt/roscpp_output/catkin_ws/devel/lib/libroscpp.a(internal_timer_manager.cpp.o): in function boost::unique_lockboost::mutex::~unique_lock() [clone .constprop.49]:internal_timer_manager.cpp(.text._ZN5boost11unique_lockINS_5mutexEED2Ev.constprop.49+0xe): error: undefined reference to 'pthread_mutex_unlock'
/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: /opt/roscpp_output/catkin_ws/devel/lib/libroscpp.a(internal_timer_manager.cpp.o): in function ros::TimerManager<ros::WallTime, ros::WallDuration, ros::WallTimerEvent>::TimerManager():internal_timer_manager.cpp(.text._ZN3ros12TimerManagerINS_8WallTimeENS_12WallDurationENS_14WallTimerEventEEC2Ev+0x16): error: undefined reference to 'pthread_mutex_init'
/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: /opt/roscpp_output/catkin_ws/devel/lib/libroscpp.a(internal_timer_manager.cpp.o): in function ros::TimerManager<ros::WallTime, ros::WallDuration, ros::WallTimerEvent>::TimerManager():internal_timer_manager.cpp(.text._ZN3ros12TimerManagerINS_8WallTimeENS_12WallDurationENS_14WallTimerEventEEC2Ev+0x34): error: undefined reference to 'pthread_mutex_init'
/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: /opt/roscpp_output/catkin_ws/devel/lib/libroscpp.a(internal_timer_manager.cpp.o): in function ros::TimerManager<ros::WallTime, ros::WallDuration, ros::WallTimerEvent>::TimerManager():internal_timer_manager.cpp(.text._ZN3ros12TimerManagerINS_8WallTimeENS_12WallDurationENS_14WallTimerEventEEC2Ev+0x4e): error: undefined reference to 'pthread_mutex_init'

and other error logs that cannot find some libs.I delete most of my codes in new node only a empty class file and main.cpp left, but the error still be here.Is the way I add new pkg wrong? how to add my own new pkg to ros android ??

edit retag flag offensive close merge delete