From c9cb5a58d5e174e9870c40328d6be427ccf8be54 Mon Sep 17 00:00:00 2001 From: formath <jinpengliu@163.com> Date: Sun, 22 Oct 2017 14:02:50 +0800 Subject: [PATCH] protobuf lib path bug fix for benckmark on osx (#13878) --- tensorflow/contrib/makefile/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tensorflow/contrib/makefile/Makefile b/tensorflow/contrib/makefile/Makefile index 3dcff3d4a3d..e970e50d2e7 100644 --- a/tensorflow/contrib/makefile/Makefile +++ b/tensorflow/contrib/makefile/Makefile @@ -190,6 +190,10 @@ LIBFLAGS := # If we're on OS X, make sure that globals aren't stripped out. ifeq ($(TARGET),OSX) +ifeq ($(HAS_GEN_HOST_PROTOC),true) + LIBFLAGS += -L$(MAKEFILE_DIR)/gen/protobuf-host/lib + export LD_LIBRARY_PATH=$(MAKEFILE_DIR)/gen/protobuf-host/lib +endif LDFLAGS += -all_load endif # Make sure that we don't strip global constructors on Linux.