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

Project Tango Compilation #90

Closed
yhoussin opened this issue Jun 29, 2016 · 15 comments
Closed

Project Tango Compilation #90

yhoussin opened this issue Jun 29, 2016 · 15 comments

Comments

@yhoussin
Copy link

Hi Mathieu,
I'm trying to compile rtabmap using the standalone toolchain from android-ndk-r12.
I have been following your recommendations using Code Works from a previous post. I'm getting the following message and I'm not sure how to address it. I can't find that res_tool anywhere.
Any suggestion? Thanks in advance!

CMake Error at corelib/src/CMakeLists.txt:263 (MESSAGE):
RTABMAP_RES_TOOL is not defined (it is the path to "rtabmap-res_tool"
application created by a non-Android build).

@matlabbe
Copy link
Member

matlabbe commented Jun 29, 2016

I would need to make this step automatic for easier compilation. If you don't have rtabmap already built for the host computer, you have to build it using standard instructions for the host to get rtabmap-res_tool built in bin folder. Then back to your rtabmap android build, you can do cmake -DRTABMAP_RES_TOOL="path/to/rtabmap-res_tool" ..

cheers

@yhoussin
Copy link
Author

OK I'll give it a shot, thanks for your quick reply!

@zhngling123
Copy link

zhngling123 commented Jul 28, 2016

@matlabbe
Hi Mathieu,
I just go to the final step for Tango compile, rtabmap-res_tools and qt5/vtk/eigen/flann/pcl with NDK compile, also use OpenCV from NV Pack you suggested. Tango C client API download is only provide TangSKD-Qianru-C.zip so I can't find Mira version for compare. For boost, I tried 1.61 and 1.55 compiled with NDK and boost file you provide in #74 . Please take some time to look at following error message. I am very appreciated your advice. It's 79% and very near to 100%. I hope I can get the final APK to have fun.

Thanks

