Can't find MATLAB

670 views
Skip to first unread message

Sut

unread,
Apr 1, 2017, 1:30:44 AM4/1/17
to Caffe Users
I use VS2015 and MATLAB R2016a, Try to install Caffe with GPU and MATLAB support.
However, when I use build_win.cmd to install, It can't find MATLAB :
I've set  -DBUILD_matlab:BOOL=ON ^  in build_win.cmd
It can't find the MATLAB.

Then I set 
 find_path(Matlab_DIR NAMES bin/mex bin/mexext PATHS ${__matlab_root} to  bin bin
in FindMatlabMex.cmake according to this ISSUE#2

However,It still cannot find the matlab.

ERROR:


CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindMatlab.cmake:575 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.7/Modules/FindMatlab.cmake:1353 (matlab_get_mex_suffix)
  cmake/Dependencies.cmake:205 (find_package)
  CMakeLists.txt:79 (include)


-- Could NOT find Matlab (missing:  Matlab_MEX_EXTENSION) (found version "9.0")
-- Python interface is disabled or not all required dependencies found. Building without it...

Please Help.Thanks.


#Before that there may another question,It cannot find pthread.h 
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building without python. Prebuilt dependencies will default to Python 2.7
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Boost version: 1.61.0
-- Found the following Boost libraries:

Then I add pthread.h manually. But I don't think that is the reason.

kai zhou

unread,
Apr 18, 2017, 10:54:07 AM4/18/17
to Caffe Users
Hi Sut, I have the same problem here. do u have solved it?


在 2017年4月1日星期六 UTC+2上午7:30:44,Sut写道:
Message has been deleted

Sut

unread,
Apr 20, 2017, 9:27:24 PM4/20/17
to Caffe Users
At last , I gave up using caffe in windows and I switch Ubuntu. The problem solved.
When I building the caffe in Ubuntu it also has this problem using cmake. But there is no problem using make. So I think that in Windows maybe the problem is also in cmake.

在 2017年4月1日星期六 UTC+8下午1:30:44,Sut写道:

Guillaume Dumont

unread,
Apr 21, 2017, 8:36:33 PM4/21/17
to Caffe Users
Have a look at the CMake documentation to find Matlab: https://cmake.org/cmake/help/v3.8/module/FindMatlab.html

You can set the matlab root directory there.

Guillaume Dumont

unread,
Apr 21, 2017, 8:38:08 PM4/21/17
to Caffe Users
Sorry I meant you can find how to set the MATLAB root directory.

-DMatlab_ROOT_DIR=path/to/matlab
Reply all
Reply to author
Forward
0 new messages