Ask Your Question
1

Error using CMake for 3.0alpha VS2012

asked 2014-09-05 00:56:35 -0600

pistorinoj gravatar image

updated 2014-09-05 11:23:04 -0600

I recently downloaded the 3.0alpha and am attempting to compile it on a Win 8.1 machine using VS2012 64 bit and CMake 2.8.11.2. I also have CUDA 5.5 with an NVidia card.

When I try and configure the code using CMake, I get:

Checking for Windows Platform SDK
Checking for Visual Studio 2012
CUDA detected: 5.5
CUDA NVCC target flags: -gencode;arch=compute_11,code=sm_11;-gencode; arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13;-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_30,code=compute_30
Could NOT find PythonInterp: Found unsuitable version "1.4", but required is at least "2.7" (found C:/Python27/python.exe)
Could NOT find PythonInterp: Found unsuitable version "1.4", but required is at least "2.6" (found C:/Python27/python.exe)
Could NOT find PythonInterp: Found unsuitable version "1.4", but required is at least "3.4" (found C:/Python27/python.exe)
Could NOT find PythonInterp: Found unsuitable version "1.4", but required is at least "3.2" (found C:/Python27/python.exe)
Could NOT find JNI (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
Found VTK ver. 6.1.0 (usefile: C:/VTK/VTK-6.1.0/CMake/UseVTK.cmake)
CMake Error at modules/gpu/CMakeLists.txt:88 (ocv_add_precompiled_headers):
  Unknown CMake command "ocv_add_precompiled_headers".

Configuring incomplete, errors occurred!

I do have CMake set to the proper platform (Visual Studio 11 Win64) so I am wondering what the issue is. I also have Python3.4 installed in a c:\Python34 directory and do not have Python27 installed any longer. I also have VTK installed in a VTK directory.

I am a CMake newbie so it may be something stupid.

The last version I downloaded was 2.4.8 so do not know if this would have been an issue in 2.4.9.

Any help appreciated.

Thanks, James

edit retag flag offensive close merge delete

Comments

Add your complete CMAKE configuration as a starter!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-05 07:52:35 -0600 )edit

Steve, I am not sure what you mean. I edited my question to put in some more background. If you are asking about all of the CMake settings, I believe that I left them all at default and, given how many of them there are, I do not know an easy way to post them all. Thanks again for any help.

pistorinoj gravatar imagepistorinoj ( 2014-09-05 10:45:21 -0600 )edit

2 answers

Sort by » oldest newest most voted
2

answered 2014-09-05 23:29:50 -0600

pistorinoj gravatar image

I solved at least this issue. I downloaded OpenCV3.0 into the same directories that I had previously loaded 2.4.8 into. For whatever reason, that causes a CMake problem. I deleted the prior version of OpenCV entirely and reinstalled it fresh and it worked.

edit flag offensive delete link more
-1

answered 2014-11-27 22:32:44 -0600

poly gravatar image

I had the same issue and found that it happens when it fails to execute python.

In FindPythonInterp module of cmake, it tries to get the version number by running python command, and if it fails, it is considered as python 1.4. https://github.com/Kitware/CMake/blob/master/Modules/FindPythonInterp.cmake#L149

So I recommend you to execute python command and check if there is an error or not. In my case (Linux env), I got "python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory" error, and solved it by adding /usr/local/lib to LD_LIBRARY_PATH.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-09-05 00:56:35 -0600

Seen: 3,578 times

Last updated: Nov 27 '14