opencv interop fix: exclude libjpeg symbols from libtensorflow_framew… (#19966)
* opencv interop fix: exclude libjpeg symbols from libtensorflow_framework.so to avoid symbol conflict * Fix buildifier issue (sorting of fields)
This commit is contained in:
parent
eefd88284b
commit
e6570147c4
@ -451,6 +451,15 @@ filegroup(
|
||||
tf_cc_shared_object(
|
||||
name = "libtensorflow_framework.so",
|
||||
framework_so = [],
|
||||
linkopts = select({
|
||||
"//tensorflow:darwin": [],
|
||||
"//tensorflow:windows": [],
|
||||
"//tensorflow:windows_msvc": [],
|
||||
"//conditions:default": [
|
||||
"-Wl,--version-script", # This line must be directly followed by the version_script.lds file
|
||||
"$(location //tensorflow:tf_framework_version_script.lds)",
|
||||
],
|
||||
}),
|
||||
linkstatic = 1,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
@ -460,6 +469,7 @@ tf_cc_shared_object(
|
||||
"//tensorflow/core/grappler/optimizers:custom_graph_optimizer_registry_impl",
|
||||
"//tensorflow/core:lib_internal_impl",
|
||||
"//tensorflow/stream_executor:stream_executor_impl",
|
||||
"//tensorflow:tf_framework_version_script.lds",
|
||||
] + tf_additional_binary_deps(),
|
||||
)
|
||||
|
||||
|
11
tensorflow/tf_framework_version_script.lds
Normal file
11
tensorflow/tf_framework_version_script.lds
Normal file
@ -0,0 +1,11 @@
|
||||
VERS_1.0 {
|
||||
# Hide libjpeg symbols to avoid symbol conflict with OpenCV
|
||||
local:
|
||||
jpeg_*;
|
||||
jinit_*;
|
||||
jdiv_round_up;
|
||||
jround_up;
|
||||
jzero_far;
|
||||
jcopy_*;
|
||||
jsimd_*;
|
||||
};
|
Loading…
Reference in New Issue
Block a user