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

Collapse All | Expand All

(-)b/science/py-tensorflow/Makefile (-3 / +2 lines)
Lines 22-29 BUILD_DEPENDS= ${RUN_DEPENDS} \ Link Here
22
		cython:lang/cython \
22
		cython:lang/cython \
23
		swig:devel/swig \
23
		swig:devel/swig \
24
		bazel:devel/bazel \
24
		bazel:devel/bazel \
25
		git:devel/git \
25
		git:devel/git
26
		clang-devel:devel/llvm-devel
27
LIB_DEPENDS=	libnsync.so:devel/nsync \
26
LIB_DEPENDS=	libnsync.so:devel/nsync \
28
		libgpr.so:devel/grpc \
27
		libgpr.so:devel/grpc \
29
		libpng.so:graphics/png \
28
		libpng.so:graphics/png \
Lines 61-67 RUN_DEPENDS= pybind11>=2.6.2:devel/pybind11 \ Link Here
61
		${PYTHON_PKGNAMEPREFIX}packaging>=21.3:devel/py-packaging@${PY_FLAVOR} \
60
		${PYTHON_PKGNAMEPREFIX}packaging>=21.3:devel/py-packaging@${PY_FLAVOR} \
62
		pybind11>=2.6.2:devel/pybind11
61
		pybind11>=2.6.2:devel/pybind11
63
62
64
USES=		python:3.7+ shebangfix jpeg ssl
63
USES=		llvm:16 python:3.7+ shebangfix jpeg ssl
65
USE_CXXSTD=     c++17
64
USE_CXXSTD=     c++17
66
SHEBANG_GLOB=	*.py
65
SHEBANG_GLOB=	*.py
67
USE_GITHUB=	yes
66
USE_GITHUB=	yes
(-)b/science/py-tensorflow/files/freebsd/cc_toolchain_config.bzl (-4 / +5 lines)
Lines 75-80 def _impl(ctx): Link Here
75
                    flag_group(
75
                    flag_group(
76
                        flags = [
76
                        flags = [
77
                            "-Wl,-undefined,dynamic_lookup",
77
                            "-Wl,-undefined,dynamic_lookup",
78
                            "-Wl,--undefined-version",
78
                            "-lc++",
79
                            "-lc++",
79
                            "-Wl,-z,relro,-z,now",
80
                            "-Wl,-z,relro,-z,now",
80
                            "-no-canonical-prefixes",
81
                            "-no-canonical-prefixes",
Lines 225-241 def _impl(ctx): Link Here
225
    else:
226
    else:
226
        features = [supports_dynamic_linker_feature, supports_pic_feature]
227
        features = [supports_dynamic_linker_feature, supports_pic_feature]
227
    if (is_bsd):
228
    if (is_bsd):
228
        cxx_builtin_include_directories = ["/usr/local/llvm-devel/lib/clang/16.0.0", "/usr/include/c++/v1", "/usr/local/include", "/usr/include"]
229
        cxx_builtin_include_directories = ["/usr/local/llvm16/lib/clang/16.0.0", "/usr/local/llvm16/lib/clang/16/include", "/usr/include/c++/v1", "/usr/local/include", "/usr/include"]
229
    else:
230
    else:
230
        cxx_builtin_include_directories = []
231
        cxx_builtin_include_directories = []
231
    if is_bsd:
232
    if is_bsd:
232
        tool_paths = [
233
        tool_paths = [
233
            tool_path(name = "ar", path = "/usr/bin/ar"),
234
            tool_path(name = "ar", path = "/usr/bin/ar"),
234
            tool_path(name = "cpp", path = "/usr/local/llvm-devel/bin/clang-cpp"),
235
            tool_path(name = "cpp", path = "/usr/local/llvm16/bin/clang-cpp"),
235
            tool_path(name = "dwp", path = "/usr/bin/dwp"),
236
            tool_path(name = "dwp", path = "/usr/bin/dwp"),
236
            tool_path(name = "gcc", path = "/usr/local/llvm-devel/bin/clang-16"),
237
            tool_path(name = "gcc", path = "/usr/local/llvm16/bin/clang-16"),
237
            tool_path(name = "gcov", path = "/usr/bin/gcov"),
238
            tool_path(name = "gcov", path = "/usr/bin/gcov"),
238
            tool_path(name = "ld", path = "/usr/local/llvm-devel/bin/ld"),
239
            tool_path(name = "ld", path = "/usr/local/llvm16/bin/ld"),
239
            tool_path(name = "nm", path = "/usr/bin/nm"),
240
            tool_path(name = "nm", path = "/usr/bin/nm"),
240
            tool_path(name = "objcopy", path = "/usr/bin/objcopy"),
241
            tool_path(name = "objcopy", path = "/usr/bin/objcopy"),
241
            tool_path(name = "objdump", path = "/usr/bin/objdump"),
242
            tool_path(name = "objdump", path = "/usr/bin/objdump"),
(-)b/science/py-tensorflow/files/patch-tensorflow_BUILD (-5 / +14 lines)
Lines 1-22 Link Here
1
--- tensorflow/BUILD.orig	2022-05-22 22:28:22 UTC
1
--- tensorflow/BUILD.orig	2022-05-23 00:28:22.000000000 +0200
2
+++ tensorflow/BUILD
2
+++ tensorflow/BUILD	2023-03-30 17:47:04.211287000 +0200
3
@@ -938,8 +938,10 @@ tf_cc_shared_object(
3
@@ -938,8 +938,11 @@
4
         ],
4
         ],
5
         "//tensorflow:windows": [],
5
         "//tensorflow:windows": [],
6
         "//tensorflow:freebsd": [
6
         "//tensorflow:freebsd": [
7
+            "-Wl,--unresolved-symbols=ignore-all",
7
+            "-Wl,--unresolved-symbols=ignore-all",
8
+            "-Wl,--undefined-version",
8
             "-Wl,--version-script,$(location //tensorflow:tf_framework_version_script.lds)",
9
             "-Wl,--version-script,$(location //tensorflow:tf_framework_version_script.lds)",
9
             "-lexecinfo",
10
             "-lexecinfo",
10
+            "-L/usr/local/lib",
11
+            "-L/usr/local/lib",
11
         ],
12
         ],
12
         "//conditions:default": [
13
         "//conditions:default": [
13
             "-Wl,--version-script,$(location //tensorflow:tf_framework_version_script.lds)",
14
             "-Wl,--version-script,$(location //tensorflow:tf_framework_version_script.lds)",
14
@@ -1021,7 +1023,7 @@ tf_cc_shared_object(
15
@@ -1021,7 +1024,7 @@
15
         # copybara:uncomment_end
16
         # copybara:uncomment_end
16
         "//conditions:default": [
17
         "//conditions:default": [
17
             "-z defs",
18
             "-z defs",
18
-            "-Wl,--version-script,$(location //tensorflow/c:version_script.lds)",
19
-            "-Wl,--version-script,$(location //tensorflow/c:version_script.lds)",
19
+            "-L/lib,-L/usr/lib,--unresolved-symbols=ignore-all,-Wl,--version-script,$(location //tensorflow/c:version_script.lds)",
20
+            "-L/lib,-L/usr/lib,--unresolved-symbols=ignore-all,-Wl,--undefined-version,-Wl,--version-script,$(location //tensorflow/c:version_script.lds)",
20
         ],
21
         ],
21
     }),
22
     }),
22
     per_os_targets = True,
23
     per_os_targets = True,
24
@@ -1054,6 +1057,7 @@
25
         "//tensorflow:windows": [],
26
         "//conditions:default": [
27
             "-z defs",
28
+            "-Wl,--undefined-version",
29
             "-Wl,--version-script,$(location //tensorflow:tf_version_script.lds)",
30
         ],
31
     }),
(-)b/science/py-tensorflow/files/patch-tensorflow_java_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/java/BUILD.orig	2023-03-30 17:51:23.641040000 +0200
2
+++ tensorflow/java/BUILD	2023-03-30 17:51:34.802406000 +0200
3
@@ -446,6 +446,7 @@
4
         "//tensorflow:windows": [],
5
         "//conditions:default": [
6
             "-z defs",
7
+            "-Wl,--undefined-version",
8
             "-s",
9
             "-Wl,--version-script,$(location {})".format(LINKER_VERSION_SCRIPT),
10
         ],
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/lite/BUILD.orig	2023-03-30 18:04:54.206396000 +0200
2
+++ tensorflow/lite/BUILD	2023-03-30 18:04:24.422539000 +0200
3
@@ -1204,6 +1204,7 @@
4
         "//tensorflow:windows": [],
5
         "//conditions:default": [
6
             "-Wl,-z,defs",
7
+            "-Wl,--undefined-version",
8
             "-Wl,--version-script,$(location //tensorflow/lite:tflite_version_script.lds)",
9
         ],
10
     }),
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_build_def.bzl (+10 lines)
Added Link Here
1
--- tensorflow/lite/build_def.bzl.orig	2023-03-30 17:56:40.338369000 +0200
2
+++ tensorflow/lite/build_def.bzl	2023-03-30 17:56:50.244995000 +0200
3
@@ -172,6 +172,7 @@
4
         ],
5
         clean_dep("//tensorflow:windows"): [],
6
         "//conditions:default": [
7
+            "-Wl,--undefined-version",
8
             "-Wl,--version-script,$(location {})".format(linkscript),
9
             "-Wl,-soname," + name,
10
         ],
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_c_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/lite/c/BUILD.orig	2023-03-30 18:05:35.316884000 +0200
2
+++ tensorflow/lite/c/BUILD	2023-03-30 18:05:48.639862000 +0200
3
@@ -29,6 +29,7 @@
4
         "//tensorflow:windows": [],
5
         "//conditions:default": [
6
             "-z defs",
7
+            "-Wl,--undefined-version",
8
             "-Wl,--version-script,$(location //tensorflow/lite/c:version_script.lds)",
9
         ],
10
     }),
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_delegates_flex_build_def.bzl (+10 lines)
Added Link Here
1
--- tensorflow/lite/delegates/flex/build_def.bzl.orig	2023-03-30 17:57:26.322444000 +0200
2
+++ tensorflow/lite/delegates/flex/build_def.bzl	2023-03-30 17:58:45.005163000 +0200
3
@@ -223,6 +223,7 @@
4
             "//tensorflow:windows": [],
5
             "//conditions:default": [
6
                 "-Wl,-z,defs",
7
+                "-Wl,--undefined-version",
8
                 "-Wl,--version-script,$(location //tensorflow/lite/delegates/flex:version_script.lds)",
9
             ],
10
         }),
(-)b/science/py-tensorflow/files/patch-tensorflow_lite_delegates_hexagon_hexagon_nn_BUILD (+10 lines)
Added Link Here
1
--- tensorflow/lite/delegates/hexagon/hexagon_nn/BUILD.orig	2023-03-30 17:50:25.801299000 +0200
2
+++ tensorflow/lite/delegates/hexagon/hexagon_nn/BUILD	2023-03-30 17:50:38.457225000 +0200
3
@@ -76,6 +76,7 @@
4
     name = "libhexagon_interface.so",
5
     linkopts = [
6
         "-Wl,-soname=libhexagon_interface.so",
7
+        "-Wl,--undefined-version",
8
         "-z defs",
9
         "-Wl,--version-script,$(location //tensorflow/lite/delegates/hexagon/hexagon_nn:version_scripts.lds)",
10
     ] + select({
(-)b/science/py-tensorflow/files/patch-tensorflow_tensorflow.bzl (+26 lines)
Added Link Here
1
--- tensorflow/tensorflow.bzl.orig	2023-03-30 17:54:35.641567000 +0200
2
+++ tensorflow/tensorflow.bzl	2023-03-30 17:56:12.747346000 +0200
3
@@ -2305,6 +2305,7 @@
4
         ],
5
         clean_dep("//tensorflow:windows"): [],
6
         "//conditions:default": [
7
+            "-Wl,--undefined-version",
8
             "-Wl,--version-script",
9
             "$(location %s.lds)" % vscriptname,
10
         ],
11
@@ -2975,6 +2976,7 @@
12
                     "/ignore:4070",
13
                 ] if win_def_file else [],
14
                 "//conditions:default": [
15
+                    "-Wl,--undefined-version",
16
                     "-Wl,--version-script",
17
                     "$(location %s)" % version_script_file,
18
                 ],
19
@@ -3035,6 +3037,7 @@
20
                 ],
21
                 clean_dep("//tensorflow:windows"): [],
22
                 "//conditions:default": [
23
+                    "-Wl,--undefined-version",
24
                     "-Wl,--version-script",
25
                     "$(location %s)" % version_script_file,
26
                 ],
(-)b/science/py-tensorflow/files/patch-tensorflow_tf_framework_version_script.lds (+12 lines)
Added Link Here
1
--- tensorflow/tf_framework_version_script.lds.orig	2023-03-30 17:42:11.255357000 +0200
2
+++ tensorflow/tf_framework_version_script.lds	2023-03-30 17:42:18.431845000 +0200
3
@@ -3,9 +3,6 @@
4
   local:
5
     jpeg_*;
6
     jinit_*;
7
-    jdiv_round_up;
8
-    jround_up;
9
-    jzero_far;
10
     jcopy_*;
11
     jsimd_*;
12
     hwloc_*;

Return to bug 270411