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

make error in lib (on mac os 10.11.6 El Capitan) #11

Closed
pchankh opened this issue Jan 2, 2017 · 3 comments
Closed

make error in lib (on mac os 10.11.6 El Capitan) #11

pchankh opened this issue Jan 2, 2017 · 3 comments

Comments

@pchankh
Copy link

pchankh commented Jan 2, 2017

When running make in lib directory, I am getting the error

ndefined symbols for architecture x86_64:
"tensorflow::DEVICE_CPU", referenced from:
___cxx_global_var_init.15 in roi_pooling_op-db8872.o
___cxx_global_var_init.18 in roi_pooling_op-db8872.o
"tensorflow::DEVICE_GPU", referenced from:
___cxx_global_var_init.20 in roi_pooling_op-db8872.o
___cxx_global_var_init.22 in roi_pooling_op-db8872.o
"tensorflow::GetNodeAttr(tensorflow::AttrSlice const&, tensorflow::StringPiece, float*)", referenced from:
tensorflow::Status tensorflow::OpKernelConstruction::GetAttr(tensorflow::StringPiece, float*) const in roi_pooling_op-db8872.o
"tensorflow::GetNodeAttr(tensorflow::AttrSlice const&, tensorflow::StringPiece, int*)", referenced from:
tensorflow::Status tensorflow::OpKernelConstruction::GetAttr(tensorflow::StringPiece, int*) const in roi_pooling_op-db8872.o
"tensorflow::TensorShape::SlowCopyFrom(tensorflow::TensorShape const&)", referenced from:
tensorflow::TensorShape::TensorShape(tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
"tensorflow::TensorShape::DestructorOutOfLine()", referenced from:
tensorflow::TensorShape::~TensorShape() in roi_pooling_op-db8872.o
"tensorflow::TensorShape::TensorShape()", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper const&)", referenced from:
___cxx_global_var_init in roi_pooling_op-db8872.o
___cxx_global_var_init.11 in roi_pooling_op-db8872.o
"tensorflow::OpDefBuilder::Attr(tensorflow::StringPiece)", referenced from:
tensorflow::register_op::OpDefBuilderWrapper::Attr(tensorflow::StringPiece) in roi_pooling_op-db8872.o
"tensorflow::OpDefBuilder::Input(tensorflow::StringPiece)", referenced from:
tensorflow::register_op::OpDefBuilderWrapper::Input(tensorflow::StringPiece) in roi_pooling_op-db8872.o
"tensorflow::OpDefBuilder::Output(tensorflow::StringPiece)", referenced from:
tensorflow::register_op::OpDefBuilderWrapper::Output(tensorflow::StringPiece) in roi_pooling_op-db8872.o
"tensorflow::OpDefBuilder::OpDefBuilder(tensorflow::StringPiece)", referenced from:
tensorflow::register_op::OpDefBuilderWrapper::OpDefBuilderWrapper(char const*) in roi_pooling_op-db8872.o
"tensorflow::kernel_factory::OpKernelRegistrar::InitInternal(tensorflow::KernelDef const*, tensorflow::StringPiece, tensorflow::OpKernel* ()(tensorflow::OpKernelConstruction))", referenced from:
tensorflow::kernel_factory::OpKernelRegistrar::OpKernelRegistrar(tensorflow::KernelDef const*, tensorflow::StringPiece, tensorflow::OpKernel* ()(tensorflow::OpKernelConstruction)) in roi_pooling_op-db8872.o
"tensorflow::OpKernelContext::CtxFailure(tensorflow::Status)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelContext::allocate_output(int, tensorflow::TensorShape const&, tensorflow::Tensor**)", referenced from:
RoiPoolingKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolingGradKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelContext::CtxFailureWithWarning(tensorflow::Status)", referenced from:
RoiPoolingKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolingGradKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelContext::input(int)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::KernelDefBuilder::TypeConstraint(char const*, tensorflow::DataType)", referenced from:
tensorflow::KernelDefBuilder& tensorflow::KernelDefBuilder::TypeConstraint(char const*) in roi_pooling_op-db8872.o
tensorflow::KernelDefBuilder& tensorflow::KernelDefBuilder::TypeConstraint(char const*) in roi_pooling_op-db8872.o
"tensorflow::KernelDefBuilder::Device(char const*)", referenced from:
___cxx_global_var_init.15 in roi_pooling_op-db8872.o
___cxx_global_var_init.18 in roi_pooling_op-db8872.o
___cxx_global_var_init.20 in roi_pooling_op-db8872.o
___cxx_global_var_init.22 in roi_pooling_op-db8872.o
"tensorflow::KernelDefBuilder::KernelDefBuilder(char const*)", referenced from:
tensorflow::register_kernel::Name::Name(char const*) in roi_pooling_op-db8872.o
"tensorflow::TensorShapeUtils::MakeShape(int const*, long long, tensorflow::TensorShape*)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelConstruction::CtxFailure(tensorflow::Status)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::RoiPoolGradOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelConstruction::CtxFailureWithWarning(tensorflow::Status)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::RoiPoolGradOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
"tensorflow::OpDef::~OpDef()", referenced from:
tensorflow::OpRegistrationData::~OpRegistrationData() in roi_pooling_op-db8872.o
"tensorflow::Status::Status(tensorflow::error::Code, tensorflow::StringPiece)", referenced from:
tensorflow::Status tensorflow::errors::InvalidArgument<char const*, int>(char const*, int) in roi_pooling_op-db8872.o
tensorflow::Status tensorflow::errors::InvalidArgument<char const*>(char const*) in roi_pooling_op-db8872.o
"tensorflow::strings::FastInt32ToBufferLeft(int, char*)", referenced from:
tensorflow::strings::AlphaNum::AlphaNum(int) in roi_pooling_op-db8872.o
"tensorflow::strings::StrCat(tensorflow::strings::AlphaNum const&)", referenced from:
tensorflow::Status tensorflow::errors::InvalidArgument<char const*>(char const*) in roi_pooling_op-db8872.o
"tensorflow::strings::StrCat(tensorflow::strings::AlphaNum const&, tensorflow::strings::AlphaNum const&)", referenced from:
tensorflow::Status tensorflow::errors::InvalidArgument<char const*, int>(char const*, int) in roi_pooling_op-db8872.o
"tensorflow::OpKernel::OpKernel(tensorflow::OpKernelConstruction*)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::RoiPoolGradOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
"tensorflow::OpKernel::~OpKernel()", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::~RoiPoolOp() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::~RoiPoolOp() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::~RoiPoolOp() in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::RoiPoolGradOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
...
"tensorflow::internal::LogMessageFatal::LogMessageFatal(char const*, int)", referenced from:
tensorflow::core::RefCounted::~RefCounted() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
void tensorflow::Tensor::FillDimsAndValidateCompatibleShape<1ul>(std::__1::array<long, 1ul>, tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
tensorflow::TensorShape::dims() const in roi_pooling_op-db8872.o
void tensorflow::Tensor::FillDimsAndValidateCompatibleShape<1ul>(tensorflow::gtl::ArraySlice, std::__1::array<long, 1ul>
) const in roi_pooling_op-db8872.o
tensorflow::KernelDefBuilder::~KernelDefBuilder() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
...
"tensorflow::internal::LogMessageFatal::~LogMessageFatal()", referenced from:
tensorflow::core::RefCounted::~RefCounted() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
void tensorflow::Tensor::FillDimsAndValidateCompatibleShape<1ul>(std::__1::array<long, 1ul>, tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
tensorflow::TensorShape::dims() const in roi_pooling_op-db8872.o
void tensorflow::Tensor::FillDimsAndValidateCompatibleShape<1ul>(tensorflow::gtl::ArraySlice, std::__1::array<long, 1ul>
) const in roi_pooling_op-db8872.o
tensorflow::KernelDefBuilder::~KernelDefBuilder() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
...
"tensorflow::internal::CheckOpMessageBuilder::ForVar2()", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<long long, long long>(long long const&, long long const&, char const*) in roi_pooling_op-db8872.o
"tensorflow::internal::CheckOpMessageBuilder::NewString()", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<long long, long long>(long long const&, long long const&, char const*) in roi_pooling_op-db8872.o
"tensorflow::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<long long, long long>(long long const&, long long const&, char const*) in roi_pooling_op-db8872.o
"tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<long long, long long>(long long const&, long long const&, char const*) in roi_pooling_op-db8872.o
"tensorflow::AttrSlice::AttrSlice(tensorflow::NodeDef const&)", referenced from:
tensorflow::Status tensorflow::OpKernelConstruction::GetAttr(tensorflow::StringPiece, int*) const in roi_pooling_op-db8872.o
tensorflow::Status tensorflow::OpKernelConstruction::GetAttr(tensorflow::StringPiece, float*) const in roi_pooling_op-db8872.o
"tensorflow::TensorShape::dim_size(int) const", referenced from:
tensorflow::Tensor::dim_size(int) const in roi_pooling_op-db8872.o
"Eigen::GpuDevice const& tensorflow::OpKernelContext::eigen_deviceEigen::GpuDevice() const", referenced from:
RoiPoolingKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolingGradKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
"tensorflow::Tensor::CheckTypeAndIsAligned(tensorflow::DataType) const", referenced from:
tensorflow::TTypes<float, 1ul, long>::ConstTensor tensorflow::Tensor::shaped<float, 1ul>(tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
tensorflow::TTypes<float, 1ul, long>::Tensor tensorflow::Tensor::shaped<float, 1ul>(tensorflow::gtl::ArraySlice) in roi_pooling_op-db8872.o
tensorflow::TTypes<int, 1ul, long>::Tensor tensorflow::Tensor::shaped<int, 1ul>(tensorflow::gtl::ArraySlice) in roi_pooling_op-db8872.o
tensorflow::TTypes<double, 1ul, long>::ConstTensor tensorflow::Tensor::shaped<double, 1ul>(tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
tensorflow::TTypes<double, 1ul, long>::Tensor tensorflow::Tensor::shaped<double, 1ul>(tensorflow::gtl::ArraySlice) in roi_pooling_op-db8872.o
tensorflow::TTypes<int, 1ul, long>::ConstTensor tensorflow::Tensor::shaped<int, 1ul>(tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
"typeinfo for tensorflow::OpKernel", referenced from:
typeinfo for RoiPoolOp<Eigen::ThreadPoolDevice, float> in roi_pooling_op-db8872.o
typeinfo for RoiPoolOp<Eigen::ThreadPoolDevice, double> in roi_pooling_op-db8872.o
typeinfo for RoiPoolOp<Eigen::GpuDevice, float> in roi_pooling_op-db8872.o
typeinfo for RoiPoolGradOp<Eigen::GpuDevice, float> in roi_pooling_op-db8872.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Seems to me cython created so is having problem linking up.
any help? thanks.

@pchankh
Copy link
Author

pchankh commented Jan 3, 2017

Can we have an understanding what versions / requirements of each modules you are using for this build?

@eisneim
Copy link

eisneim commented Feb 4, 2017

i solved make error with these steps on my Mac Sierra

  1. make sure cuda is in correct path, setup.py assumes cuda lib in '/usr/local/cuda/lib64', in my case, i put cuda lib in /usr/local/cuda/lib so i need to create a symbolic link use "ln -s /usr/local/cuda/lib /usr/local/cuda/lib64"

  2. if you use python3 with tensorflow you need to install tensorflow for python2

  3. if you encountered "error: no matching function for call to '_nms'"
    you need to manually change "nms/gpu_nms.cpp" file that's generated by cython.
    you need to cast long* to int* by adding "(int*)" to first argument like this:
    _nms((int*)(&(*_Pyx_BufPtrStrided1d( .......... (rest of code)........

  4. if you encountered ld: symbol(s) not found for architecture x86_64 or nvcc fatal : Unknown option 'undefined'
    in lib/make.sh change nvcc compiler flags, remove $CXXFLAGS like this:

nvcc -std=c++11 -c -o roi_pooling_op.cu.o roi_pooling_op_gpu.cu.cc \
		-I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC \
		-arch=sm_37

hope this will help

@CharlesShang
Copy link
Owner

@eisneim Thank you for your comments.

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

3 participants