Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix flatbuffers link error
This commit:
tensorflow/tf-build-actions@adf6e22#diff-4bdae93a605044a27f9df49a92bcf398L129
Removed the linkopts section from the cc_binary 'flatc' from
third_party/flatbuffers/BUILD.bazel. That caused builds to fail with:
/usr/bin/ld: bazel-out/host/bin/external/flatbuffers/src/libflatbuffers.a(idl_parser.o): undefined reference to symbol 'cos@@GLIBC_2.17'
/dt7/lib/powerpc64le-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
(This is GPU builds on ppc64le)
I tried passing
--linkopt=-lm
on the bazel build command but it still failed.Restoring the original linkopts section does resolve this problem. (and it
seems better to have the linkopt here than globally for the entire build)
A simple
linkopts = ["-lm"],
works for ppc64le, but I figured for windows andother platforms it was better to restore the original values.