diff options
author | William D. Irons <wdirons@us.ibm.com> | 2018-05-24 13:49:05 -0500 |
---|---|---|
committer | Gunhan Gulsoy <gunan@google.com> | 2018-05-24 11:49:05 -0700 |
commit | 5aefa441276b5fdf2fec5e7cb282630c104f6f4a (patch) | |
tree | 6e58c838c39490bf940da1b502105accdabee8f8 /third_party/png.BUILD | |
parent | 3f8febf04b075eef0950a18c7e122f0addeacfe9 (diff) |
Fix ppc64le compile failure libpng (#19291)
Building Tensorflow on ppc64le fails with the message:
ERROR: /root/tensorflow/tensorflow/cc/BUILD:422:1: Linking of rule
'//tensorflow/cc:ops/control_flow_ops_gen_cc' failed (Exit 1)
bazel-out/host/bin/_solib_local/_U_S_Stensorflow_Scc_Cops_Scontrol_Uflow
_Uops_Ugen_Ucc___Utensorflow/libtensorflow_framework.so:
undefined reference to `png_init_filter_functions_vsx'
collect2: error: ld returned 1 exit status
This is fixed by adding powerpc specific files from the png archive
for @org_tensorflow//tensorflow:linux_ppc64le builds only.
Diffstat (limited to 'third_party/png.BUILD')
-rw-r--r-- | third_party/png.BUILD | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/third_party/png.BUILD b/third_party/png.BUILD index 76ab32d69c..17c5449cc0 100644 --- a/third_party/png.BUILD +++ b/third_party/png.BUILD @@ -28,7 +28,14 @@ cc_library( "pngwrite.c", "pngwtran.c", "pngwutil.c", - ], + ] + select({ + "@org_tensorflow//tensorflow:linux_ppc64le": [ + "powerpc/powerpc_init.c", + "powerpc/filter_vsx_intrinsics.c", + ], + "//conditions:default": [ + ], + }), hdrs = [ "png.h", "pngconf.h", |