shiva16 / rtabmap

Automatically exported from code.google.com/p/rtabmap
0 stars 0 forks source link

Cannot compile #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Mac OS X. Compile form source. 
2.Follow the installations steps in 
https://code.google.com/p/rtabmap/wiki/Installation#Mac_OS_X

What is the expected output? What do you see instead?
$ svn checkout http://rtabmap.googlecode.com/svn/trunk/rtabmap rtabmaplib
$ cd rtabmaplib/build
$ cmake ..
$ make

OUTPUT:
[  8%] Built target rtabmap_utilite
[  9%] Built target uresourcegenerator
[ 30%] Built target rtabmap_core
[ 86%] Built target rtabmap_gui
Linking CXX executable ../../../bin/rtabmap
Undefined symbols for architecture x86_64:
  "cv::VideoCapture::open(std::string const&)", referenced from:
      rtabmap::CameraVideo::init() in librtabmap_core.a(Camera.cpp.o)
  "cv::_OutputArray::_OutputArray(std::vector<cv::Mat, std::allocator<cv::Mat> >&)", referenced from:
      rtabmap::CalibrationDialog::calibrate() in librtabmap_gui.a(CalibrationDialog.cpp.o)
  "cv::gpu::BruteForceMatcher_GPU_base::knnMatch(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, std::vector<std::vector<cv::DMatch, std::allocator<cv::DMatch> >, std::allocator<std::vector<cv::DMatch, std::allocator<cv::DMatch> > > >&, int, cv::gpu::GpuMat const&, bool)", referenced from:
      rtabmap::VWDictionary::addNewWords(cv::Mat const&, int) in librtabmap_core.a(VWDictionary.cpp.o)
      rtabmap::VWDictionary::findNN(std::list<rtabmap::VisualWord*, std::allocator<rtabmap::VisualWord*> > const&) const in librtabmap_core.a(VWDictionary.cpp.o)
  "cv::gpu::ORB_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&)", referenced from:
      rtabmap::ORB::generateKeypointsImpl(cv::Mat const&, cv::Rect_<int> const&) const in librtabmap_core.a(Features2d.cpp.o)
  "cv::gpu::ORB_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::gpu::GpuMat&)", referenced from:
      rtabmap::ORB::generateDescriptorsImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&) const in librtabmap_core.a(Features2d.cpp.o)
  "cv::gpu::FAST_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&)", referenced from:
      rtabmap::FAST::generateKeypointsImpl(cv::Mat const&, cv::Rect_<int> const&) const in librtabmap_core.a(Features2d.cpp.o)
  "cv::gpu::SURF_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&)", referenced from:
      rtabmap::SURF::generateKeypointsImpl(cv::Mat const&, cv::Rect_<int> const&) const in librtabmap_core.a(Features2d.cpp.o)
  "cv::gpu::SURF_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::gpu::GpuMat&, bool)", referenced from:
      rtabmap::SURF::generateDescriptorsImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&) const in librtabmap_core.a(Features2d.cpp.o)
  "cv::FREAK::FREAK(bool, bool, float, int, std::vector<int, std::allocator<int> > const&)", referenced from:
      rtabmap::FAST_FREAK::parseParameters(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&) in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::GFTT_FREAK::parseParameters(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&) in librtabmap_core.a(Features2d.cpp.o)
  "cv::imread(std::string const&, int)", referenced from:
      rtabmap::CameraImages::captureImage() in librtabmap_core.a(Camera.cpp.o)
  "cv::imwrite(std::string const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)", referenced from:
      rtabmap::CloudViewer::addOccupancyGridMap(cv::Mat const&, float, float, float, float) in librtabmap_gui.a(CloudViewer.cpp.o)
      rtabmap::DatabaseViewer::extractImages() in librtabmap_gui.a(DatabaseViewer.cpp.o)
  "cv::imencode(std::string const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)", referenced from:
      rtabmap::util3d::compressImage(cv::Mat const&, std::string const&) in librtabmap_core.a(util3d.cpp.o)
  "cv::FeatureDetector::detect(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat const&) const", referenced from:
      rtabmap::util3d::get3DFASTKpts(cv::Mat const&, cv::Mat const&, float, int, bool, float) in librtabmap_core.a(util3d.cpp.o)
      rtabmap::SURF::generateKeypointsImpl(cv::Mat const&, cv::Rect_<int> const&) const in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::SIFT::generateKeypointsImpl(cv::Mat const&, cv::Rect_<int> const&) const in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::ORB::generateKeypointsImpl(cv::Mat const&, cv::Rect_<int> const&) const in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::FAST::generateKeypointsImpl(cv::Mat const&, cv::Rect_<int> const&) const in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::GFTT::generateKeypointsImpl(cv::Mat const&, cv::Rect_<int> const&) const in librtabmap_core.a(Features2d.cpp.o)
  "cv::DescriptorMatcher::knnMatch(cv::Mat const&, cv::Mat const&, std::vector<std::vector<cv::DMatch, std::allocator<cv::DMatch> >, std::allocator<std::vector<cv::DMatch, std::allocator<cv::DMatch> > > >&, int, cv::Mat const&, bool) const", referenced from:
      rtabmap::VWDictionary::addNewWords(cv::Mat const&, int) in librtabmap_core.a(VWDictionary.cpp.o)
      rtabmap::VWDictionary::findNN(std::list<rtabmap::VisualWord*, std::allocator<rtabmap::VisualWord*> > const&) const in librtabmap_core.a(VWDictionary.cpp.o)
  "cv::DescriptorExtractor::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const", referenced from:
      rtabmap::FAST_BRIEF::generateDescriptorsImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&) const in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::FAST_FREAK::generateDescriptorsImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&) const in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::GFTT_BRIEF::generateDescriptorsImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&) const in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::GFTT_FREAK::generateDescriptorsImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&) const in librtabmap_core.a(Features2d.cpp.o)
  "cv::Feature2D::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const", referenced from:
      rtabmap::SURF::generateDescriptorsImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&) const in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::SIFT::generateDescriptorsImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&) const in librtabmap_core.a(Features2d.cpp.o)
      rtabmap::ORB::generateDescriptorsImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&) const in librtabmap_core.a(Features2d.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../bin/rtabmap] Error 1
make[1]: *** [app/src/CMakeFiles/rtabmap.dir/all] Error 2
make: *** [all] Error 2

What version of the product are you using? On what operating system?
OS X 10.9.4 with Xcode 5.1.1

Please provide any additional information below.
My opencv is installed correctly and all opencv libs are in usr/local/lib. I 
don't know why it cannot link the opencv library. I compiled rtabmap in ubuntu 
system successfully but failed in two different Macs. 

Original issue reported on code.google.com by cynthia....@gmail.com on 17 Sep 2014 at 6:15

GoogleCodeExporter commented 9 years ago
Can you put also the output of CMake?
$ cd rtabmaplib/build
$ rm CMackeCache.txt
$ cmake ..

 And which version of OpenCV?

I use XCode 5.1.1 too, OpenCV 2.4.9 on Mac Os X 10.9.4. If you can use Ubuntu, 
I recommend to use it on Ubuntu instead of Mac OS X, there are stability issues 
with PCL and VTK on Mac OS X (thought maybe I have a wrong version of VTK to 
use with latest PCL).

Original comment by matla...@gmail.com on 17 Sep 2014 at 8:46

GoogleCodeExporter commented 9 years ago
OUTPUT OF CMake: 
-- The C compiler identification is Clang
-- The CXX compiler identification is Clang
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- checking for module 'eigen3'
--   found eigen3, version 3.1.1
-- Found eigen: /opt/local/include/eigen3 
-- Boost version: 1.50.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   iostreams
--   serialization
--   chrono
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Found openni: /usr/lib/libOpenNI.dylib 
-- checking for module 'openni2-dev'
--   package 'openni2-dev' not found
-- Could NOT find OpenNI2 (missing:  OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) 
** WARNING ** io features related to openni2 will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
-- Found libusb-1.0: /opt/local/include 
-- checking for module 'flann'
--   found flann, version 1.7.1
-- Found Flann: /opt/local/lib/libflann_cpp_s.a 
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- checking for module 'openni2-dev'
--   package 'openni2-dev' not found
-- Could NOT find OpenNI2 (missing:  OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) 
** WARNING ** visualization features related to openni2 will be disabled
-- Found qhull: /usr/local/lib/libqhull_p.dylib 
-- looking for PCL_COMMON
-- Found PCL_COMMON: /usr/local/lib/libpcl_common.dylib 
-- looking for PCL_OCTREE
-- Found PCL_OCTREE: /usr/local/lib/libpcl_octree.dylib 
-- looking for PCL_IO
-- Found PCL_IO: /usr/local/lib/libpcl_io.dylib 
-- looking for PCL_KDTREE
-- Found PCL_KDTREE: /usr/local/lib/libpcl_kdtree.dylib 
-- looking for PCL_SEARCH
-- Found PCL_SEARCH: /usr/local/lib/libpcl_search.dylib 
-- looking for PCL_SAMPLE_CONSENSUS
-- Found PCL_SAMPLE_CONSENSUS: /usr/local/lib/libpcl_sample_consensus.dylib 
-- looking for PCL_FILTERS
-- Found PCL_FILTERS: /usr/local/lib/libpcl_filters.dylib 
-- looking for PCL_2D
-- Found PCL_2D: /usr/local/include/pcl-1.8 
-- looking for PCL_GEOMETRY
-- Found PCL_GEOMETRY: /usr/local/include/pcl-1.8 
-- looking for PCL_FEATURES
-- Found PCL_FEATURES: /usr/local/lib/libpcl_features.dylib 
-- looking for PCL_ML
-- Found PCL_ML: /usr/local/lib/libpcl_ml.dylib 
-- looking for PCL_SEGMENTATION
-- Found PCL_SEGMENTATION: /usr/local/lib/libpcl_segmentation.dylib 
-- looking for PCL_VISUALIZATION
-- Found PCL_VISUALIZATION: /usr/local/lib/libpcl_visualization.dylib 
-- looking for PCL_SURFACE
-- Found PCL_SURFACE: /usr/local/lib/libpcl_surface.dylib 
-- looking for PCL_REGISTRATION
-- Found PCL_REGISTRATION: /usr/local/lib/libpcl_registration.dylib 
-- looking for PCL_KEYPOINTS
-- Found PCL_KEYPOINTS: /usr/local/lib/libpcl_keypoints.dylib 
-- looking for PCL_TRACKING
-- Found PCL_TRACKING: /usr/local/lib/libpcl_tracking.dylib 
-- looking for PCL_RECOGNITION
-- Found PCL_RECOGNITION: /usr/local/lib/libpcl_recognition.dylib 
-- looking for PCL_STEREO
-- Found PCL_STEREO: /usr/local/lib/libpcl_stereo.dylib 
-- looking for PCL_OUTOFCORE
-- Found PCL_OUTOFCORE: /usr/local/lib/libpcl_outofcore.dylib 
-- looking for PCL_PEOPLE
-- Found PCL_PEOPLE: /usr/local/lib/libpcl_people.dylib 
-- Found PCL: 
/opt/local/lib/libboost_system-mt.dylib;/opt/local/lib/libboost_filesystem-mt.dy
lib;/opt/local/lib/libboost_thread-mt.dylib;/opt/local/lib/libboost_date_time-mt
.dylib;/opt/local/lib/libboost_iostreams-mt.dylib;/opt/local/lib/libboost_serial
ization-mt.dylib;/opt/local/lib/libboost_chrono-mt.dylib;optimized;/usr/local/li
b/libpcl_common.dylib;debug;/usr/local/lib/libpcl_common.dylib;optimized;/usr/lo
cal/lib/libpcl_octree.dylib;debug;/usr/local/lib/libpcl_octree.dylib;/usr/lib/li
bOpenNI.dylib;vtkCommon;vtkFiltering;vtkImaging;vtkGraphics;vtkGenericFiltering;
vtkIO;vtkRendering;vtkVolumeRendering;vtkHybrid;vtkWidgets;vtkInfovis;vtkGeovis;
vtkViews;vtkCharts;optimized;/usr/local/lib/libpcl_io.dylib;debug;/usr/local/lib
/libpcl_io.dylib;optimized;/opt/local/lib/libflann_cpp_s.a;debug;/opt/local/lib/
libflann_cpp_s-gd.a;optimized;/usr/local/lib/libpcl_kdtree.dylib;debug;/usr/loca
l/lib/libpcl_kdtree.dylib;optimized;/usr/local/lib/libpcl_search.dylib;debug;/us
r/local/lib/libpcl_search.dylib;optimized;/usr/local/lib/libpcl_sample_consensus
.dylib;debug;/usr/local/lib/libpcl_sample_consensus.dylib;optimized;/usr/local/l
ib/libpcl_filters.dylib;debug;/usr/local/lib/libpcl_filters.dylib;optimized;/usr
/local/lib/libpcl_features.dylib;debug;/usr/local/lib/libpcl_features.dylib;opti
mized;/usr/local/lib/libpcl_ml.dylib;debug;/usr/local/lib/libpcl_ml.dylib;optimi
zed;/usr/local/lib/libpcl_segmentation.dylib;debug;/usr/local/lib/libpcl_segment
ation.dylib;optimized;/usr/local/lib/libpcl_visualization.dylib;debug;/usr/local
/lib/libpcl_visualization.dylib;optimized;/usr/local/lib/libqhull_p.dylib;debug;
/usr/local/lib/libqhull_p.dylib;optimized;/usr/local/lib/libpcl_surface.dylib;de
bug;/usr/local/lib/libpcl_surface.dylib;optimized;/usr/local/lib/libpcl_registra
tion.dylib;debug;/usr/local/lib/libpcl_registration.dylib;optimized;/usr/local/l
ib/libpcl_keypoints.dylib;debug;/usr/local/lib/libpcl_keypoints.dylib;optimized;
/usr/local/lib/libpcl_tracking.dylib;debug;/usr/local/lib/libpcl_tracking.dylib;
optimized;/usr/local/lib/libpcl_recognition.dylib;debug;/usr/local/lib/libpcl_re
cognition.dylib;optimized;/usr/local/lib/libpcl_stereo.dylib;debug;/usr/local/li
b/libpcl_stereo.dylib;optimized;/usr/local/lib/libpcl_outofcore.dylib;debug;/usr
/local/lib/libpcl_outofcore.dylib;optimized;/usr/local/lib/libpcl_people.dylib;d
ebug;/usr/local/lib/libpcl_people.dylib;/opt/local/lib/libboost_system-mt.dylib;
/opt/local/lib/libboost_filesystem-mt.dylib;/opt/local/lib/libboost_thread-mt.dy
lib;/opt/local/lib/libboost_date_time-mt.dylib;/opt/local/lib/libboost_iostreams
-mt.dylib;/opt/local/lib/libboost_serialization-mt.dylib;/opt/local/lib/libboost
_chrono-mt.dylib;optimized;/usr/local/lib/libqhull_p.dylib;debug;/usr/local/lib/
libqhull_p.dylib;/usr/lib/libOpenNI.dylib;optimized;/opt/local/lib/libflann_cpp_
s.a;debug;/opt/local/lib/libflann_cpp_s-gd.a;vtkCommon;vtkFiltering;vtkImaging;v
tkGraphics;vtkGenericFiltering;vtkIO;vtkRendering;vtkVolumeRendering;vtkHybrid;v
tkWidgets;vtkInfovis;vtkGeovis;vtkViews;vtkCharts (Required is at least version 
"1.7")
-- Found QVTK: /opt/local/lib/vtk-5.10/libQVTK.dylib 
-- Found ZLIB: /opt/local/lib/libz.dylib (found version "1.2.8")
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt4: /opt/local/bin/qmake (found version "4.8.2")
-- Found Pthreads
-- --------------------------------------------
-- Info :
--   CMAKE_INSTALL_PREFIX = /usr/local
--   CMAKE_BUILD_TYPE = Release
--   BUILD_SHARED_LIBS = OFF
--   BUILD_AS_BUNDLE = OFF
--   With Freenect = NO (libfreenect not found)
--   With OpenNI2  = NO (OpenNI2 not found)
-- --------------------------------------------
-- Configuring done
-- Generating done

I also use OpenCV 2.4.9. I will use Ubuntu if I cannot compile it in my mac 
finally. 

Original comment by cynthia....@gmail.com on 18 Sep 2014 at 8:41