Skip to content

Error when linking #4

@sarlinpe

Description

@sarlinpe

Hi there,

Thank you for the awesome work! I have successfully built the package with Python 3.6 and TF 1.4. (after some minor changes). When including it in a simple example, the linking fails with the following error:

CMakeFiles/test_tensorflow.dir/src/test_tensorflow.cc.o: In function `tensorflow::core::RefCounted::~RefCounted()':
test_tensorflow.cc:(.text._ZN10tensorflow4core10RefCountedD2Ev[_ZN10tensorflow4core10RefCountedD5Ev]+0xbd): undefined reference to `tensorflow::internal::LogMessageFatal::LogMessageFatal(char const*, int)'
test_tensorflow.cc:(.text._ZN10tensorflow4core10RefCountedD2Ev[_ZN10tensorflow4core10RefCountedD5Ev]+0xde): undefined reference to `tensorflow::internal::LogMessageFatal::~LogMessageFatal()'
CMakeFiles/test_tensorflow.dir/src/test_tensorflow.cc.o: In function `std::string* tensorflow::internal::MakeCheckOpString<long, int>(long const&, int const&, char const*)':
test_tensorflow.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc]+0x24): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)'
test_tensorflow.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc]+0x4b): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::ForVar2()'
test_tensorflow.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc]+0x66): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::NewString()'
test_tensorflow.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc]+0x75): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()'
test_tensorflow.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPSsRKT_RKT0_PKc]+0x89): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()'
collect2: error: ld returned 1 exit status
�[0mCMakeFiles/test_tensorflow.dir/build.make:88: recipe for target '/ws/devel/lib/example/test_tensorflow' failed
make[2]: *** [/ws/devel/lib/example/test_tensorflow] Error 1
CMakeFiles/Makefile2:249: recipe for target 'CMakeFiles/test_tensorflow.dir/all' failed
make[1]: *** [CMakeFiles/test_tensorflow.dir/all] Error 2
Makefile:126: recipe for target 'all' failed
make: *** [all] Error 2

Could this be due to libtensorflow_cc.so missing ? (as mentioned in tensorflow/tensorflow#2412 (comment)). If so, does this mean that linking against the pip-installed TF is a dead-end ?

Cheers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions