addons: Missing symbol for Abseil ParseTime Op

Describe the bug Since the 20101030 nightly, our library fails when opening the _parse_time_op.so because of an undefined symbol error. Typically this occurs when there is an ABI incompatibility between core TensorFlow and our custom-ops.

tensorflow.python.framework.errors_impl.NotFoundError: .../custom_ops/text/_parse_time_op.so: undefined symbol: _ZN4absl9ParseTimeERKSsS1_PNS_4TimeEPSs

This particular custom-op utilizes absl and the mangled symbol name does not match what our compiled operation thinks it should be. I’m not really sure how this would happen since the rest of the TensorFlow library was compiled with a compatible gcc version.

CC’ing some people who may have insight into how this can happen: @yifeif @r4nt @perfinion @gunan

I suppose we could make absl a dependency in our TFA build and compile it ourselves but this seems to be going down a bad path.

Failing Log: https://source.cloud.google.com/results/invocations/a71d103a-ecac-421c-bc53-ef06648fdc9f/targets/tensorflow_addons%2Fubuntu%2Fgpu%2Fpy3%2Fpresubmit/log

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (12 by maintainers)

Commits related to this issue

Most upvoted comments

After discussion with @r4nt, it might be better to not pass the absl dependency to _parse_time_op.so, but rather add alwayslink = 1 to the absl library. (thus make sure that absl symbols are present in @local_config_tf//:libtensorflow_framework)

The reason for this is, if we pass absl as a dependency, we may end up linking global initializers multiple times.

I can send out a fix for this tomorrow.

@seanpmorgan it appears to work now with

tf-nightly                2.1.0.dev20191119
tfa-nightly               0.7.0.dev20191119

Unfortunately this fix caused internal breakages, so we’ll be rolling it back. Whatever the solution is, it will be cherrypicked onto r2.1. I’ll keep you updated.

The PR that fixed this was reverted in 5acf6bd. An internal PR that’ll fix this and similar issues by reverting the change that introduced these errors is in the process of being merged.

Yep, seems like it is related to f58c9f8, which changes what we export, see https://github.com/bazelbuild/bazel/issues/7362.

The absl symbols probably came from here, and due to f58c9f8 we just don’t export the symbol anymore. I think the right way forward is to make _parse_time_op.so depend on absl.

@scentini for whether this might be due to us not exporting all symbols from absl any more