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

Building on OSX Mavericks #42

Closed
mayankjuneja opened this issue Jan 20, 2014 · 21 comments
Closed

Building on OSX Mavericks #42

mayankjuneja opened this issue Jan 20, 2014 · 21 comments

Comments

@mayankjuneja
Copy link

Any pointers on getting it running on OSX 10.9 (Mavericks). I am getting the following OpenCV error while building caffe:

"ld: symbol(s) not found for architecture x86_64"

I found references to issues with OpenCV on Mavericks, but no solution has worked for me.

The complete error log can be seen here:
https://gist.github.com/mayankjuneja/8517932

@amiltonwong
Copy link

Hi, Mayank ,

Pls see https://github.com/BVLC/caffe/wiki/Installation-(OSX)  ,  OSX

10.9 is not suitable for installing caffe by now. You can try on OS 10.7.x
Lion.

Best regards,
Milton

2014/1/20 Mayank Juneja notifications@github.com

Any pointers on getting it running on OSX 10.9 (Mavericks). I am getting
the following OpenCV error while building caffe:

"ld: symbol(s) not found for architecture x86_64"

I found references to issues with OpenCV on Mavericks, but no solution has
worked for me.

The complete error log can be seen here:
https://gist.github.com/mayankjuneja/8517932


Reply to this email directly or view it on GitHubhttps://github.com//issues/42
.

@mayankjuneja
Copy link
Author

Thanks @amiltonwong! I will try it on Lion.

Regards,
Mayank

@shelhamer
Copy link
Member

There are now instructions for installation on 10.9 to workaround the libstdc++ issue until CUDA on OSX is updated to link against libc++.

@ramialbatal
Copy link

Hi guys, I am still having the same error now on Marvericks:

"ld: symbol(s) not found for architecture x86_64"
I followed all the instructions, any special remark or advice about it?
Thank you very much

@sguada
Copy link
Contributor

sguada commented Apr 25, 2014

Make sure you have the LD_LIBRARY and DYLD_LIBRARY paths in your
environment variables.

Sergio

2014-04-25 8:03 GMT-07:00 ramialbatal notifications@github.com:

Hi guys, I am still having the same error now on Marvericks:

"ld: symbol(s) not found for architecture x86_64"
I followed all the instructions, any special remark or advice about it?
Thank you very much


Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-41402615
.

@shelhamer
Copy link
Member

On 10.9 (Mavericks) the recommendation is to set
DYLD_FALLBACK_LIBRARY_PATH and not LD_LIBRARY_PATH. I have my
environment configured in this way.

Le vendredi 25 avril 2014, Sergio Guadarrama notifications@github.com a
écrit :

Make sure you have the LD_LIBRARY and DYLD_LIBRARY paths in your
environment variables.

Sergio

2014-04-25 8:03 GMT-07:00 ramialbatal notifications@github.com:

Hi guys, I am still having the same error now on Marvericks:

"ld: symbol(s) not found for architecture x86_64"
I followed all the instructions, any special remark or advice about it?
Thank you very much


Reply to this email directly or view it on GitHub<
https://github.com/BVLC/caffe/issues/42#issuecomment-41402615>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-41403667
.

@ramialbatal
Copy link

@sguada Thanks Sergio, I did what you suggested, no change unfortunately.
What is the source of this problem?

@ramialbatal
Copy link

@shelhamer @sguada
Thanks for the suggestions, I tried them both but the result is the same unfortunately

Here is the error log when I do 'make all' : https://gist.github.com/ramialbatal/d3dfa6ca3f0ee54199c6

@ramialbatal
Copy link

Guys the problem was that I forgot to un-comment the linke in the Makefile.config:
CXXFLAGS := -stdlib=libstdc++
Now it seems to build correctly.

@sguada
Copy link
Contributor

sguada commented Apr 26, 2014

Glad you got it working. I think that was already part of the instructions, isn't it?

@ramialbatal
Copy link

Yes it is. it's my fault, sorry for that. :)

@shelhamer
Copy link
Member

@sguada it is part of the instructions on master, and it's now done automatically by platform detection in dev.

@ramialbatal glad you figured it out.

@askender
Copy link

when run make runtest , got:
F0721 00:15:27.975770 2058203920 syncedmem.cpp:47] Check failed: error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version

I have tried any method I found.
Is there anyone know how to fix it? Thanks~

@shelhamer
Copy link
Member

