For the moment, I prefer being on 3.20 version... I applied the patch http://hg.orfeo-toolbox.org/OTB/rev/37307b7cb2aa and now I have issues with OpenCV with the include dir : /Users/mdurupt/DEV/OTB/OTB-3.20.0/Code/UtilitiesAdapters/OpenCVAdapters/otbOpenCVUtils.h:21:10: fatal error: 'opencv2/opencv.hpp' file not found #include <opencv2/opencv.hpp>
So, I guess there is a problem with include dir of OpenCV. I don't understand if the output of cmake "OpenCV include directory: /include/opencv;/include" is for display only ? Is there a patch for this problem ? Thanks 2014-07-07 15:49 GMT+02:00 Rashad M <[email protected]>: > Hello, > > This bug gas been reported earlier on osgeo4-mac hombrew[1] and also in > otb mantis tracker[2]. The proposed patch is integreated in OTB > mercurial[3] but later Guillaume provided another fix on the issue [4]. > > So you could either use any of the patch from [3] or [4]. BTW, if you dont > have a specific reason to stick to 3.20 version, cloning trunk would be > easy and it also clear your concern about OpenCV's "/usr/local" . > > If you face issues you can always come back. > > > [1] https://github.com/OSGeo/homebrew-osgeo4mac/issues/24 > [2] http://bugs.orfeo-toolbox.org/view.php?id=926 > [3] http://hg.orfeo-toolbox.org/OTB/rev/c472da2be83d > [4] http://hg.orfeo-toolbox.org/OTB/rev/37307b7cb2aa > > Hope it helps > > > On Mon, Jul 7, 2014 at 1:29 PM, Mélanie Durupt <[email protected]> > wrote: > >> Ok, here is -v invocation of clang : >> >> Linking CXX shared module ../../bin/otbapp_ComputeConfusionMatrix.dylib >> >> Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) >> >> Target: x86_64-apple-darwin13.2.0 >> >> Thread model: posix >> >> >> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" >> -demangle -dynamic -arch x86_64 -bundle -macosx_version_min 10.9.0 >> -syslibroot >> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk >> -o ../../bin/otbapp_ComputeConfusionMatrix.dylib >> -headerpad_max_install_names >> CMakeFiles/otbapp_ComputeConfusionMatrix.dir/otbComputeConfusionMatrix.cxx.o >> ../../bin/libOTBApplicationEngine.3.20.0.dylib >> ../../bin/libOTBIO.3.20.0.dylib ../../bin/libOTBCommon.3.20.0.dylib >> ../../bin/libOTBBasicFilters.3.20.0.dylib >> ../../bin/libITKBasicFilters.3.20.0.dylib >> ../../bin/libotbedison.3.20.0.dylib >> ../../bin/libOTBCurlAdapters.3.20.0.dylib ../../bin/libITKIO.3.20.0.dylib >> ../../bin/libITKSpatialObject.3.20.0.dylib ../../bin/libotbkml.3.20.0.dylib >> ../../bin/libotbexpat.3.20.0.dylib ../../bin/libotbtinyXML.3.20.0.dylib >> ../../bin/libotbliblas.3.20.0.dylib >> ../../bin/libOTBOGRAdapters.3.20.0.dylib >> ../../bin/libotbopenjpeg.1111.1.0.dylib ../../bin/libOTBCommon.3.20.0.dylib >> ../../bin/libITKAlgorithms.3.20.0.dylib >> ../../bin/libITKNumerics.3.20.0.dylib >> ../../bin/libITKStatistics.3.20.0.dylib >> ../../bin/libitkNetlibSlatec.3.20.0.dylib >> ../../bin/libotbconfigfile.3.20.0.dylib >> ../../bin/libotbmuparser.3.20.0.dylib >> ../../bin/libOTBOssimAdapters.3.20.0.dylib >> ../../bin/libITKCommon.3.20.0.dylib ../../bin/libitkvnl_inst.3.20.0.dylib >> ../../bin/libitkvnl_algo.3.20.0.dylib >> ../../bin/libitkv3p_netlib.3.20.0.dylib ../../bin/libitkvnl.3.20.0.dylib >> ../../bin/libitkvcl.3.20.0.dylib ../../bin/libitkv3p_lsqr.3.20.0.dylib -lm >> ../../bin/libitksys.3.20.0.dylib -lm >> ../../bin/libotbossimplugins.18162.1.0.dylib >> ../../bin/libotbossim.21971.1.0.dylib >> /Users/mdurupt/DEV/OTB/tiff-4.0.3/lib/libtiff.dylib >> /Users/mdurupt/DEV/OTB/libgeotiff-1.4.0/lib/libgeotiff.dylib >> /Users/mdurupt/DEV/OTB/gdal-1.11.0/lib/libgdal.dylib >> /Users/mdurupt/DEV/OTB/jpeg-8d/lib/libjpeg.dylib >> ../../bin/libOpenThreads.1.9.5.dylib -lpthread -lc++ -lSystem >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a >> >> Undefined symbols for architecture x86_64: >> >> "otb::Image<int, 2u>* >> otb::Wrapper::InputImageParameter::GetImage<otb::Image<int, 2u> >()", >> referenced from: >> >> otb::Image<int, 2u>* >> otb::Wrapper::Application::GetParameterImage<otb::Image<int, 2u> >> >(std::__1::basic_string<char, std::__1::char_traits<char>, >> std::__1::allocator<char> >) in otbComputeConfusionMatrix.cxx.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/otbapp_ComputeConfusionMatrix.dylib] Error 1 >> >> make[1]: *** >> [Applications/Classification/CMakeFiles/otbapp_ComputeConfusionMatrix.dir/all] >> Error 2 >> >> make: *** [all] Error 2 >> >> >> >> >> Le lundi 7 juillet 2014 11:13:57 UTC+2, Mélanie Durupt a écrit : >> >>> Hi >>> >>> I'm trying to compile OTB (3.2...) with OpenCV (2.4.9) on Mavericks and >>> I have some difficulties... >>> I apply patch mentioned here : https://groups.google.com/ >>> forum/#!searchin/otb-users/maverick/otb-users/dRjdIxlDWfs/8dDgRzrUoCQJ >>> and I can compile OTB without opencv. >>> When I check OTB_USE_OPENCV, I have weird messages during cmake and >>> google didn't helped me : >>> >>> Importing OpenCV... >>> >>> Enabling OpenCV support >>> >>> OpenCV ARCH: >>> >>> OpenCV RUNTIME: >>> >>> OpenCV STATIC: OFF >>> >>> CMake Warning at >>> /Users/mdurupt/DEV/OTB/opencv-2.4.9/cmake/OpenCVConfig.cmake:161 >>> (message): >>> >>> Found OpenCV Windows Pack but it has not binaries compatible with your >>> >>> configuration. >>> >>> >>> You should manually point CMake variable OpenCV_DIR to your build of >>> OpenCV >>> >>> library. >>> >>> Call Stack (most recent call first): >>> >>> CMake/ImportOpenCV.cmake:8 (FIND_PACKAGE) >>> >>> CMakeLists.txt:238 (INCLUDE) >>> >>> >>> CMake Error at CMake/ImportOpenCV.cmake:8 (FIND_PACKAGE): >>> >>> Found package configuration file: >>> >>> /Users/mdurupt/DEV/OTB/opencv-2.4.9/cmake/OpenCVConfig.cmake >>> >>> but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be >>> >>> NOT FOUND. >>> >>> Call Stack (most recent call first): >>> >>> CMakeLists.txt:238 (INCLUDE) >>> >>> Configuring incomplete, errors occurred! >>> >>> >>> OpenCV_DIR and OpenCV_CONFIG_PATH point to /Users/mdurupt/.../opencv-2.4. >>> 9/cmake/ >>> >>> >>> Then, I installed OpenCV in /usr/local (instead of a directory like >>> /Users/mdurupt/.../opencv-2.4.9/, solution that I would prefer...) >>> >>> >>> Cmake for OTB fails again : >>> >>> Importing OpenCV... >>> >>> Enabling OpenCV support >>> >>> CMake Error at CMake/ImportOpenCV.cmake:8 (FIND_PACKAGE): >>> >>> Found package configuration file: >>> >>> >>> /usr/local/share/OpenCV/OpenCVConfig.cmake >>> >>> >>> but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be >>> >>> NOT FOUND. >>> >>> Call Stack (most recent call first): >>> >>> CMakeLists.txt:238 (INCLUDE) >>> >>> >>> so I checked OpenCV_FOUND >>> >>> >>> Then, cmake is now apparently OK, but compilation failed. >>> When I check messages during cmake, I have : >>> >>> Importing OpenCV... >>> >>> Enabling OpenCV support >>> >>> Found OpenCV 2.4.9 >>> >>> OpenCV include directory: /include/opencv;/include >>> >>> >>> but OpenCV include directory is in */usr/local/*include... >>> >>> >>> Compilation fails with the message : >>> >>> [ 97%] Built target otbapp_MultivariateAlterationDetector >>> >>> [ 97%] Built target otbapp_ClassificationMapRegularization >>> >>> Linking CXX shared module ../../bin/otbapp_ComputeConfusionMatrix.dylib >>> >>> Undefined symbols for architecture x86_64: >>> >>> "otb::Image<int, 2u>* >>> otb::Wrapper::InputImageParameter::GetImage<otb::Image<int, >>> 2u> >()", referenced from: >>> >>> otb::Image<int, 2u>* otb::Wrapper::Application:: >>> GetParameterImage<otb::Image<int, 2u> >(std::__1::basic_string<char, >>> std::__1::char_traits<char>, std::__1::allocator<char> >) in >>> otbComputeConfusionMatrix.cxx.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/otbapp_ComputeConfusionMatrix.dylib] Error 1 >>> >>> make[1]: *** [Applications/Classification/CMakeFiles/otbapp_ >>> ComputeConfusionMatrix.dir/all] Error 2 >>> >>> make: *** [all] Error 2 >>> >>> >>> I tried to add variable OPENCV_INCLUDE_DIRS and define with >>> /usr/local/include, but I have the same cmake message (OpenCV include >>> directory: /include/opencv;/include) and the same compilation error... >>> >>> Has anyone encountered these problems (and solved them) ? >>> >>> >>> Thanks a lot ! >>> >>> >>> Mélanie >>> >> -- >> -- >> Check the OTB FAQ at >> http://www.orfeo-toolbox.org/FAQ.html >> >> You received this message because you are subscribed to the Google >> Groups "otb-users" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/otb-users?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "otb-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Regards, > Rashad > > -- > -- > Check the OTB FAQ at > http://www.orfeo-toolbox.org/FAQ.html > > You received this message because you are subscribed to the Google > Groups "otb-users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/otb-users?hl=en > --- > You received this message because you are subscribed to a topic in the > Google Groups "otb-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/otb-users/oy0p_wuvegY/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- Check the OTB FAQ at http://www.orfeo-toolbox.org/FAQ.html You received this message because you are subscribed to the Google Groups "otb-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/otb-users?hl=en --- You received this message because you are subscribed to the Google Groups "otb-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
