Skip to content

Commit

Permalink
Fixed compilation of ORboost. Windows binaries are provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier SM committed Nov 17, 2017
1 parent f1bc33e commit 4ed78e1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.mexa64
*.mexw64
*.exe
*.dll
src/Experiments
src/Algorithms/orensemble/boostrank-*
*~
Expand Down
11 changes: 6 additions & 5 deletions doc/windows-install.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# Windows instalation process

The following steps provide all the methos but 'ORBoost':
The following steps provide all the methods but 'ORBoost':

1. Install a [supported compiler](https://es.mathworks.com/support/compilers.html). The easier way is to use the "Add-ons" assistant to download
and install [MinGW](http://es.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html).
1. Test [basic C example](https://es.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c++-compiler) to ensure `mex` is propertly working.
1. Inside MATLAB's console, run `make` in folder `src\Algorithms`
1. From `src` run `runtestssingle` to check the instalation.

To compile 'ORBoost' you need to install 'w64-mingw32':
We provide binaries and dlls for 'ORBoost' to avoid the *complex* build task in Windows. Make will unpak all the binary files. If you need to compile your own binaries, these are the steeps.

1. Open a terminal by presing Windows key and tipping 'cmd.exe'.
1. Set Windows path to your 'w64-mingw32' installation binaries dir, for instance:
1. Install [w64-mingw32](https://mingw-w64.org).
1. Open a terminal by presing Windows key and type `cmd.exe`.
1. Set Windows path to your `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%"
```
1. Change to directory `orca\src\Algorithms\orensemble\` (Right now only works in `orca\src\Algorithms\orensemble\orensemble\`.).
1. Move to directory `orca\src\Algorithms\orensemble\orensemble`.
1. Run `mingw32-make.exe Makefile.win all`.
15 changes: 6 additions & 9 deletions src/Algorithms/orensemble/Makefile.win
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
all: untar
all:
mingw32-make -e -C orensemble
mv orensemble/boostrank-predict .
mv orensemble/boostrank-train .

untar:
#tar xzf orensemble.tar.gz

clean:
#rm -Rf orensemble
move orensemble\boostrank-predict.exe .
move orensemble\boostrank-train.exe .
copy "orensemble\libgcc_s_seh-1.dll" .
copy "orensemble\libstdc++-6.dll" .
copy "orensemble\libwinpthread-1.dll" .
11 changes: 8 additions & 3 deletions src/Algorithms/orensemble/make.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
% ORBoost does not have a matlab's interface. There we use external
% Makefile
% Makefile
function make(opt)
if nargin < 1
try
system('make');
if ispc
warning('Compilation of ORBoost is not supported from MATLAB console in Windows. Unpaking binaries. Please see instalation instructions. ')
unzip('orensemble-binaries-win.zip')
else
system('make');
end
catch err
fprintf('Error: %s failed\n', err.stack(1).file);
disp(err.message);
Expand All @@ -17,4 +22,4 @@ function make(opt)
otherwise
error('make option "%s" not recognized', opt)
end
end
end
Binary file not shown.

0 comments on commit 4ed78e1

Please sign in to comment.