Prev: Help with Mex and Libsvm
Next: Wind Turbine Doubly-Fed Induction Generator (Phasor Type)1 in demo
From: Achy Main Gupta on 31 Mar 2010 03:20 I was hoping I can get some help setting up Libsvm on my Mac book. I downloaded Libsvm from the server http://www.csie.ntu.edu.tw/~cjlin/libsvm/ and I am trying to "make" the mexglx files which I can call from matlab. To do this I make the following changes in the Makefile: MATLABDIR ?= /Applications/MATLAB_R2008b.app CFLAGS = -Wall -Wconversion -O3 -fPIC -I$(MATLABDIR)/extern/include -I/Developer/SDKs/MacOSX10.5.sdk/usr/include When I do make, I get the following output: g++ -Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include -c svm.cpp g++ -Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include -c svm_model_matlab.c /Applications/MATLAB_R2008b.app/bin/mex CC#g++ CXX#g++ CFLAGS#"-Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include" CXXFLAGS#"-Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include" -largeArrayDims svmpredict.c svm.o svm_model_matlab.o ld: library not found for -lbundle1.o collect2: ld returned 1 exit status mex: link of ' "svmpredict.mexmaci"' failed. Since the CFLAGS required searching the non-standard directory /Developer/SDKs/MacOSX10.5.sdk/usr/include (without this it doesn't work), is it possible that I need to make this or something else available to mex after which this would work? I am a dummy as far as command line stuff, mex, and compiling things from source goes.
From: Oliver Woodford on 31 Mar 2010 05:43 "Achy Main Gupta" <ayatchingpuma(a)gmail.com> wrote in message <hout37$7tp$1(a)fred.mathworks.com>... > I was hoping I can get some help setting up Libsvm on my Mac book. > > I downloaded Libsvm from the server http://www.csie.ntu.edu.tw/~cjlin/libsvm/ and I am trying to "make" the mexglx files which I can call from matlab. > > To do this I make the following changes in the Makefile: > > MATLABDIR ?= /Applications/MATLAB_R2008b.app > > CFLAGS = -Wall -Wconversion -O3 -fPIC -I$(MATLABDIR)/extern/include -I/Developer/SDKs/MacOSX10.5.sdk/usr/include > > > When I do make, I get the following output: > > g++ -Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include -c svm.cpp > g++ -Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include -c svm_model_matlab.c > /Applications/MATLAB_R2008b.app/bin/mex CC#g++ CXX#g++ CFLAGS#"-Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include" CXXFLAGS#"-Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include" -largeArrayDims svmpredict.c svm.o svm_model_matlab.o > ld: library not found for -lbundle1.o > collect2: ld returned 1 exit status > > mex: link of ' "svmpredict.mexmaci"' failed. > > Since the CFLAGS required searching the non-standard directory > > /Developer/SDKs/MacOSX10.5.sdk/usr/include > > (without this it doesn't work), is it possible that I need to make this or something else available to mex after which this would work? > > I am a dummy as far as command line stuff, mex, and compiling things from source goes. Did you download the zip file which also contains the mex wrapper? In that case you should just call the MATLAB function "make"(.m) which comes with the package, from within MATLAB.
From: Achy Main on 31 Mar 2010 15:59 I did as you suggested (from within matlab call the make.m script), and this is the error I get /Applications/MATLAB_R2008b.app/bin/mex: line 1026: gcc-4.0: command not found /Applications/MATLAB_R2008b.app/bin/mex: line 1005: gcc-4.0: command not found /Applications/MATLAB_R2008b.app/bin/mex: line 931: g++-4.0: command not found mex: compile of ' "svm.cpp"' failed. "Oliver Woodford" <o.j.woodford.98(a)cantab.net> wrote in message <hov5f8$75$1(a)fred.mathworks.com>... > "Achy Main Gupta" <ayatchingpuma(a)gmail.com> wrote in message <hout37$7tp$1(a)fred.mathworks.com>... > > I was hoping I can get some help setting up Libsvm on my Mac book. > > > > I downloaded Libsvm from the server http://www.csie.ntu.edu.tw/~cjlin/libsvm/ and I am trying to "make" the mexglx files which I can call from matlab. > > > > To do this I make the following changes in the Makefile: > > > > MATLABDIR ?= /Applications/MATLAB_R2008b.app > > > > CFLAGS = -Wall -Wconversion -O3 -fPIC -I$(MATLABDIR)/extern/include -I/Developer/SDKs/MacOSX10.5.sdk/usr/include > > > > > > When I do make, I get the following output: > > > > g++ -Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include -c svm.cpp > > g++ -Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include -c svm_model_matlab.c > > /Applications/MATLAB_R2008b.app/bin/mex CC#g++ CXX#g++ CFLAGS#"-Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include" CXXFLAGS#"-Wall -Wconversion -O3 -fPIC -I/Applications/MATLAB_R2008b.app/extern/include -I//Developer/SDKs/MacOSX10.5.sdk/usr/include" -largeArrayDims svmpredict.c svm.o svm_model_matlab.o > > ld: library not found for -lbundle1.o > > collect2: ld returned 1 exit status > > > > mex: link of ' "svmpredict.mexmaci"' failed. > > > > Since the CFLAGS required searching the non-standard directory > > > > /Developer/SDKs/MacOSX10.5.sdk/usr/include > > > > (without this it doesn't work), is it possible that I need to make this or something else available to mex after which this would work? > > > > I am a dummy as far as command line stuff, mex, and compiling things from source goes. > > Did you download the zip file which also contains the mex wrapper? In that case you should just call the MATLAB function "make"(.m) which comes with the package, from within MATLAB.
From: Oliver Woodford on 31 Mar 2010 17:33 "Achy Main" wrote: > I did as you suggested (from within matlab call the make.m script), and this is the error I get > > /Applications/MATLAB_R2008b.app/bin/mex: line 1026: gcc-4.0: command not found > /Applications/MATLAB_R2008b.app/bin/mex: line 1005: gcc-4.0: command not found > /Applications/MATLAB_R2008b.app/bin/mex: line 931: g++-4.0: command not found > > mex: compile of ' "svm.cpp"' failed. This is a problem with your mex setup. Try calling mex -setup and selecting a valid compiler.
|
Pages: 1 Prev: Help with Mex and Libsvm Next: Wind Turbine Doubly-Fed Induction Generator (Phasor Type)1 in demo |