-
Notifications
You must be signed in to change notification settings - Fork 74k
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
"undefined symbol" when compiling the example Op #9137
Comments
I tried the example with 1.0.1 and it worked for me. You might be using an unsupported operating system which has a weird version of GCC. We support Ubuntu Linux 14 LTE to 16. Mac OS X El Capitan. CentOS 7 and above. |
I'm using Ubuntu 16 with GCC 5. |
Interesting. So you installed the TensorFlow binary distro, which was probably built using GCC 4.x. Then compiled a custom op using GCC 5.x. Out of curiosity, could you try apt-get installing the GCC 4.x series and see if it works? If so, then I might want to bring to the attention of some other people that a binary compatibility problem exists. |
Sure, thanks for the quick response. I'll give it a try either tonight or tomorrow at some point and will let you know |
I've the exact same problem : ' undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv' . Does '_ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv' have a different error meaning with respect to '_ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev' ? We've defined our own custom op and our code works successfully with tensorflow 0.12.1 and it crashes with the above error with tensorflow 1.0.0. I'm using Ubuntu 16 with gcc version 5.4. Edit: |
@shashankneocfc Thanks for reporting back with the solution. It turns out we have the magic incantation |
I am facing this problem while adding a custom ops. lib_handle = py_tf.TF_LoadLibrary(library_filename) undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev TensorFlow version 2.2.0 |
Describe the problem clearly
Trying to build and compile the example in "adding a new op"
https://www.tensorflow.org/extend/adding_an_op
This was moved to
tensorflow/examples/adding_an_op
and was not updated in the tutorial page.
After compiling the zero_out_op_kernel_1.cc example, I'm trying to run the zero_out_1_test.py. Yet this returns the following error
File "zero_out_1_test.py", line 25, in
import zero_out_op_1
File "/home/me/tf_compile/tensorflow/tensorflow/examples/adding_an_op/zero_out_op_1.py", line 26, in
'zero_out_op_kernel_1.so'))
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: /home/me/tf_compile/tensorflow/tensorflow/examples/adding_an_op/zero_out_op_kernel_1.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev
Any ideas what could that symbol be?
The text was updated successfully, but these errors were encountered: