View | Details | Raw Unified | Return to bug 257053 | Differences between
and this patch

Collapse All | Expand All

(-)b/science/py-tensorflow/files/bazelrc (+2 lines)
Lines 15-17 build --define=PREFIX=%%LOCALBASE%% Link Here
15
build --define=LIBDIR=%%LOCALBASE%%/lib
15
build --define=LIBDIR=%%LOCALBASE%%/lib
16
16
17
build --config=noaws --config=nohdfs --config=noignite --config=nokafka
17
build --config=noaws --config=nohdfs --config=noignite --config=nokafka
18
build --define tensorflow_mkldnn_contraction_kernel=0
19
build --incompatible_no_support_tools_in_action_inputs=false
(-)b/science/py-tensorflow/files/patch-WORKSPACE (+61 lines)
Added Link Here
1
--- WORKSPACE.orig	2021-01-04 20:18:42 UTC
2
+++ WORKSPACE
3
@@ -12,6 +12,15 @@ http_archive(
4
     ],
5
 )
6
 
7
+http_archive(
8
+    name = "io_bazel_rules_docker",
9
+    sha256 = "7d453450e1eb70e238eea6b31f4115607ec1200e91afea01c25f9804f37e39c8",
10
+    strip_prefix = "rules_docker-0.10.0",
11
+    urls = [
12
+        "https://github.com/bazelbuild/rules_docker/releases/download/v0.10.0/rules_docker-v0.10.0.tar.gz",
13
+    ],
14
+)
15
+
16
 # Load tf_repositories() before loading dependencies for other repository so
17
 # that dependencies like com_google_protobuf won't be overridden.
18
 load("//tensorflow:workspace.bzl", "tf_repositories")
19
@@ -78,6 +87,42 @@ http_file(
20
     executable = 1,
21
     urls = ["https://github.com/google/xctestrunner/releases/download/0.2.7/ios_test_runner.par"],
22
 )  # https://github.com/google/xctestrunner/releases
23
+
24
+new_local_repository(
25
+    name = "jsonHeaders",
26
+    path = "/usr/local/include/json",
27
+    build_file_content = """  
28
+
29
+package(
30
+    default_visibility = [
31
+    "//visibility:public",
32
+    ],
33
+)
34
+
35
+cc_library(
36
+    name = "headers",
37
+    srcs = glob(["*.h"]),
38
+)
39
+""",
40
+)
41
+
42
+new_local_repository(
43
+    name = "absl_Headers",
44
+    path = "/usr/local/include/absl",
45
+    build_file_content = """
46
+
47
+package(
48
+    default_visibility = [
49
+    "//visibility:public",
50
+    ],
51
+)
52
+cc_library(
53
+    name = "abslHeaders",
54
+    srcs = glob(["*/*.h", "*/*/*.h", "*/*/*/*/*/*.h"]),
55
+)
56
+
57
+""",
58
+)
59
 # Use `swift_rules_dependencies` to fetch the toolchains. With the
60
 # `git_repository` rules above, the following call will skip redefining them.
61
 load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies")
(-)b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/compiler/mlir/lite/BUILD.orig	2021-07-06 22:08:16 UTC
2
+++ tensorflow/compiler/mlir/lite/BUILD
3
@@ -318,6 +318,7 @@ tf_native_cc_binary(
4
     srcs = [
5
         "operator_writer_gen.cc",
6
     ],
7
+    linkopts = ["-lexecinfo"],
8
     deps = [
9
         "@llvm//:support",
10
         "@llvm//:tablegen",
(-)b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_quantization_BUILD (+8 lines)
Added Link Here
1
--- tensorflow/compiler/mlir/lite/quantization/BUILD.orig	2021-07-06 10:09:38 UTC
2
+++ tensorflow/compiler/mlir/lite/quantization/BUILD
3
@@ -57,4 +57,5 @@ tf_native_cc_binary(
4
         "@llvm//:tablegen",
5
         "@local_config_mlir//:TableGen",
6
     ],
7
+    linkopts = ["-lexecinfo"],
8
 )
(-)b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_tensorflow_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/compiler/mlir/tensorflow/BUILD.orig	2021-07-06 11:28:13 UTC
2
+++ tensorflow/compiler/mlir/tensorflow/BUILD
3
@@ -586,6 +586,7 @@ tf_native_cc_binary(
4
     srcs = [
5
         "translate/derived_attr_populator_gen.cc",
6
     ],
7
+    linkopts = ["-lexecinfo"],
8
     deps = [
9
         "@llvm//:support",
10
         "@llvm//:tablegen",
(-)b/science/py-tensorflow/files/patch-tensorflow_contrib_bigtable_BUILD (+20 lines)
Added Link Here
1
--- tensorflow/contrib/bigtable/BUILD.orig	2021-01-04 20:18:42 UTC
2
+++ tensorflow/contrib/bigtable/BUILD
3
@@ -82,6 +82,8 @@ tf_kernel_library(
4
         "//tensorflow/core:framework_headers_lib",
5
         "//third_party/eigen3",
6
         "@com_github_googlecloudplatform_google_cloud_cpp//google/cloud/bigtable:bigtable_client",
7
+        "@com_google_absl//absl/base",
8
+        "@com_google_absl//absl/synchronization",
9
     ],
10
 )
11
 
12
@@ -94,6 +96,8 @@ cc_library(
13
         "//tensorflow/core:framework_headers_lib",
14
         "//third_party/eigen3",
15
         "@com_github_googlecloudplatform_google_cloud_cpp//google/cloud/bigtable:bigtable_client",
16
+        "@com_google_absl//absl/base",
17
+        "@com_google_absl//absl/synchronization",
18
     ],
19
 )
20
 
(-)b/science/py-tensorflow/files/patch-tensorflow_contrib_boosted__trees_BUILD (+24 lines)
Added Link Here
1
--- tensorflow/contrib/boosted_trees/BUILD.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/contrib/boosted_trees/BUILD
3
@@ -24,6 +24,10 @@ cc_library(
4
         ":stats_accumulator_ops_kernels",
5
         ":training_ops_kernels",
6
     ],
7
+    linkopts = select({
8
+        "//tensorflow:freebsd": ["-lm", "-lexecinfo",],
9
+    }),
10
+
11
     alwayslink = 1,
12
 )
13
 
14
@@ -37,6 +41,10 @@ cc_library(
15
         ":stats_accumulator_ops_op_lib",
16
         ":training_ops_op_lib",
17
     ],
18
+    linkopts = select({
19
+        "//tensorflow:freebsd": ["-lm", "-lexecinfo",],
20
+    }),
21
+
22
 )
23
 
24
 py_library(
(-)b/science/py-tensorflow/files/patch-tensorflow_contrib_ffmpeg_default_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/contrib/ffmpeg/default/BUILD.orig	2021-01-04 20:18:42 UTC
2
+++ tensorflow/contrib/ffmpeg/default/BUILD
3
@@ -18,6 +18,7 @@ cc_library(
4
         # Header is shared between implementations.
5
         "//tensorflow/contrib/ffmpeg:ffmpeg_lib.h",
6
     ],
7
+    copts = ["-I/usr/local/include"],
8
     deps = [
9
         "//tensorflow/core:framework_headers_lib",
10
         "//third_party/eigen3",
(-)b/science/py-tensorflow/files/patch-tensorflow_contrib_ignite_kernels_client_ignite__plain__client__unix.cc (-3 / +3 lines)
Lines 1-6 Link Here
1
--- tensorflow/contrib/ignite/kernels/client/ignite_plain_client_unix.cc.orig	2019-07-07 13:40:21.593527000 +0100
1
--- tensorflow/contrib/ignite/kernels/client/ignite_plain_client_unix.cc.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/contrib/ignite/kernels/client/ignite_plain_client_unix.cc	2019-07-07 13:40:59.586340000 +0100
2
+++ tensorflow/contrib/ignite/kernels/client/ignite_plain_client_unix.cc
3
@@ -20,6 +20,10 @@
3
@@ -19,6 +19,10 @@ limitations under the License.
4
 #include <sys/socket.h>
4
 #include <sys/socket.h>
5
 #include <unistd.h>
5
 #include <unistd.h>
6
 
6
 
(-)b/science/py-tensorflow/files/patch-tensorflow_contrib_makefile_Makefile (+49 lines)
Added Link Here
1
--- tensorflow/contrib/makefile/Makefile.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/contrib/makefile/Makefile
3
@@ -60,12 +60,15 @@ else
4
 	ifeq ($(UNAME_S),Linux)
5
 	        HOST_OS := LINUX
6
 	endif
7
+        ifeq ($(UNAME_S),FreeBSD)
8
+                HOST_OS := FREEBSD
9
+        endif
10
 	ifeq ($(UNAME_S),Darwin)
11
 		HOST_OS := OSX
12
 	endif
13
 endif
14
 
15
-HOST_ARCH := $(shell if [[ $(shell uname -m) =~ i[345678]86 ]]; then echo x86_32; else echo $(shell uname -m); fi)
16
+HOST_ARCH := $(shell if uname -m | grep -q i[345678]86; then echo x86_32; elif uname -m | grep -q amd64; then echo x86_64; else uname -m; fi)
17
 
18
 # Where compiled objects are stored.
19
 HOST_OBJDIR := $(MAKEFILE_DIR)/gen/host_obj/
20
@@ -111,6 +114,9 @@ $(HOST_NSYNC_LIB) \
21
 ifeq ($(HOST_OS),LINUX)
22
 	HOST_LIBS += -ldl -lpthread -lrt
23
 endif
24
+ifeq ($(HOST_OS),FREEBSD)
25
+        HOST_LIBS += -lexecinfo -lpthread
26
+endif
27
 
28
 # If we're on a Pi, link in pthreads and dl
29
 ifeq ($(HOST_OS),PI)
30
@@ -248,7 +254,7 @@ endif
31
 	LDFLAGS += -all_load
32
 endif
33
 # Make sure that we don't strip global constructors on Linux.
34
-ifeq ($(TARGET),LINUX)
35
+ifeq ($(TARGET),LINUX,FREEBSD)
36
 ifeq ($(HAS_GEN_HOST_PROTOC),true)
37
 	LIBFLAGS += -L$(MAKEFILE_DIR)/gen/protobuf-host/lib
38
 	export LD_LIBRARY_PATH=$(MAKEFILE_DIR)/gen/protobuf-host/lib
39
@@ -261,6 +267,10 @@ endif
40
 ifeq ($(TARGET),LINUX)
41
 	LIBS += -ldl -lpthread -lrt
42
 endif
43
+ifeq ($(TARGET),FREEBSD)
44
+        LIBS += -lexecinfo -lpthread
45
+endif
46
+
47
 # If we're cross-compiling for the Raspberry Pi, use the right gcc.
48
 ifeq ($(TARGET),PI)
49
 	CXXFLAGS += $(ANDROID_TYPES) -DRASPBERRY_PI
(-)b/science/py-tensorflow/files/patch-tensorflow_core_BUILD (-7 / +7 lines)
Lines 1-6 Link Here
1
--- tensorflow/core/BUILD.orig	2019-06-18 23:48:23.000000000 +0100
1
--- tensorflow/core/BUILD.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/core/BUILD	2019-07-14 09:27:38.471527000 +0100
2
+++ tensorflow/core/BUILD
3
@@ -2412,7 +2412,7 @@
3
@@ -2432,7 +2432,7 @@ cc_library(
4
     copts = tf_copts(),
4
     copts = tf_copts(),
5
     defines = LIB_INTERNAL_DEFINES,
5
     defines = LIB_INTERNAL_DEFINES,
6
     linkopts = select({
6
     linkopts = select({
Lines 9-15 Link Here
9
         "//tensorflow:windows": [],
9
         "//tensorflow:windows": [],
10
         "//tensorflow:android": [],
10
         "//tensorflow:android": [],
11
         "//conditions:default": [
11
         "//conditions:default": [
12
@@ -2512,7 +2512,7 @@
12
@@ -2515,7 +2515,7 @@ cc_library(
13
     hdrs = ["lib/gif/gif_io.h"],
13
     hdrs = ["lib/gif/gif_io.h"],
14
     copts = tf_copts(),
14
     copts = tf_copts(),
15
     linkopts = select({
15
     linkopts = select({
Lines 18-24 Link Here
18
         "//tensorflow:windows": [],
18
         "//tensorflow:windows": [],
19
         "//conditions:default": ["-ldl"],
19
         "//conditions:default": ["-ldl"],
20
     }),
20
     }),
21
@@ -2536,7 +2536,7 @@
21
@@ -2539,7 +2539,7 @@ cc_library(
22
     ],
22
     ],
23
     copts = tf_copts(),
23
     copts = tf_copts(),
24
     linkopts = select({
24
     linkopts = select({
Lines 27-33 Link Here
27
         "//tensorflow:windows": [],
27
         "//tensorflow:windows": [],
28
         "//conditions:default": ["-ldl"],
28
         "//conditions:default": ["-ldl"],
29
     }),
29
     }),
30
@@ -2566,7 +2566,7 @@
30
@@ -2570,7 +2570,7 @@ cc_library(
31
     ],
31
     ],
32
     copts = tf_copts(),
32
     copts = tf_copts(),
33
     linkopts = select({
33
     linkopts = select({
Lines 36-42 Link Here
36
         "//tensorflow:windows": [],
36
         "//tensorflow:windows": [],
37
         "//conditions:default": ["-ldl"],
37
         "//conditions:default": ["-ldl"],
38
     }),
38
     }),
39
@@ -2897,7 +2897,7 @@
39
@@ -2907,7 +2907,7 @@ tf_cuda_library(
40
     hdrs = FRAMEWORK_INTERNAL_PUBLIC_HEADERS,
40
     hdrs = FRAMEWORK_INTERNAL_PUBLIC_HEADERS,
41
     copts = tf_copts(),
41
     copts = tf_copts(),
42
     linkopts = select({
42
     linkopts = select({
(-)b/science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/core/distributed_runtime/rpc/BUILD.orig	2021-07-08 11:22:26 UTC
2
+++ tensorflow/core/distributed_runtime/rpc/BUILD
3
@@ -253,6 +253,7 @@ cc_library(
4
     name = "grpc_master_service_impl",
5
     srcs = ["grpc_master_service_impl.cc"],
6
     hdrs = ["grpc_master_service_impl.h"],
7
+    copts = ["-I%%LOCALBASE%%/include"],
8
     deps = [
9
         "//tensorflow:grpc++",
10
         "//tensorflow/core:master_proto_cc",
(-)b/science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_grpc__server__lib.cc (+15 lines)
Added Link Here
1
--- tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc.orig	2021-07-08 14:14:12 UTC
2
+++ tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc
3
@@ -487,12 +487,6 @@ class GrpcServerFactory : public ServerFactory {
4
 class GrpcServerRegistrar {
5
  public:
6
   GrpcServerRegistrar() {
7
-    gpr_allocation_functions alloc_fns;
8
-    memset(&alloc_fns, 0, sizeof(alloc_fns));
9
-    alloc_fns.malloc_fn = port::Malloc;
10
-    alloc_fns.realloc_fn = port::Realloc;
11
-    alloc_fns.free_fn = port::Free;
12
-    gpr_set_allocation_functions(alloc_fns);
13
     ServerFactory::Register("GRPC_SERVER", new GrpcServerFactory());
14
   }
15
 };
(-)b/science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/core/platform/cloud/BUILD.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/core/platform/cloud/BUILD
3
@@ -220,6 +220,7 @@ cc_library(
4
         "//tensorflow/core:lib_internal",
5
         "@boringssl//:crypto",
6
         "@jsoncpp_git//:jsoncpp",
7
+	"@jsonHeaders//:headers",
8
     ],
9
 )
10
 
(-)b/science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_gcs__dns__cache.cc (-3 / +3 lines)
Lines 1-6 Link Here
1
--- tensorflow/core/platform/cloud/gcs_dns_cache.cc.orig	2019-06-18 23:48:23.000000000 +0100
1
--- tensorflow/core/platform/cloud/gcs_dns_cache.cc.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/core/platform/cloud/gcs_dns_cache.cc	2019-07-06 18:15:09.827112000 +0100
2
+++ tensorflow/core/platform/cloud/gcs_dns_cache.cc
3
@@ -24,6 +24,11 @@
3
@@ -26,6 +26,11 @@ limitations under the License.
4
 #endif
4
 #endif
5
 #include <sys/types.h>
5
 #include <sys/types.h>
6
 
6
 
(-)b/science/py-tensorflow/files/patch-tensorflow_core_profiler_internal_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/core/profiler/internal/BUILD.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/core/profiler/internal/BUILD
3
@@ -38,6 +38,7 @@ cc_library(
4
         "//tensorflow/core:lib",
5
         "//tensorflow/core:protos_all_cc",
6
         "@jsoncpp_git//:jsoncpp",
7
+        "@jsonHeaders//:headers",
8
     ],
9
 )
10
 
(-)b/science/py-tensorflow/files/patch-tensorflow_core_profiler_rpc_client_BUILD (+19 lines)
Added Link Here
1
--- tensorflow/core/profiler/rpc/client/BUILD.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/core/profiler/rpc/client/BUILD
3
@@ -37,6 +37,8 @@ cc_library(
4
         "//tensorflow/core:lib",
5
         "//tensorflow/core:protos_all_cc",
6
         "//tensorflow/core/profiler:op_profile_proto_cc",
7
+	"@com_google_absl//absl/base",
8
+	"@com_google_absl//absl/synchronization",
9
     ],
10
 )
11
 
12
@@ -48,6 +50,7 @@ cc_library(
13
         "//tensorflow/core:lib",
14
         "//tensorflow/core:protos_all_cc",
15
         "@jsoncpp_git//:jsoncpp",
16
+	"@jsonHeaders//:headers",
17
     ],
18
 )
19
 
(-)b/science/py-tensorflow/files/patch-tensorflow_core_protobuf_autotuning.proto (+21 lines)
Added Link Here
1
--- tensorflow/core/protobuf/autotuning.proto.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/core/protobuf/autotuning.proto
3
@@ -11,14 +11,14 @@ import "google/protobuf/any.proto";
4
 import "google/protobuf/duration.proto";
5
 
6
 message CudnnVersion {
7
-  int32 major = 1;
8
-  int32 minor = 2;
9
+  int32 major_val = 1;
10
+  int32 minor_val = 2;
11
   int32 patch = 3;
12
 }
13
 
14
 message ComputeCapability {
15
-  int32 major = 1;
16
-  int32 minor = 2;
17
+  int32 major_val = 1;
18
+  int32 minor_val = 2;
19
 }
20
 
21
 message AutotuneResult {
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_experimental_micro_tools_make_targets_freebsd__makefile.inc (-2 / +2 lines)
Lines 1-5 Link Here
1
--- /dev/null	2019-07-08 14:38:21.999045000 +0100
1
--- tensorflow/lite/experimental/micro/tools/make/targets/freebsd_makefile.inc.orig	2021-07-05 16:52:18 UTC
2
+++ tensorflow/lite/experimental/micro/tools/make/targets/freebsd_makefile.inc	2019-07-08 14:37:33.196932000 +0100
2
+++ tensorflow/lite/experimental/micro/tools/make/targets/freebsd_makefile.inc
3
@@ -0,0 +1,10 @@
3
@@ -0,0 +1,10 @@
4
+# Settings for x86 on FreeBSD
4
+# Settings for x86 on FreeBSD
5
+ifeq ($(TARGET), freebsd)
5
+ifeq ($(TARGET), freebsd)
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_kernels_internal_BUILD (+11 lines)
Added Link Here
1
--- tensorflow/lite/kernels/internal/BUILD.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/lite/kernels/internal/BUILD
3
@@ -662,7 +662,7 @@ cc_library(
4
             ":sse_tensor_utils",
5
         ],
6
         "//conditions:default": [
7
-            ":portable_tensor_utils",
8
+	    ":neon_tensor_utils",
9
         ],
10
     }),
11
 )
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_python_interpreter__wrapper_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/lite/python/interpreter_wrapper/BUILD.orig	2021-07-05 17:39:13 UTC
2
+++ tensorflow/lite/python/interpreter_wrapper/BUILD
3
@@ -31,6 +31,7 @@ cc_library(
4
         "//tensorflow/lite/kernels:builtin_ops",
5
         "//third_party/python_runtime:headers",
6
         "@com_google_absl//absl/memory",
7
+	"@com_google_absl//absl/strings:str_format",
8
     ],
9
 )
10
 
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_tools_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/lite/tools/BUILD.orig	2021-01-04 20:18:42 UTC
2
+++ tensorflow/lite/tools/BUILD
3
@@ -76,6 +76,7 @@ cc_library(
4
         "//tensorflow/lite/c:c_api_internal",
5
         "//tensorflow/lite/schema:schema_fbs",
6
         "@com_google_absl//absl/container:flat_hash_set",
7
+        "@com_google_absl//absl/time",
8
     ],
9
 )
10
 
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_tools_make_Makefile (+19 lines)
Added Link Here
1
--- tensorflow/lite/tools/make/Makefile.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/lite/tools/make/Makefile
3
@@ -16,12 +16,15 @@ else
4
 	ifeq ($(UNAME_S),Linux)
5
 		HOST_OS := linux
6
 	endif
7
+        ifeq ($(UNAME_S),FreeBSD)
8
+                HOST_OS := freebsd
9
+        endif
10
 	ifeq ($(UNAME_S),Darwin)
11
 		HOST_OS := osx
12
 	endif
13
 endif
14
 
15
-HOST_ARCH := $(shell if uname -m | grep -q i[345678]86; then echo x86_32; else uname -m; fi)
16
+HOST_ARCH := $(shell if uname -m | grep -q i[345678]86; then echo x86_32; elif uname -m | grep -q amd64; then echo x86_64; else uname -m; fi)
17
 
18
 # Override these on the make command line to target a specific architecture. For example:
19
 # make -f tensorflow/lite/tools/make/Makefile TARGET=rpi TARGET_ARCH=armv7l
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_tools_make_targets_freebsd__makefile.inc (-2 / +2 lines)
Lines 1-5 Link Here
1
--- /dev/null	2019-07-08 14:12:50.536743000 +0100
1
--- tensorflow/lite/tools/make/targets/freebsd_makefile.inc.orig	2021-07-05 16:52:18 UTC
2
+++ tensorflow/lite/tools/make/targets/freebsd_makefile.inc	2019-07-08 14:11:35.495868000 +0100
2
+++ tensorflow/lite/tools/make/targets/freebsd_makefile.inc
3
@@ -0,0 +1,16 @@
3
@@ -0,0 +1,16 @@
4
+# Settings for FreeBSD.
4
+# Settings for FreeBSD.
5
+ifeq ($(TARGET), freebsd)
5
+ifeq ($(TARGET), freebsd)
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_BUILD (+20 lines)
Added Link Here
1
--- tensorflow/lite/tools/optimize/BUILD.orig	2021-01-04 20:18:42 UTC
2
+++ tensorflow/lite/tools/optimize/BUILD
3
@@ -26,6 +26,8 @@ cc_library(
4
         "//tensorflow/lite/schema:schema_fbs",
5
         "//third_party/eigen3",
6
         "@com_google_absl//absl/memory",
7
+        "@com_google_absl//absl/strings",
8
+        "@com_google_absl//absl/base",
9
     ],
10
 )
11
 
12
@@ -40,6 +42,8 @@ cc_library(
13
         "//tensorflow/lite/kernels/internal:types",
14
         "//tensorflow/lite/schema:schema_fbs",
15
         "@com_google_absl//absl/memory",
16
+        "@com_google_absl//absl/strings",
17
+        "@com_google_absl//absl/base",
18
     ],
19
 )
20
 
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_calibration_BUILD (+34 lines)
Added Link Here
1
--- tensorflow/lite/tools/optimize/calibration/BUILD.orig	2021-07-05 17:42:23 UTC
2
+++ tensorflow/lite/tools/optimize/calibration/BUILD
3
@@ -25,6 +25,7 @@ cc_library(
4
         "//tensorflow/lite/kernels:builtin_ops",
5
         "//tensorflow/lite/schema:schema_fbs",
6
         "@com_google_absl//absl/memory",
7
+	"@com_google_absl//absl/strings",
8
         "@flatbuffers",
9
     ],
10
 )
11
@@ -49,6 +50,7 @@ tf_cc_test(
12
         "//tensorflow/lite:framework",
13
         "//tensorflow/lite/kernels:builtin_ops",
14
         "@com_google_absl//absl/memory",
15
+	"@com_google_absl//absl/strings",
16
         "@com_google_googletest//:gtest",
17
     ],
18
 )
19
@@ -62,6 +64,7 @@ cc_library(
20
         "//tensorflow/lite:framework",
21
         "//tensorflow/lite/core/api",
22
         "@com_google_absl//absl/memory",
23
+	"@com_google_absl//absl/strings",
24
     ],
25
 )
26
 
27
@@ -84,6 +87,7 @@ cc_library(
28
         ":calibration_logger",
29
         "//tensorflow/lite:framework",
30
         "@com_google_absl//absl/memory",
31
+	"@com_google_absl//absl/strings",
32
     ],
33
 )
34
 
(-)b/science/py-tensorflow/files/patch-tensorflow_python_eager_pywrap__tfe__src.cc (+20 lines)
Added Link Here
1
--- tensorflow/python/eager/pywrap_tfe_src.cc.orig	2021-07-07 11:59:05 UTC
2
+++ tensorflow/python/eager/pywrap_tfe_src.cc
3
@@ -1319,7 +1319,7 @@ static PyTypeObject TFE_Py_Tape_Type = {
4
     sizeof(TFE_Py_Tape),                          /* tp_basicsize */
5
     0,                                            /* tp_itemsize */
6
     &TFE_Py_Tape_Delete,                          /* tp_dealloc */
7
-    nullptr,                                      /* tp_print */
8
+    0,                                            /* tp_print */
9
     nullptr,                                      /* tp_getattr */
10
     nullptr,                                      /* tp_setattr */
11
     nullptr,                                      /* tp_reserved */
12
@@ -1353,7 +1353,7 @@ static PyTypeObject TFE_Py_ForwardAccumulator_Type = {
13
     sizeof(TFE_Py_ForwardAccumulator),                      /* tp_basicsize */
14
     0,                                                      /* tp_itemsize */
15
     &TFE_Py_ForwardAccumulatorDelete,                       /* tp_dealloc */
16
-    nullptr,                                                /* tp_print */
17
+    0,                                                      /* tp_print */
18
     nullptr,                                                /* tp_getattr */
19
     nullptr,                                                /* tp_setattr */
20
     nullptr,                                                /* tp_reserved */
(-)b/science/py-tensorflow/files/patch-tensorflow_python_lib_core_bfloat16.cc (+11 lines)
Added Link Here
1
--- tensorflow/python/lib/core/bfloat16.cc.orig	2021-07-07 11:57:12 UTC
2
+++ tensorflow/python/lib/core/bfloat16.cc
3
@@ -317,7 +317,7 @@ PyTypeObject PyBfloat16_Type = {
4
     sizeof(PyBfloat16),                        // tp_basicsize
5
     0,                                         // tp_itemsize
6
     nullptr,                                   // tp_dealloc
7
-    nullptr,                                   // tp_print
8
+    0,                                         // tp_print
9
     nullptr,                                   // tp_getattr
10
     nullptr,                                   // tp_setattr
11
     nullptr,                                   // tp_compare / tp_reserved
(-)b/science/py-tensorflow/files/patch-tensorflow_python_lib_core_ndarray__tensor__bridge.cc (+11 lines)
Added Link Here
1
--- tensorflow/python/lib/core/ndarray_tensor_bridge.cc.orig	2021-07-07 09:08:49 UTC
2
+++ tensorflow/python/lib/core/ndarray_tensor_bridge.cc
3
@@ -86,7 +86,7 @@ PyTypeObject TensorReleaserType = {
4
     0,                                /* tp_itemsize */
5
     /* methods */
6
     TensorReleaser_dealloc,      /* tp_dealloc */
7
-    nullptr,                     /* tp_print */
8
+    0,                           /* tp_print */
9
     nullptr,                     /* tp_getattr */
10
     nullptr,                     /* tp_setattr */
11
     nullptr,                     /* tp_compare */
(-)b/science/py-tensorflow/files/patch-tensorflow_stream__executor_stream__executor__pimpl.h (+10 lines)
Added Link Here
1
--- tensorflow/stream_executor/stream_executor_pimpl.h.orig	2021-07-07 09:04:03 UTC
2
+++ tensorflow/stream_executor/stream_executor_pimpl.h
3
@@ -25,6 +25,7 @@ limitations under the License.
4
 #include "absl/base/macros.h"
5
 #include "absl/synchronization/mutex.h"
6
 #include "absl/types/optional.h"
7
+#include "absl/memory/memory.h"
8
 #include "tensorflow/stream_executor/device_memory_allocator.h"
9
 #include "tensorflow/stream_executor/lib/status.h"
10
 #include "tensorflow/stream_executor/lib/statusor.h"
(-)b/science/py-tensorflow/files/patch-tensorflow_tensorflow.bzl (-13 / +13 lines)
Lines 1-14 Link Here
1
--- tensorflow/tensorflow.bzl.orig	2019-06-18 23:48:23.000000000 +0100
1
--- tensorflow/tensorflow.bzl.orig	2021-01-04 20:18:42 UTC
2
+++ tensorflow/tensorflow.bzl	2019-07-13 13:57:17.579194000 +0100
2
+++ tensorflow/tensorflow.bzl
3
@@ -287,6 +287,7 @@
3
@@ -289,6 +289,7 @@ def tf_copts(
4
             "-Iexternal/gemmlowp",
4
             "-Wno-sign-compare",
5
             "-Wno-sign-compare",
5
             "-fno-exceptions",
6
             "-ftemplate-depth=900",
6
             "-ftemplate-depth=900",
7
+	    "-I%%LOCALBASE%%/include",
7
+	    "-I/usr/local/include",
8
         ]) +
8
         ]) +
9
         (if_not_windows(["-fno-exceptions"]) if not allow_exceptions else []) +
9
         if_cuda(["-DGOOGLE_CUDA=1"]) +
10
         if_cuda(["-DGOOGLE_CUDA=1"]) +
10
         if_tensorrt(["-DGOOGLE_TENSORRT=1"]) +
11
@@ -628,7 +629,7 @@ def tf_cc_binary(
11
@@ -603,7 +604,7 @@
12
                 ],
12
                 ],
13
             ),
13
             ),
14
             data = depset(data + added_data_deps),
14
             data = depset(data + added_data_deps),
Lines 17-23 Link Here
17
             visibility = visibility,
17
             visibility = visibility,
18
             **kwargs
18
             **kwargs
19
         )
19
         )
20
@@ -657,7 +658,7 @@
20
@@ -693,7 +694,7 @@ def tf_gen_op_wrapper_cc(
21
     tf_cc_binary(
21
     tf_cc_binary(
22
         name = tool,
22
         name = tool,
23
         copts = tf_copts(),
23
         copts = tf_copts(),
Lines 26-41 Link Here
26
         linkstatic = 1,  # Faster to link this one-time-use binary dynamically
26
         linkstatic = 1,  # Faster to link this one-time-use binary dynamically
27
         deps = [op_gen] + deps,
27
         deps = [op_gen] + deps,
28
     )
28
     )
29
@@ -839,7 +840,7 @@
29
@@ -878,7 +879,7 @@ def tf_gen_op_wrapper_py(
30
     tf_cc_binary(
30
     tf_cc_binary(
31
         name = tool_name,
31
         name = tool_name,
32
         copts = tf_copts(),
32
         copts = tf_copts(),
33
-        linkopts = if_not_windows(["-lm", "-Wl,-ldl"]) + cc_linkopts,
33
-        linkopts = if_not_windows(["-lm", "-Wl,-ldl"]) + cc_linkopts,
34
+        linkopts = if_not_windows(["-L%%LOCALBASE%%/lib", "-lm", "-Wl, -lexecinfo"]) + cc_linkopts,
34
+        linkopts = if_not_windows(["-L/usr/local/lib", "-lm", "-Wl, -lexecinfo"]) + cc_linkopts,
35
         linkstatic = 1,  # Faster to link this one-time-use binary dynamically
35
         linkstatic = 1,  # Faster to link this one-time-use binary dynamically
36
         visibility = [clean_dep("//tensorflow:internal")],
36
         visibility = [clean_dep("//tensorflow:internal")],
37
         deps = ([
37
         deps = ([
38
@@ -954,8 +955,9 @@
38
@@ -992,8 +993,9 @@ def tf_cc_test(
39
             "//conditions:default": [
39
             "//conditions:default": [
40
                 "-lpthread",
40
                 "-lpthread",
41
                 "-lm",
41
                 "-lm",
Lines 46-52 Link Here
46
         deps = deps + tf_binary_dynamic_kernel_deps(kernels) + if_mkl_ml(
46
         deps = deps + tf_binary_dynamic_kernel_deps(kernels) + if_mkl_ml(
47
             [
47
             [
48
                 clean_dep("//third_party/mkl:intel_binary_blob"),
48
                 clean_dep("//third_party/mkl:intel_binary_blob"),
49
@@ -1103,7 +1105,7 @@
49
@@ -1140,7 +1142,7 @@ def tf_gpu_only_cc_test(
50
         ]) + if_rocm_is_configured([
50
         ]) + if_rocm_is_configured([
51
             clean_dep("//tensorflow/core:gpu_lib"),
51
             clean_dep("//tensorflow/core:gpu_lib"),
52
         ]),
52
         ]),
Lines 55-61 Link Here
55
         linkstatic = linkstatic or select({
55
         linkstatic = linkstatic or select({
56
             # cc_tests with ".so"s in srcs incorrectly link on Darwin
56
             # cc_tests with ".so"s in srcs incorrectly link on Darwin
57
             # unless linkstatic=1.
57
             # unless linkstatic=1.
58
@@ -1784,6 +1786,7 @@
58
@@ -1820,6 +1822,7 @@ def tf_custom_op_library(name, srcs = [], gpu_srcs = [
59
         linkopts = linkopts + select({
59
         linkopts = linkopts + select({
60
             "//conditions:default": [
60
             "//conditions:default": [
61
                 "-lm",
61
                 "-lm",
(-)b/science/py-tensorflow/files/patch-tensorflow_tools_lib__package_BUILD (+18 lines)
Added Link Here
1
--- tensorflow/tools/lib_package/BUILD.orig	2019-10-14 21:08:43 UTC
2
+++ tensorflow/tools/lib_package/BUILD
3
@@ -151,7 +151,6 @@ genrule(
4
         "@gemmlowp//:LICENSE",
5
         "@gif_archive//:COPYING",
6
         "@highwayhash//:LICENSE",
7
-        "@hwloc//:COPYING",
8
         "@icu//:icu4c/LICENSE",
9
         "@jpeg//:LICENSE.md",
10
         "@lmdb//:LICENSE",
11
@@ -223,7 +222,6 @@ genrule(
12
         "@gemmlowp//:LICENSE",
13
         "@gif_archive//:COPYING",
14
         "@highwayhash//:LICENSE",
15
-        "@hwloc//:COPYING",
16
         "@icu//:icu4j/main/shared/licenses/LICENSE",
17
         "@jpeg//:LICENSE.md",
18
         "@lmdb//:LICENSE",
(-)b/science/py-tensorflow/files/patch-tensorflow_workspace.bzl (-10 / +10 lines)
Lines 1-10 Link Here
1
--- tensorflow/workspace.bzl.orig	2019-07-11 15:46:44.460265000 +0100
1
--- tensorflow/workspace.bzl.orig	2021-07-08 11:05:27 UTC
2
+++ tensorflow/workspace.bzl	2019-07-11 15:47:14.104299000 +0100
2
+++ tensorflow/workspace.bzl
3
@@ -346,6 +346,7 @@
3
@@ -324,6 +324,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = "
4
         ],
4
         build_file = clean_dep("//third_party:functools32.BUILD"),
5
         sha256 = "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1",
5
         sha256 = "f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d",
6
         build_file = clean_dep("//third_party:enum34.BUILD"),
6
         strip_prefix = "functools32-3.2.3-2",
7
+	system_build_file = clean_dep("//third_party/systemlibs:enum34.BUILD"),
7
+        system_build_file = clean_dep("//third_party/systemlibs:functools32.BUILD"),
8
         strip_prefix = "enum34-1.1.6/enum",
8
         urls = [
9
     )
9
             "https://storage.googleapis.com/mirror.tensorflow.org/pypi.python.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz",
10
 
10
             "https://pypi.python.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz",
(-)b/science/py-tensorflow/files/patch-third__party_aws_BUILD.bazel (+13 lines)
Added Link Here
1
--- third_party/aws/BUILD.bazel.orig	2019-10-14 21:08:43 UTC
2
+++ third_party/aws/BUILD.bazel
3
@@ -30,7 +30,9 @@ cc_library(
4
         "@org_tensorflow//tensorflow:freebsd": glob([
5
             "aws-cpp-sdk-core/source/platform/linux-shared/*.cpp",
6
         ]),
7
-        "//conditions:default": [],
8
+        "//conditions:default":glob([
9
+            "aws-cpp-sdk-core/source/platform/linux-shared/*.cpp",
10
+        ]),
11
     }) + glob([
12
         "aws-cpp-sdk-core/include/**/*.h",
13
         "aws-cpp-sdk-core/source/*.cpp",
(-)b/science/py-tensorflow/files/patch-third__party_com__google__absl.BUILD (+13 lines)
Added Link Here
1
--- third_party/com_google_absl.BUILD.orig	2021-07-07 09:58:12 UTC
2
+++ third_party/com_google_absl.BUILD
3
@@ -2,4 +2,9 @@ package(default_visibility = ["//visibility:public"])
4
 
5
 licenses(["notice"])  # Apache
6
 
7
-exports_files(["LICENSE"])
8
+exports_files(["LICENSE", "absl"])
9
+
10
+cc_library(
11
+    name = "abslHeaders",
12
+    hdrs = glob(["*/*/*.h", "*/*/*.h"]),
13
+)
(-)b/science/py-tensorflow/files/patch-third__party_flatbuffers_BUILD.system (+18 lines)
Added Link Here
1
--- third_party/flatbuffers/BUILD.system.orig	2021-01-04 20:18:42 UTC
2
+++ third_party/flatbuffers/BUILD.system
3
@@ -9,6 +9,7 @@ filegroup(
4
 cc_library(
5
     name = "flatbuffers",
6
     linkopts = ["-lflatbuffers"],
7
+    copts = ["-I/usr/local/include"],
8
     visibility = ["//visibility:public"],
9
 )
10
 
11
@@ -16,6 +17,7 @@ cc_library(
12
 cc_library(
13
     name = "flatc_library",
14
     linkopts = ["-lflatbuffers"],
15
+    copts = ["-I/usr/local/include"],
16
     visibility = ["//visibility:public"],
17
 )
18
 
(-)b/science/py-tensorflow/files/patch-third__party_mlir_BUILD (+10 lines)
Added Link Here
1
--- third_party/mlir/BUILD.orig	2021-07-07 08:13:58 UTC
2
+++ third_party/mlir/BUILD
3
@@ -1560,6 +1560,7 @@ cc_binary(
4
     linkopts = [
5
         "-lm",
6
         "-lpthread",
7
+        "-lexecinfo",
8
     ],
9
     deps = [
10
         ":Support",
(-)b/science/py-tensorflow/files/patch-third__party_systemlibs_functools32.BUILD (+18 lines)
Added Link Here
1
--- third_party/systemlibs/functools32.BUILD.orig	2021-07-08 13:17:43 UTC
2
+++ third_party/systemlibs/functools32.BUILD
3
@@ -0,0 +1,15 @@
4
+# Description:
5
+#   functools32 provides a backport of the functools module for Python 2.
6
+
7
+licenses(["notice"])  # Python 2.0
8
+
9
+package(default_visibility = ["//visibility:public"])
10
+
11
+filegroup(
12
+    name = "LICENSE",
13
+)
14
+
15
+py_library(
16
+    name = "functools32",
17
+    srcs_version = "PY2AND3",
18
+)
(-)b/science/py-tensorflow/files/patch-third__party_systemlibs_grpc.BUILD (+11 lines)
Added Link Here
1
--- third_party/systemlibs/grpc.BUILD.orig	2019-10-14 21:08:43 UTC
2
+++ third_party/systemlibs/grpc.BUILD
3
@@ -7,7 +7,7 @@ filegroup(
4
 
5
 cc_library(
6
     name = "grpc",
7
-    linkopts = ["-lgrpc"],
8
+    linkopts = ["-lgrpc", "-lgpr"],
9
     visibility = ["//visibility:public"],
10
 )
11
 
(-)b/science/py-tensorflow/files/patch-third__party_systemlibs_jsoncpp.BUILD (+21 lines)
Added Link Here
1
--- third_party/systemlibs/jsoncpp.BUILD.orig	2019-10-14 21:08:43 UTC
2
+++ third_party/systemlibs/jsoncpp.BUILD
3
@@ -8,9 +8,7 @@ filegroup(
4
 HEADERS = [
5
     "include/json/allocator.h",
6
     "include/json/assertions.h",
7
-    "include/json/autolink.h",
8
     "include/json/config.h",
9
-    "include/json/features.h",
10
     "include/json/forwards.h",
11
     "include/json/json.h",
12
     "include/json/reader.h",
13
@@ -25,7 +23,7 @@ genrule(
14
     cmd = """
15
       for i in $(OUTS); do
16
         i=$${i##*/}
17
-        ln -sf $(INCLUDEDIR)/jsoncpp/json/$$i $(@D)/include/json/$$i
18
+        ln -sf $(INCLUDEDIR)/json/$$i $(@D)/include/json/$$i
19
       done
20
     """,
21
 )
(-)b/science/py-tensorflow/files/patch-third__party_systemlibs_protobuf.bzl (-4 / +4 lines)
Lines 1-11 Link Here
1
--- third_party/systemlibs/protobuf.bzl.orig	2019-07-26 12:28:57.790848000 +0100
1
--- third_party/systemlibs/protobuf.bzl.orig	2021-01-04 20:18:42 UTC
2
+++ third_party/systemlibs/protobuf.bzl	2019-07-26 12:29:42.978059000 +0100
2
+++ third_party/systemlibs/protobuf.bzl
3
@@ -76,7 +76,7 @@
3
@@ -76,7 +76,7 @@ def _proto_gen_impl(ctx):
4
     source_dir = _SourceDir(ctx)
4
     source_dir = _SourceDir(ctx)
5
     gen_dir = _GenDir(ctx)
5
     gen_dir = _GenDir(ctx)
6
     if source_dir:
6
     if source_dir:
7
-        import_flags = ["-I" + source_dir, "-I" + gen_dir]
7
-        import_flags = ["-I" + source_dir, "-I" + gen_dir]
8
+        import_flags = ["-I%%LOCALBASE%%/include", "-I" + source_dir, "-I" + gen_dir]
8
+        import_flags = ["-I/usr/local/include", "-I" + source_dir, "-I" + gen_dir]
9
     else:
9
     else:
10
         import_flags = ["-I."]
10
         import_flags = ["-I."]
11
 
11
 
(-)b/science/py-tensorflow/files/patch-third__party_systemlibs_syslibs__configure.bzl (-6 / +6 lines)
Lines 1-10 Link Here
1
--- third_party/systemlibs/syslibs_configure.bzl.orig	2019-07-11 15:43:32.713320000 +0100
1
--- third_party/systemlibs/syslibs_configure.bzl.orig	2021-07-08 11:07:25 UTC
2
+++ third_party/systemlibs/syslibs_configure.bzl	2019-07-11 15:43:54.448882000 +0100
2
+++ third_party/systemlibs/syslibs_configure.bzl
3
@@ -21,6 +21,7 @@
3
@@ -22,6 +22,7 @@ VALID_LIBS = [
4
     "curl",
5
     "cython",
6
     "double_conversion",
4
     "double_conversion",
7
+    "enum34_archive",
5
     "enum34_archive",
8
     "flatbuffers",
6
     "flatbuffers",
7
+    "functools32_archive",
9
     "gast_archive",
8
     "gast_archive",
10
     "gif_archive",
9
     "gif_archive",
10
     "grpc",

Return to bug 257053