Caffe Compile Error

991 views
Skip to first unread message

Jacky Wang

unread,
Feb 22, 2015, 5:10:51 PM2/22/15
to caffe...@googlegroups.com
Hi all, 
I have followed http://caffe.berkeleyvision.org/installation.html#compilation to use the cmake copmilation. 
I was successful in the "cmake .." step from my build folder. However, when I do "make all" inside the build folder. I reached around 85% completion and the compiler erred out with the following message. I'm on Max OSX 10.9.5 (Mavericks).

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

Not sure if people have seen such error before and how they went about solving it. Any suggestion is greatly appreciated. Thank you in advance!

Anatoly Baksheev

unread,
Feb 22, 2015, 5:41:57 PM2/22/15
to Jacky Wang, caffe...@googlegroups.com

My advise is to use Cuda 7.0 and re-install all dependencies without the "-stdlib=libstdc++" step



-- Anatoly

--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/563c61fe-58c1-46f8-9a95-373cd9c279ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jacky Wang

unread,
Feb 23, 2015, 1:29:38 PM2/23/15
to caffe...@googlegroups.com, jackyw...@gmail.com
Thank you Anatoly. I will try that and share the results with others here.

Jacky Wang

unread,
Feb 23, 2015, 8:13:45 PM2/23/15
to caffe...@googlegroups.com
Hi, 
After installing CUDA 7, it did get rid of the previous linking errors that I have. Again, I'm on Mac OSX10.9.5.

However, I'm seeing new errors:

Linking CXX executable caffe

Undefined symbols for architecture x86_64:

  "google::SetUsageMessage(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:

      _main in caffe.cpp.o

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]: *** [tools/caffe] Error 1

make[1]: *** [tools/CMakeFiles/caffe.bin.dir/all] Error 2

make: *** [all] Error 2

Not sure if anyone can shed some light. Thank you in advance.



Jacky Wang

unread,
Feb 23, 2015, 8:56:58 PM2/23/15
to caffe...@googlegroups.com
It finally finished make all without errors at the end.
I forgot to remove the formula edits that I have done previously when I had CUDA 6.5 (which is described here http://caffe.berkeleyvision.org/install_osx.html  under libstcd++ installation section).

However, upon make runtest, I eventually get 

[----------] 12 tests from DataLayerTest/3, where TypeParam = N5caffe9DoubleGPUE

[ RUN      ] DataLayerTest/3.TestReadLevelDB

*** Aborted at 1424742506 (unix time) try "date -d @1424742506" if you are using GNU date ***

PC: @        0x1106b2bd0 boost::detail::thread_data_base::~thread_data_base()

*** SIGSEGV (@0x1) received by PID 44698 (TID 0x7fff7d310310) stack trace: ***

    @     0x7fff93a2d5aa _sigtramp

    @                0x0 (unknown)

    @        0x11041b1af boost::detail::thread_data<>::~thread_data()

    @        0x1106b3948 boost::thread::join_noexcept()

    @        0x110418e5e caffe::InternalThread::WaitForInternalThreadToExit()

    @        0x11042eb75 caffe::BasePrefetchingDataLayer<>::JoinPrefetchThread()

    @        0x1104bc21a caffe::BasePrefetchingDataLayer<>::Forward_gpu()

    @        0x10fc52423 caffe::Layer<>::Forward()

    @        0x10fce8e0d caffe::DataLayerTest<>::TestRead()

    @        0x10ffabb3c testing::internal::HandleExceptionsInMethodIfSupported<>()

    @        0x10ff996da testing::Test::Run()

    @        0x10ff9a4d2 testing::TestInfo::Run()

    @        0x10ff9abe0 testing::TestCase::Run()

    @        0x10ffa1505 testing::internal::UnitTestImpl::RunAllTests()

    @        0x10ffac564 testing::internal::HandleExceptionsInMethodIfSupported<>()

    @        0x10ffa10e9 testing::UnitTest::Run()

    @        0x10fc92aed main

    @     0x7fff8e4345fd start

    @                0x2 (unknown)

/bin/sh: line 1: 44698 Segmentation fault: 11  /Users/jackywang/Desktop/231a/project/cs231a_project_2/caffe/build/test/test.testbin --gtest_shuffle

make[3]: *** [src/caffe/test/CMakeFiles/runtest] Error 139

make[2]: *** [src/caffe/test/CMakeFiles/runtest.dir/all] Error 2

make[1]: *** [src/caffe/test/CMakeFiles/runtest.dir/rule] Error 2

make: *** [runtest] Error 2

Not sure if it's still a compilation problem? 

I would really appreciate any comments. Thank you in advance!

Jacky Wang

unread,
Feb 24, 2015, 2:39:09 PM2/24/15
to caffe...@googlegroups.com
After brew uninstalling a few formulas, boost snappy leveldb protobuf gflags glog szip lmdb, and brew installing them again.
My "make runtest" completed. However, it has this final message:
"YOU HAVE 2 DISABLED TESTS"

Not sure if that's a default behavior for others. Hopefully those tests aren't critical.

Evan Shelhamer

unread,
Feb 24, 2015, 3:51:25 PM2/24/15
to Jacky Wang, caffe...@googlegroups.com
"YOU HAVE 2 DISABLED TESTS"

This is fine -- there are two tests for a math function that was not yet implemented so the test are disabled. At this point we'll likely just strip them out. 

Evan Shelhamer

--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages