This a detailed install guide. If you have not done it yet, please try the Quick Install steps before continuing. After this, if you are here, that means that there have been some errors when building the mex
files.
mex
files in GNU/Linuxmake.m
scripts could fail if the compiler is not correctly installed and configured. In those cases, please try mex -setup
to choose a suitable compiler for mex
. Make sure your compiler is accessible. Then type make
to start the installation.
If neither make.m
nor mex -setup
works, the simplest way to compile all the algorithms is to use the Makefile included in ORCA. This will compile all the algorithms and clean intermediate object files.
mex
files for Matlab from the GNU/Linux terminalFor building the mex files in MATLAB, you need to properly configure the MATLABDIR variable of Makefile, in order to point out to the MATLAB installation directory (for instance MATLABDIR = /usr/local/MATLAB/R2017b
). Then, from the bash
terminal:
$ cd src/
$ make
mex
files for Octave from the GNU/Linux terminalFor building the mex
files in Octave, you will need to configure the OCTAVEDIR variable in the Makefile. This variable has to point out to the Octave heather files (for instance, OCTAVEDIR = /usr/include/octave-4.0.0/octave/
). Then, from the bash
terminal:
$ cd src/
$ make octave
mex
files in WindowsIn Windows, we recommend compiling mex
files from Octave/MATLAB console.
mex
files in Windows for OctaveDefault Octave installation provides mex
command pre-configured with MinGW
.
make
in folder src\Algorithms
src
run runtests_single
to check the installation.mex
files in Windows for Matlabmex
is properly working.make
in src\Algorithms
.runtests_single
in src
to check the instalation.We provide binaries and dlls for ‘ORBoost’, because building this method in Windows can be very complex. Make will unpack all the binary files. If you need to compile your own binaries, these are the steps:
cmd.exe
.w64-mingw32
installation binaries dir, for instance:
set PATH=C:\Program Files\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev0\mingw64\bin;"%PATH%"
orca\src\Algorithms\orensemble\orensemble
.mingw32-make.exe Makefile.win all
.If you are not able to compile all the algorithms using the above methods, we recommend individually compiling them. Under GNU/Linux, please, edit the files src/Algorithms/libsvm-rank-2.81/matlab/Makefile
, src/Algorithms/libsvm-weights-3.12/matlab/Makefile
, src/Algorithms/SVOREX/Makefile
and src/Algorithms/SVORIM/Makefile
. Make sure that the variables MATLABDIR
or OCTAVEDIR
are correctly pointing to the folders. For MATLAB, you can also make a symbolic link to your current Matlab installation folder:
$ sudo ln -s /path/to/matlab /usr/local/matlab
The following subsections provides individual instructions for compiling each of the dependencies in case the global Makefile still fails or for those which are working in other operating systems.
These instructions are adapted from the corresponding README of libsvm
. First, you should open MATLAB/Octave console and then cd
to the directory src/Algorithms/libsvm-weights-3.12/matlab
. After that, try to compile the MEX
files using make.m
(from the MATLAB/Octave console):
>> cd src/Algorithms/libsvm-weights-3.12/matlab
>> make
To compile this dependency, the instructions are similar to those of libsvm-weights-3.12
(from the MATLAB/Octave console):
>> cd src/Algorithms/libsvm-rank-2.81/matlab
>> make
For both algorithms, please use the make.m
file included in them (from the MATLAB/Octave console):
>> cd src/Algorithms/SVOREX
>> make
>> cd ..
>> cd SVORIM
>> make
We have not prepared a proper MEX interface for ORBoost, so the binary files of this algorithm should be compiled and are then invoked directly from Matlab. For compiling the ORBoost algorithm, you should uncompress the file orsemble.tar.gz
and compile the corresponding source code. In GNU/Linux, this can be done by (from the bash
console):
$ cd src/Algorithms/orensemble
$ tar zxf orensemble.tar.gz
$ cd orensemble/
$ make
g++ -Ilemga-20060516/lemga -Wall -Wshadow -Wcast-qual -Wpointer-arith -Wconversion -Wredundant-decls -Wwrite-strings -Woverloaded-virtual -D NDEBUG -O3 -funroll-loops -c -o robject.o lemga-20060516/lemga/object.cpp
...
Then, you should move the binary files to ..
folder and clean the folder (from the bash
console):
$ mv boostrank-predict ../
$ mv boostrank-train ../
$ cd ..
$ rm -Rf orensemble