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

building on OS X 10.9 #6

Closed
psycharo-zz opened this issue Jan 15, 2014 · 3 comments
Closed

building on OS X 10.9 #6

psycharo-zz opened this issue Jan 15, 2014 · 3 comments

Comments

@psycharo-zz
Copy link

there are some problems when building for OS X 10.9 (clang-500.2.79).

It seems that it has to do primarily with linking.
Editing this line to allow not only GCC makes it possible to proceed further, but then I get undefined references to (so it seems) OpenCV (even though it is installed):

--  Has OpenCV (Image manipulation)          : Yes (System) [Version: 2.4.6.1, Has non-free: 1]

Error log:

Linking CXX shared library ../../lib/libmrpt-vision.dylib
clang: warning: argument unused during compilation: '-pthread'
Undefined symbols for architecture x86_64:
  "cv::FeatureDetector::detect(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat const&) const", referenced from:
      mrpt::vision::CFeatureExtraction::extractFeaturesFAST(mrpt::utils::CImage const&, mrpt::vision::CFeatureList&, unsigned int, unsigned int, mrpt::vision::TImageROI const&, mrpt::math::CMatrixTemplate<bool> const*) const in CFeatureExtraction_FAST.cpp.o
      mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(mrpt::utils::CImage const&, mrpt::vision::CFeatureList&, unsigned int, unsigned int, mrpt::vision::TImageROI const&) const in CFeatureExtraction_SIFT.cpp.o
  "cv::DescriptorExtractor::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const", referenced from:
      mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(mrpt::utils::CImage const&, mrpt::vision::CFeatureList&, unsigned int, unsigned int, mrpt::vision::TImageROI const&) const in CFeatureExtraction_SIFT.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]: *** [lib/libmrpt-vision.1.0.3.dylib] Error 1
make[1]: *** [libs/vision/CMakeFiles/mrpt-vision.dir/all] Error 2
make: *** [all] Error 2
@jlblancoc
Copy link
Member

Thanks for the pointer: the patch for CLang is not in master.

On the linking error, I can only give these ideas:

  • Build with: "VERBOSE=1 make" to see the full linker command line.
  • Perhaps you have 2 conflicting versions of OpenCV in the system?
  • This is not a solution, but if you don't need OpenCV in MRPT you can just check the (advanced option) DISABLE_OpenCV in CMake.

@psycharo-zz
Copy link
Author

OK, the problem with linking was due to the fact that in OS X 10.9 standard library has changed to libc++ (whereas it is forces to be libstdc++ in mrpt). There are still some problems after that, which can be fixed by using a newer version of octomap, and substituting GNU extensions with something else (it might be a good idea not to use those at all to make the library cross-compiler compatible).
But then, I was not able to compile the hw library and some of the apps, though the tests for the libraries that do not depend on that passed OK.

@jlblancoc
Copy link
Member

Could you please attach a patch with the fixes you had to make? Thanks.

jlblancoc added a commit that referenced this issue Jun 10, 2016
Old classes `CPTG%d` have been renamed to describe each path type. Old
PTGs #6 and #7 have been removed for lack of practical use.
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

2 participants