The error is clear: install a newer NVIDIA driver. Your CUDA library version is too high for whatever driver you have installed.

http://www.nvidia.com/Download/index.aspx

@felixshiyong
Copy link

Hi, I have the same problem when runing make runtest with @askender . @shelhamer I have already updated my NVIDIA driver in my Macbook pro, ox maverick. The problem still remains.

::
[ RUN ] MaxPoolingDropoutTest/2.TestSetup
E0925 16:16:34.379639 2107171600 common.cpp:108] Cannot create Cublas handle. Cublas won't be available.
E0925 16:16:34.384251 2107171600 common.cpp:115] Cannot create Curand generator. Curand won't be available.
E0925 16:16:34.384302 2107171600 common.cpp:135] Curand not available. Skipping setting the curand seed.
[ OK ] MaxPoolingDropoutTest/2.TestSetup (6 ms)
[ RUN ] MaxPoolingDropoutTest/2.TestBackward
F0925 16:16:34.385355 2107171600 syncedmem.cpp:57] Check failed: error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version

Many thanks

@felixshiyong
Copy link

Although no respond, thanks all the same. I figure out the problem.

@bhack
Copy link
Contributor

bhack commented Sep 26, 2014

If you can share the solution you could let this thread to be useful to others before we close it.

@jackywang529
Copy link

Hi
I'm wondering if anyone has run into issues with
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libcaffe.dylib] Error 1
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
make: *** [all] Error 2

I was following the CMake compilation from caffe: http://caffe.berkeleyvision.org/installation.html#compilation

This error occurred when I was doing make all, and I'm on Mavericks 10.9.5.
I also tried to install libstdc++ following caffe instruction: http://caffe.berkeleyvision.org/install_osx.html
However, it still doesn't work.

I also did not find lib/libcaffe.dylib or src/caffe/CMakeFiles/caffe.dir/all files in my build folder, not sure if those are missing as a result of my build failure or the cause.

Full error log: https://github.com/jackywang529/myOpenCV/blob/master/OpenCV/OpenCVTutorial2/errorLog

Any suggestion is greatly appreciated! Thanks!

@rajish
Copy link

rajish commented Apr 29, 2015

On Yosemite I've finally made it work using cmake:

mkdir build & cd build
cmake -DUSE_libstdcpp=ON ..
make all

@pythonanonuser
Copy link

I'm having the exact same issue as felixshiyong. I'm trying to build caffe with the python wrapper on Mac OSX 10.0, but keep getting the following error.

Check failed: error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version

I've updated the CUDA driver to the latest. Tried uninstalling and reinstalling, but the error still persists. Any advice would be much appreciated. Thanks!

lukeyeager added a commit to lukeyeager/caffe that referenced this issue Oct 21, 2015
CUDNN v4 upgrade.  Optionally, CNMEM used for GPU pool allocation.
naibaf7 added a commit that referenced this issue Aug 26, 2016
cmake/Cuda.cmake: properly spell '-std c++11' nvcc flag and do not repeat it twice in overlapping conditionals
@SepidehAlassi
Copy link

SepidehAlassi commented Nov 8, 2017

Hi
with make all I get the following error
Undefined symbols for architecture x86_64:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
any suggestion? I am using Mac OS X 10.12.

complete error message:
Undefined symbols for architecture x86_64:
"cv::imread(cv::String const&, int)", referenced from:
caffe::WindowDataLayer::load_batch(caffe::Batch) in window_data_layer.o
caffe::WindowDataLayer::load_batch(caffe::Batch
) in window_data_layer.o
caffe::ReadImageToCVMat(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, int, bool) in io.o
"cv::imdecode(cv::_InputArray const&, int)", referenced from:
caffe::DecodeDatumToCVMatNative(caffe::Datum const&) in io.o
caffe::DecodeDatumToCVMat(caffe::Datum const&, bool) in io.o
"cv::imencode(cv::String const&, cv::_InputArray const&, std::__1::vector<unsigned char, std::__1::allocator >&, std::__1::vector<int, std::__1::allocator > const&)", referenced from:
caffe::ReadImageToDatum(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, int, int, bool, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, caffe::Datum*) in io.o
"leveldb::DB::Open(leveldb::Options const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, leveldb::DB**)", referenced from:
caffe::db::LevelDB::Open(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, caffe::db::Mode) in db_leveldb.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests