Skip to content

Instantly share code, notes, and snippets.

@tueda
Last active August 10, 2022 16:58
Show Gist options
  • Save tueda/b59a2e82a9ee82e9efc27fb8aa1f013d to your computer and use it in GitHub Desktop.
Save tueda/b59a2e82a9ee82e9efc27fb8aa1f013d to your computer and use it in GitHub Desktop.
Workaround for a TensorFlow 2.4.4 build error on old machines.

TensorFlow 2.4.4 build error on an old machine (CentOS6, Xeon X5690):

ERROR: An error occurred during the fetch of repository 'local_execution_config_python':
   Traceback (most recent call last):
        File "/home/tueda/build/tensorflow/third_party/py/python_configure.bzl", line 209
                _check_python_bin(<2 more arguments>)
        File "/home/tueda/build/tensorflow/third_party/py/python_configure.bzl", line 143, in _check_python_bin
                get_bash_bin(repository_ctx)
        File "/home/tueda/build/tensorflow/third_party/remote_config/common.bzl", line 75, in get_bash_bin
                which(repository_ctx, "bash")
        File "/home/tueda/build/tensorflow/third_party/remote_config/common.bzl", line 29, in which
                execute(repository_ctx, <1 more arguments>)
        File "/home/tueda/build/tensorflow/third_party/remote_config/common.bzl", line 217, in execute
                fail(<1 more arguments>)
Repository command failed
warning: The "wait for subprocesses" feature requires Linux kernel version 3.4 or later.
From 7b28d278138b8894ed97761c8706872ee22f495d Mon Sep 17 00:00:00 2001
From: Takahiro Ueda <[email protected]>
Date: Thu, 11 Aug 2022 01:49:45 +0900
Subject: [PATCH] Fix build on linux<3.4
---
third_party/remote_config/common.bzl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/third_party/remote_config/common.bzl b/third_party/remote_config/common.bzl
index d7e6932..a17d714 100644
--- a/third_party/remote_config/common.bzl
+++ b/third_party/remote_config/common.bzl
@@ -213,6 +213,8 @@ def execute(
The result of repository_ctx.execute(cmdline)
"""
result = raw_exec(repository_ctx, cmdline)
+ if result.stderr.strip() == 'warning: The "wait for subprocesses" feature requires Linux kernel version 3.4 or later.':
+ return result
if result.stderr or not (empty_stdout_fine or result.stdout):
fail(
"\n".join([
--
2.9.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment