From c639437db16afc455b77a8075fda2f15b6134fe9 Mon Sep 17 00:00:00 2001 From: "William D. Irons" Date: Mon, 6 Jan 2020 20:15:42 +0000 Subject: [PATCH] Fix hwloc build for ppc64le This commit: https://github.com/tensorflow/tensorflow/commit/41df105#diff-6fb2e55075204b47da0460ea2abbc32f broke the CPU unit test build for ppc64le. The compiler error was: .../libexternal_Shwloc_Slibhwloc.so: error: undefined reference to 'hwloc_linux_component' .../libexternal_Shwloc_Slibhwloc.so: error: undefined reference to 'hwloc_linuxio_component' These methods are defined in topology-linux.c, adding the necessary bazel select statement so they are built during a ppc64le build. --- third_party/hwloc/BUILD.bazel | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/hwloc/BUILD.bazel b/third_party/hwloc/BUILD.bazel index 091ec7059df..a9de93686c0 100644 --- a/third_party/hwloc/BUILD.bazel +++ b/third_party/hwloc/BUILD.bazel @@ -262,6 +262,10 @@ cc_library( "hwloc/topology-x86.c", "include/private/cpuid-x86.h", ], + "@org_tensorflow//tensorflow:linux_ppc64le": [ + "hwloc/topology-linux.c", + "include/hwloc/linux.h", + ], "@org_tensorflow//tensorflow:freebsd": [ "hwloc/topology-freebsd.c", "hwloc/topology-x86.c",