in Blog Posts, Solution

[Libsvm]libsvm for matlab compilation error on mac

Error:

>> make
/bin/bash: -c: line 0: unexpected EOF while looking for matching `"'
/bin/bash: -c: line 1: syntax error: unexpected end of file
??? Error using ==> mex at 208
Unable to complete successfully.

Error in ==> make at 5
mex -O -largeArrayDims -I..\ -c ..\svm.cpp

Fix:

  1. Under folder ./libsvm-3.1/matlab
  2. Open file make.m
  3. replace backslash(\) to slash(/)
  4. save and close file
  5. execute the make command inside matlab


Error:

>> make
i686-apple-darwin10-gcc-4.2.1: svm.obj: No such file or directory
i686-apple-darwin10-gcc-4.2.1: svm_model_matlab.obj: No such file or directory

    mex: link of ' "svmtrain.mexmaci64"' failed.

??? Error using ==> mex at 208
Unable to complete successfully.

Error in ==> make at 7
mex -O -largeArrayDims -I../ svmtrain.c svm.obj svm_model_matlab.obj

Fix:

  1. Open the make.m file again
  2. Replace all the occurrences of .obj to .o
  3. Save and close
  4. Try again!

Hope these help :]

Leave a Reply for Yan Cancel Reply

Write a Comment

Comment

  1. 你们在用SVM?牛逼!
    我们实验室一个师弟就是从这个实验室(林智仁)出来的~~