OpenCV 2.4.13 not compiling on Suse Linux 11 SP1 64 bit

asked 2017-09-30 18:44:23 -0500

I'm trying to compile, getting the following error.

[ 52%] Generating opencl_kernels.cpp, opencl_kernels.hpp CMake Error at /root/itanyplace/opencv-2.4.13/cmake/cl2cpp.cmake:50 (string): string does not recognize sub-command MD5

make[2]: * [modules/ocl/opencl_kernels.cpp] Error 1 make[1]: [modules/ocl/CMakeFiles/opencv_ocl.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 52%] Built target opencv_ts [ 60%] Built target opencv_legacy make: * [all] Error 2

It is failing to recognize the MD5 command as attached.

Can you please help?

C:\fakepath\Screen Shot 2017-09-30 at 6.39.12 PM.png

edit retag flag offensive close merge delete

Comments

please do not post images of your error messages, but replace it with a text version.

berak gravatar imageberak ( 2017-09-30 20:23:18 -0500 )edit

looks like your cmake is outdated

berak gravatar imageberak ( 2017-09-30 20:30:03 -0500 )edit

Thank you for the answer. I got past that but I am not able to compile the java module. From the output of cmake looks like I dont have have the java module. " -- OpenCV modules: -- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab"

I checked, I see the following error that seems to be related: "-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "2.6")"

I have Python 2.6 installed. I have set the following variables: export PYTHON_LIBRARY=/usr/lib64/python2.6 export PYTHON_INCLUDE=/usr/include/python2.6 Dont understand why am I getting the error and if that is the reason I dont see java module.

DallasMaverick gravatar imageDallasMaverick ( 2017-10-01 00:29:45 -0500 )edit

for java you need the apache ant tool installed

for python, it needs the python headers & libs (dev-packages) and numpy

berak gravatar imageberak ( 2017-10-01 01:02:40 -0500 )edit
1

OK, thank you! Installing ANT worked. Will let you know how it goes.

DallasMaverick gravatar imageDallasMaverick ( 2017-10-01 10:22:16 -0500 )edit

i'd actually be happy about a little writeup from you, how you did it, and what exactly worked in the end, this would make a perfect answer here !

berak gravatar imageberak ( 2017-10-01 10:32:20 -0500 )edit

OK, here we go.

  1. My first error " 52%] Generating opencl_kernels.cpp, opencl_kernels.hpp CMake Error at /root/itanyplace/opencv-2.4.13/cmake/cl2cpp.cmake:50 (string): string does not recognize sub-command MD5" was resolved after I downloaded cmake binary executable version 3.9.3 from https://cmake.org/download/.
  2. Then the build was successful but then I realized that there was no jar being generated which is what I needed.
  3. Upon reading the OpenCV FAQs I realized that I had to check the output of cmake to see if Java was the included module.
  4. The only error that I saw in the cmake out was PYTHON related - "Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "2.6")""
  5. I thought may be that is why the jar wasn't being generated.
DallasMaverick gravatar imageDallasMaverick ( 2017-10-01 13:43:19 -0500 )edit
  1. Then you clarified that for Java what I needed was the ANT.
  2. I downloaded and installed Apache ANT 1.9.9 (since I have Java 1.7) binary from http://ant.apache.org/bindownload.cgi.
  3. After setting ANT_HOME, I was able to see the java module present in the list of modules to be built from the output of cmake
  4. Finally I executed make -j8 and opencv-2413.jar was successfully generated.
DallasMaverick gravatar imageDallasMaverick ( 2017-10-01 13:46:42 -0500 )edit