ShaoqingRen / SPP_net

SPP_net : Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition
364 stars 237 forks source link

Compiling liblinear via Matlab on mac #16

Open roseperrone opened 9 years ago

roseperrone commented 9 years ago

liblinear depends on OpenMP, which gcc4.9 supports. I tried to make sure Matlab uses gcc4.9, and some evidence indicates it does, and some that it doesn't. This is the error I find:

external/liblinear-1.93_multicore/matlab/train.cpp:7:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^
1 error generated.

    mex: compile of ' "external/liblinear-1.93_multicore/matlab/train.cpp"' failed.

I made sure to change the /openmp option to -fopenmp because I'm on mac.

I asked this question on StackOverflow: http://stackoverflow.com/questions/26724667/openmp-not-available-on-mac-with-gcc-4-9.

wuxinhong commented 9 years ago

hello beauty,nice to meet you

sunshineatnoon commented 9 years ago

You need to change mat lab's compiler to real gcc rather than Xcode's clang compiler. Try this:http://stackoverflow.com/questions/20340117/omp-h-library-isnt-found-in-the-gcc-version-4-2-1-in-mavericks , the second answer works for me on mac 10.9.

samuelhoover commented 4 years ago

@roseperrone Was there ever a solution to your problem? Currently experiencing a similar issue with MATLAB 2019b on Catalina 10.15.4.