Hello,
On Mon, Jul 7, 2014 at 11:13 AM, Mélanie Durupt <[email protected]> wrote: > 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/ > > I guess you are using a build directory here - > /Users/mdurupt/.../opencv-2.4.9/ > If So, It is normal. > 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 > > > You manually put OpenCV_FOUND to true?. Well this is set to true or false by CMake and you dont want to do it. > 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... > > > This is strange but you are good to go. The /usr/local is not printed on cmake but this has been fixed in the mercurial version. > 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 > > > This error doesnt say that you have an issue with OpenCV. Could you post the -v invocation of clang so we could know more about it. you can add -v in CMAKE_CXX_FLAGS variable in cmake. > 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 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.
