Created
June 5, 2019 19:25
-
-
Save sub-mod/23d9b2cff5f5cba6857f1b2fe4e3ace9 to your computer and use it in GitHub Desktop.
TF_1.13.1_manylinux.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl | |
index d93e0df..8825820 100644 | |
--- a/tensorflow/tensorflow.bzl | |
+++ b/tensorflow/tensorflow.bzl | |
@@ -377,7 +377,7 @@ def tf_cc_shared_object( | |
srcs = [], | |
deps = [], | |
data = [], | |
- linkopts = [], | |
+ linkopts = ['-lrt'], | |
framework_so = tf_binary_additional_srcs(), | |
kernels = [], | |
**kwargs): | |
@@ -413,7 +413,7 @@ def tf_cc_binary( | |
srcs = [], | |
deps = [], | |
data = [], | |
- linkopts = [], | |
+ linkopts = ['-lrt'], | |
copts = tf_copts(), | |
kernels = [], | |
**kwargs): | |
@@ -470,7 +470,7 @@ def tf_gen_op_wrapper_cc( | |
tf_cc_binary( | |
name = tool, | |
copts = tf_copts(), | |
- linkopts = if_not_windows(["-lm", "-Wl,-ldl"]), | |
+ linkopts = if_not_windows(["-lm","-lrt","-Wl,-ldl"]), | |
linkstatic = 1, # Faster to link this one-time-use binary dynamically | |
deps = [op_gen] + deps, | |
) | |
@@ -650,7 +650,7 @@ def tf_gen_op_wrapper_py( | |
tf_cc_binary( | |
name = tool_name, | |
copts = tf_copts(), | |
- linkopts = if_not_windows(["-lm", "-Wl,-ldl"]) + cc_linkopts, | |
+ linkopts = if_not_windows(["-lm","-lrt", "-Wl,-ldl"]) + cc_linkopts, | |
linkstatic = 1, # Faster to link this one-time-use binary dynamically | |
visibility = [clean_dep("//tensorflow:internal")], | |
deps = ([ | |
diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py | |
index 55e23dc..0d7c202 100644 | |
--- a/tensorflow/tools/pip_package/setup.py | |
+++ b/tensorflow/tools/pip_package/setup.py | |
@@ -128,6 +128,13 @@ class BinaryDistribution(Distribution): | |
return True | |
+class InstallPlatlib(InstallCommandBase): | |
+ def finalize_options(self): | |
+ ret = InstallCommandBase.finalize_options(self) | |
+ self.install_lib=self.install_platlib | |
+ return ret | |
+ | |
+ | |
class InstallCommand(InstallCommandBase): | |
"""Override the dir where the headers go.""" | |
@@ -268,7 +275,7 @@ setup( | |
distclass=BinaryDistribution, | |
cmdclass={ | |
'install_headers': InstallHeaders, | |
- 'install': InstallCommand, | |
+ 'install': InstallPlatlib, | |
}, | |
# PyPI package information. | |
classifiers=[ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment