Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failed on OSX library not found for -lgomp #825

Closed
skevidu opened this Issue Dec 4, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@skevidu
Copy link

commented Dec 4, 2015

Build failed on Mac OSX version 10.10.5
Anyone can help?

ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lib/libmxnet.so] Error 1
make: *** Waiting for unfinished jobs....
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: lib/libmxnet.a(mxrtc.o) has no symbols
In file included from tools/im2rec.cc:21:
In file included from /usr/local/Cellar/opencv/2.4.12/include/opencv2/opencv.hpp:56:
/usr/local/Cellar/opencv/2.4.12/include/opencv2/ml/ml.hpp:961:18: warning: 'CvForestTree::train'
hides overloaded virtual functions [-Woverloaded-virtual]
virtual bool train( CvDTreeTrainData* trainData, const CvMat* _subsample_idx, CvRTrees...
^
/usr/local/Cellar/opencv/2.4.12/include/opencv2/ml/ml.hpp:867:18: note: hidden overloaded virtual
function 'CvDTree::train' declared here: different number of parameters (2 vs 3)
virtual bool train( CvMLData* trainData, CvDTreeParams params=CvDTreeParams() );
^
/usr/local/Cellar/opencv/2.4.12/include/opencv2/ml/ml.hpp:877:26: note: hidden overloaded virtual
function 'CvDTree::train' declared here: different number of parameters (8 vs 3)
CV_WRAP virtual bool train( const cv::Mat& trainData, int tflag,
^
/usr/local/Cellar/opencv/2.4.12/include/opencv2/ml/ml.hpp:1149:18: warning: 'CvBoostTree::train'
hides overloaded virtual functions [-Woverloaded-virtual]
virtual bool train( CvDTreeTrainData* trainData,
^
/usr/local/Cellar/opencv/2.4.12/include/opencv2/ml/ml.hpp:867:18: note: hidden overloaded virtual
function 'CvDTree::train' declared here: different number of parameters (2 vs 3)
virtual bool train( CvMLData* trainData, CvDTreeParams params=CvDTreeParams() );
^
/usr/local/Cellar/opencv/2.4.12/include/opencv2/ml/ml.hpp:877:26: note: hidden overloaded virtual
function 'CvDTree::train' declared here: different number of parameters (8 vs 3)
CV_WRAP virtual bool train( const cv::Mat& trainData, int tflag,
^
2 warnings generated.
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/im2rec] Error 1

@piiswrong

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2015

The same error is mentioned in #749

@skevidu

This comment has been minimized.

Copy link
Author

commented Dec 4, 2015

Thanks.
solved from the suggestion from #749:

brew install clang-omp
make CXX=clang-omp++

update:
follow the new installation guide, fixed by link:
ln -s /usr/local/opt/gcc/lib/gcc/5/libgomp.dylib /usr/local/lib/libgomp.dylib
then:
make -j4

some people may follow the path /usr/local/Cellar/gcc .... to find libgomp.dylib
for example:
/usr/local/Cellar/gcc/5.2.0/lib/gcc/5/libgomp.dylib

@skevidu skevidu closed this Dec 4, 2015

@ShirleyLee1995

This comment has been minimized.

Copy link

commented Mar 23, 2016

appletekiMacBook-Air-3:bin apple$ brew install clang-omp
Warning: clang-omp-2015-04-01 already installed
appletekiMacBook-Air-3:bin apple$ make CXX=clang-omp++
make: *** No targets specified and no makefile found. Stop.
why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.