Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencv interop fix: exclude libjpeg symbols from libtensorflow_framew… #19966

Merged
merged 2 commits into from
Jun 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions tensorflow/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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(),
)

Expand Down
11 changes: 11 additions & 0 deletions tensorflow/tf_framework_version_script.lds
Original file line number Diff line number Diff line change
@@ -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_*;
};