`[ 79%] Building CXX object app/android/jni/CMakeFiles/NativeRTABMap.dir/RTABMapApp.cpp.o
/Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:60:1: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++0x-compat]
constexpr int kTangoCoreMinimumVersion = 9377;
^
In file included from /Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/drawable_object.h:22:0,
from /Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/line.h:20,
from /Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/axis.h:20,
from /Volumes/data/rtabmap/app/android/jni/scene.h:25,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.h:37,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:30:
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/color.h:25:25: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
Color(const Color&) = default;
^
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/color.h:26:36: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
Color& operator=(const Color&) = default;
^
In file included from /Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/drawable_object.h:23:0,
from /Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/line.h:20,
from /Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/axis.h:20,
from /Volumes/data/rtabmap/app/android/jni/scene.h:25,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.h:37,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:30:
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/transform.h:29:39: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
Transform(const Transform& other) = delete;
^
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/transform.h:30:54: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
const Transform& operator=(const Transform& rhs) = delete;
^
In file included from /Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/line.h:20:0,
from /Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/axis.h:20,
from /Volumes/data/rtabmap/app/android/jni/scene.h:25,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.h:37,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:30:
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/drawable_object.h:30:49: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
DrawableObject(const DrawableObject& other) = delete;
^
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/drawable_object.h:31:60: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
const DrawableObject& operator=(const DrawableObject&) = delete;
^
In file included from /Volumes/data/rtabmap/app/android/jni/scene.h:26:0,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.h:37,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:30:
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/camera.h:26:33: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
Camera(const Camera& other) = delete;
^
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/camera.h:27:38: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
Camera& operator=(const Camera&) = delete;
^
In file included from /Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/gesture_camera.h:21:0,
from /Volumes/data/rtabmap/app/android/jni/scene.h:28,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.h:37,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:30:
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/segment.h:28:29: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
Segment(const Segment&) = default;
^
/Volumes/data/rtabmap/app/android/jni/tango-gl/include/tango-gl/segment.h:29:40: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
Segment& operator=(const Segment&) = default;
^
/Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:60:1: error: 'constexpr' does not name a type
constexpr int kTangoCoreMinimumVersion = 9377;
^
/Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:60:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
In file included from /Volumes/data/android_install/include/boost/shared_ptr.hpp:17:0,
from /Volumes/data/android_install/include/pcl/PCLHeader.h:10,
from /Volumes/data/android_install/include/pcl/point_cloud.h:48,
from /Volumes/data/rtabmap/app/android/jni/point_cloud_drawable.h:35,
from /Volumes/data/rtabmap/app/android/jni/scene.h:38,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.h:37,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:30:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp: In instantiation of 'boost::shared_ptr& boost::shared_ptr::operator=(const boost::shared_ptr&) [with Y = pcl::PointCloudpcl::Normal; T = pcl::PointCloudpcl::PointXYZRGBNormal]':
/Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:758:23: required from here
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: error: no matching function for call to 'boost::shared_ptrpcl::PointCloud<pcl::PointXYZRGBNormal >::shared_ptr(const boost::shared_ptrpcl::PointCloud<pcl::Normal >&)'
this_type(r).swap(_this);
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: note: candidates are:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:472:14: note: template boost::shared_ptr::shared_ptr(Ap, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type)
explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn()
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:472:14: note: template argument deduction/substitution failed:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp: In substitution of 'template boost::shared_ptr::shared_ptr(Ap, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type) [with Ap = boost::shared_ptrpcl::PointCloud<pcl::Normal >]':
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: required from 'boost::shared_ptr& boost::shared_ptr::operator=(const boost::shared_ptr&) [with Y = pcl::PointCloudpcl::Normal; T = pcl::PointCloudpcl::PointXYZRGBNormal]'
/Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:758:23: required from here
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:472:14: error: no type named 'type' in 'struct boost::detail::sp_enable_if_auto_ptrboost::shared_ptr<pcl::PointCloud<pcl::Normal >, int>'
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp: In instantiation of 'boost::shared_ptr& boost::shared_ptr::operator=(const boost::shared_ptr&) [with Y = pcl::PointCloudpcl::Normal; T = pcl::PointCloudpcl::PointXYZRGBNormal]':
/Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:758:23: required from here
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:446:14: note: template boost::shared_ptr::shared_ptr(std::auto_ptr<Tp1>&)
explicit shared_ptr( std::auto_ptr & r ): px(r.get()), pn()
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:446:14: note: template argument deduction/substitution failed:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: note: types 'std::auto_ptr' and 'const boost::shared_ptrpcl::PointCloud<pcl::Normal >' have incompatible cv-qualifiers
this_type(r).swap(this);
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:439:5: note: template boost::shared_ptr::shared_ptr(const boost::shared_ptr&, boost::shared_ptr::element_type
)
shared_ptr( shared_ptr const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn )
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:439:5: note: template argument deduction/substitution failed:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: note: candidate expects 2 arguments, 1 provided
this_type(r).swap(this);
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:425:5: note: template boost::shared_ptr::shared_ptr(const boost::shared_ptr&, typename boost::detail::sp_enable_if_convertible<Y, T>::type)
shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:425:5: note: template argument deduction/substitution failed:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp: In substitution of 'template boost::shared_ptr::shared_ptr(const boost::shared_ptr&, typename boost::detail::sp_enable_if_convertible<Y, T>::type) [with Y = pcl::PointCloudpcl::Normal]':
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: required from 'boost::shared_ptr& boost::shared_ptr::operator=(const boost::shared_ptr&) [with Y = pcl::PointCloudpcl::Normal; T = pcl::PointCloudpcl::PointXYZRGBNormal]'
/Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:758:23: required from here
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:425:5: error: no type named 'type' in 'struct boost::detail::sp_enable_if_convertiblepcl::PointCloud<pcl::Normal, pcl::PointCloudpcl::PointXYZRGBNormal >'
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp: In instantiation of 'boost::shared_ptr& boost::shared_ptr::operator=(const boost::shared_ptr&) [with Y = pcl::PointCloudpcl::Normal; T = pcl::PointCloudpcl::PointXYZRGBNormal]':
/Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:758:23: required from here
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:413:5: note: template boost::shared_ptr::shared_ptr(const boost::weak_ptr&, boost::detail::sp_nothrow_tag)
shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag )
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:413:5: note: template argument deduction/substitution failed:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: note: 'const boost::shared_ptrpcl::PointCloud<pcl::Normal >' is not derived from 'const boost::weak_ptr'
this_type(r).swap(this);
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:404:14: note: template boost::shared_ptr::shared_ptr(const boost::weak_ptr&)
explicit shared_ptr( weak_ptr const & r ): pn( r.pn ) // may throw
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:404:14: note: template argument deduction/substitution failed:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: note: 'const boost::shared_ptrpcl::PointCloud<pcl::Normal >' is not derived from 'const boost::weak_ptr'
this_type(r).swap(this);
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:378:41: note: template<class Y, class D, class A> boost::shared_ptr::shared_ptr(Y
, D, A)
template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a )
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:378:41: note: template argument deduction/substitution failed:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: note: mismatched types 'Y
' and 'boost::shared_ptrpcl::PointCloud<pcl::Normal >'
this_type(r).swap(this);
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:363:32: note: template<class Y, class D> boost::shared_ptr::shared_ptr(Y
, D)
template<class Y, class D> shared_ptr( Y * p, D d ): px( p ), pn( p, d )
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:363:32: note: template argument deduction/substitution failed:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: note: mismatched types 'Y
' and 'boost::shared_ptrpcl::PointCloud<pcl::Normal >'
this_type(r).swap(this);
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:352:14: note: template boost::shared_ptr::shared_ptr(Y
)
explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:352:14: note: template argument deduction/substitution failed:
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:516:9: note: mismatched types 'Y' and 'boost::shared_ptrpcl::PointCloud<pcl::Normal >'
this_type(r).swap(this);
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:339:5: note: boost::shared_ptr::shared_ptr() [with T = pcl::PointCloudpcl::PointXYZRGBNormal]
shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:339:5: note: candidate expects 0 arguments, 1 provided
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:328:25: note: boost::shared_ptrpcl::PointCloud<pcl::PointXYZRGBNormal >::shared_ptr(const boost::shared_ptrpcl::PointCloud<pcl::PointXYZRGBNormal >&)
template class shared_ptr
^
/Volumes/data/android_install/include/boost/smart_ptr/shared_ptr.hpp:328:25: note: no known conversion for argument 1 from 'const boost::shared_ptrpcl::PointCloud<pcl::Normal >' to 'const boost::shared_ptrpcl::PointCloud<pcl::PointXYZRGBNormal >&'
In file included from /Volumes/data/android_install/include/boost/system/system_error.hpp:14:0,
from /Volumes/data/android_install/include/boost/thread/exceptions.hpp:22,
from /Volumes/data/android_install/include/boost/thread/pthread/mutex.hpp:12,
from /Volumes/data/android_install/include/boost/thread/mutex.hpp:16,
from /Volumes/data/rtabmap/app/android/jni/CameraTango.h:37,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.h:38,
from /Volumes/data/rtabmap/app/android/jni/RTABMapApp.cpp:30:
/Volumes/data/android_install/include/boost/system/error_code.hpp:222:36: warning: 'boost::system::posix_category' defined but not used [-Wunused-variable]
static const error_category & posix_category = generic_category();
^
/Volumes/data/android_install/include/boost/system/error_code.hpp:223:36: warning: 'boost::system::errno_ecat' defined but not used [-Wunused-variable]
static const error_category & errno_ecat = generic_category();
^
/Volumes/data/android_install/include/boost/system/error_code.hpp:224:36: warning: 'boost::system::native_ecat' defined but not used [-Wunused-variable]
static const error_category & native_ecat = system_category();
^
make[2]: *
* [app/android/jni/CMakeFiles/NativeRTABMap.dir/RTABMapApp.cpp.o] Error 1
make[1]: *** [app/android/jni/CMakeFiles/NativeRTABMap.dir/all] Error 2
make: *** [all] Error 2
'

@zhngling123
Copy link

Locate to 2 errors,
1: Line 60,constexpr int kTangoCoreMinimumVersion = 9377;
Error description: 'constexpr' does not name a type
2:Line 758,pcl::PointCloudpcl::PointXYZRGBNormal::Ptr denseCloud(new pcl::PointCloudpcl::PointXYZRGBNormal);
Error description:no matching function for call to 'boost::shared_ptrpcl::PointCloud<pcl::PointXYZRGBNormal >::shared_ptr(const boost::shared_ptrpcl::PointCloud<pcl::Normal >&)'

Any ideas for this 2 lines?

@zhngling123
Copy link

Update:
Tried pcl 1.7.2, the error remain.
1:comment the line to pass the compile
2:Line 758,pcl::PointCloudpcl::PointXYZRGBNormal::Ptr denseCloud(new pcl::PointCloudpcl::PointXYZRGBNormal);
Error description:no matching function for call to 'boost::shared_ptrpcl::PointCloud::shared_ptr(const boost::shared_ptrpcl::PointCloud&)'

@matlabbe
Copy link
Member

matlabbe commented Aug 1, 2016

For the first error, it may be fixed with the above c++11 commit.

@matlabbe
Copy link
Member

matlabbe commented Aug 1, 2016

The second commit would fix the second error.

cheers

@zhngling123
Copy link

zhngling123 commented Aug 17, 2016

Hi @matlabbe
Following error occurred when linking final shared object, I guess its related to rtabmap code and not PCL.
[ 11%] Built target rtabmap_utilite
[ 12%] Built target res_tool
[ 79%] Built target rtabmap_core
Linking CXX shared library ../libs/armeabi-v7a/libNativeRTABMap.so
/home/zhngling/libs/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../
lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: /home/zhngling/android_install/
lib/libpcl_features.a(normal_3d.cpp.o): multiple definition of 'typeinfo name for pcl::NormalEstimationOMP<pcl::Poi
ntXYZRGB, pcl::Normal>'
/home/zhngling/libs/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../
lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: ../../../../lib/librtabmap_core.a(uti
l3d_surface.cpp.o): previous definition here
/home/zhngling/libs/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../
lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: /home/zhngling/android_install/
lib/libpcl_features.a(normal_3d.cpp.o): multiple definition of 'typeinfo for pcl::NormalEstimationOMP<pcl::PointXYZ
RGB, pcl::Normal>'
/home/zhngling/libs/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../
lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: ../../../../lib/librtabmap_core.a(uti
l3d_surface.cpp.o): previous definition here
/home/zhngling/android_install/lib/libpcl_io.a(ply_io.cpp.o):ply_io.cpp:function pcl::PLYReader::parse(std::string c
onst&): error: undefined reference to 'pcl::io::ply::ply_parser::parse(std::string const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [app/android/libs/armeabi-v7a/libNativeRTABMap.so] Error 1
make[1]: *** [app/android/jni/CMakeFiles/NativeRTABMap.dir/all] Error 2
make: *** [all] Error 2

@willdzeng
Copy link
Contributor

@zhngling123 Are you using PCL1.7 ?

@zhngling123
Copy link

@willdzeng
pcl-1.8.0

@willdzeng
Copy link
Contributor

willdzeng commented Aug 18, 2016

try use 1.7

@zhngling123
Copy link

After try pcl 1.7.2, it seems that multiple definition gone. But undefined reference to 'pcl::io::ply::ply_parser::parse(std::string const&)' is still.

Linking CXX executable ../../../bin/rtabmap-bow_mapping
/home/zhngling/android_install/lib/libpcl_io.a(ply_io.cpp.o):ply_io.cpp:function pcl::PLYReader::parse(std::string c
onst&): error: undefined reference to 'pcl::io::ply::ply_parser::parse(std::string const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/rtabmap-bow_mapping] Error 1
make[1]: *** [examples/BOWMapping/CMakeFiles/bow_mapping.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Linking CXX shared library ../libs/armeabi-v7a/libNativeRTABMap.so
/home/zhngling/android_install/lib/libpcl_io.a(ply_io.cpp.o):ply_io.cpp:function pcl::PLYReader::parse(std::string c
onst&): error: undefined reference to 'pcl::io::ply::ply_parser::parse(std::string const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [app/android/libs/armeabi-v7a/libNativeRTABMap.so] Error 1
make[1]: *** [app/android/jni/CMakeFiles/NativeRTABMap.dir/all] Error 2
make: *** [all] Error 2

@yhoussin
Copy link
Author

Hi Mathieu,
I made some progress compiling rtgbmap, got PCL1.8 compiled, but when I try to compile rtgbmap for Tango, I am getting linking errors (see bellow)
Can you confirm you are using PCL1.8 , and maybe you will have an idea about the error we have?

../../../../lib/librtabmap_core.a(util3d_registration.cpp.o):util3d_registration.cpp:vtable for pcl::registration::CorrespondenceEstimationBase<pcl::PointNormal, pcl::PointNormal, float>: error: undefined reference to 'pcl::PCLBasepcl::PointNormal::setIndices(unsigned int, unsigned int, unsigned int, unsigned int)'
collect2: error: ld returned 1 exit status
make[2]: *** [app/android/libs/armeabi-v7a/libNativeRTABMap.so] Error 1
make[1]: *** [app/android/jni/CMakeFiles/NativeRTABMap.dir/all] Error 2
make: *** [all] Error 2

@matlabbe
Copy link
Member

The Tango app is built with PCL 1.7.2 on my computer.

For error: undefined reference to 'pcl::io::ply::ply_parser::parse(std::string const&) error, I manually added the missing library "libpcl_io_ply.a" to PCLConfig.cmake installed (e.g., /Users/mathieu/Documents/workspace/android_libs/install/share/pcl-1.7/PCLConfig.cmake):

  pcl_remove_duplicate_libraries(PCL_LIBRARIES PCL_DEDUP_LIBRARIES)
  set(PCL_LIBRARIES ${PCL_DEDUP_LIBRARIES})
+ set(PCL_LIBRARIES ${PCL_LIBRARIES} /Users/mathieu/Documents/workspace/android_libs/install/lib/libpcl_io_ply.a)
  # Add 3rd party libraries, as user code might include our .HPP implementations
  list(APPEND PCL_LIBRARIES ${BOOST_LIBRARIES} ${QHULL_LIBRARIES} ${OPENNI_LIBRARIES} ${OPENNI2_LIBRARIES} ${FLANN_LIBRARIES} ${VTK_LIBRARIES})

This is not related to the error, but I also I added writing OBJ/PLY optimizations from this pull request.

cheers

@matlabbe
Copy link
Member

Closed by this post: #74 (comment)

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

No branches or pull requests

4 participants