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

OSX wont link #105

Open
samhodge opened this issue Nov 3, 2017 · 0 comments
Open

OSX wont link #105

samhodge opened this issue Nov 3, 2017 · 0 comments

Comments

@samhodge
Copy link

samhodge commented Nov 3, 2017

HodgeFalysiMac2:torch hodgefamily$ CC=gcc-4.7 CXX=g++-4.7 luarocks install loadcaffe
Installing https://raw.githubusercontent.com/torch/rocks/master/loadcaffe-1.0-0.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/loadcaffe-1.0-0.rockspec... switching to 'build' mode
Cloning into 'loadcaffe'...
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 18 (delta 0), reused 5 (delta 0), pack-reused 0
Receiving objects: 100% (18/18), 19.28 KiB | 3.86 MiB/s, done.
cmake -E make_directory build;
cd build;
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/Volumes/Hodge/dev/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/Volumes/Hodge/dev/torch/install/lib/luarocks/rocks/loadcaffe/1.0-0";
make

-- The C compiler identification is GNU 4.7.4
-- The CXX compiler identification is GNU 4.7.4
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-4.7
-- Check for working C compiler: /usr/local/bin/gcc-4.7 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-4.7
-- Check for working CXX compiler: /usr/local/bin/g++-4.7 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /Volumes/Hodge/dev/torch/install
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found version "3.4.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_loadcaffe-1.0-0-4786/loadcaffe/build

The I get the error

[100%] Linking CXX shared module libloadcaffe.so
Undefined symbols for architecture x86_64:
"google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void ()(std::basic_string<char, std::char_traits, std::allocator > const&))", referenced from:
caffe::protobuf_caffe_2eproto::(anonymous namespace)::AddDescriptorsImpl() in caffe.pb.cc.o
"google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::basic_string<char, std::char_traits, std::allocator > const&, unsigned char
)", referenced from:
caffe::WindowDataParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in caffe.pb.cc.o
caffe::PythonParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in caffe.pb.cc.o
caffe::InfogainLossParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in caffe.pb.cc.o
caffe::ImageDataParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in caffe.pb.cc.o
caffe::HDF5OutputParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in caffe.pb.cc.o
caffe::HDF5DataParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in caffe.pb.cc.o
caffe::DataParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in caffe.pb.cc.o
...
"google::protobuf::internal::WireFormatLite::WriteString(int, std::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::io::CodedOutputStream*)", referenced from:
caffe::NetStateRule::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::NetState::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::NetParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::V1LayerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::LayerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::SolverParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
"google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::io::CodedOutputStream*)", referenced from:
caffe::Datum::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
"google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::io::CodedOutputStream*)", referenced from:
caffe::PythonParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::InfogainLossParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::HDF5OutputParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::HDF5DataParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::WindowDataParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::ImageDataParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
caffe::DataParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in caffe.pb.cc.o
...
"google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::basic_string<char, std::char_traits, std::allocator >)", referenced from:
caffe::WindowDataParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream
) in caffe.pb.cc.o
caffe::PythonParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in caffe.pb.cc.o
caffe::InfogainLossParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in caffe.pb.cc.o
caffe::ImageDataParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in caffe.pb.cc.o
caffe::HDF5OutputParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in caffe.pb.cc.o
caffe::HDF5DataParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in caffe.pb.cc.o
caffe::DataParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in caffe.pb.cc.o
...
"google::protobuf::internal::AssignDescriptors(std::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)", referenced from:
caffe::protobuf_caffe_2eproto::(anonymous namespace)::protobuf_AssignDescriptors() in caffe.pb.cc.o
"google::protobuf::internal::OnShutdownDestroyString(std::basic_string<char, std::char_traits, std::allocator > const*)", referenced from:
caffe::protobuf_caffe_2eproto::TableStruct::InitDefaultsImpl() in caffe.pb.cc.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [libloadcaffe.so] Error 1
make[1]: *** [CMakeFiles/loadcaffe.dir/all] Error 2
make: *** [all] Error 2

I am all out of idea, any help would be appreciated.

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

No branches or pull requests

1 participant