Issue 1:
System information

OS Platform and Distribution: Windows 10

TensorFlow installed from: source

TensorFlow version: 1.12.0

Python version: 3.5

Bazel version (if compiling from source): 0.19.2

CUDA/cuDNN version: No

GPU model and memory: No

Problem

I have a build problem when using bazel to build transform-graph. The error is fatal error LNK1120: 4 unresolved externals

Commands executed before running into the problem

I've already done set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC

then bazel build tensorflow/tools/graph_transforms:transform_graph --local_resources 2048,.5,1.0

Full error log:

ERROR: C:/users/administrator/desktop/tensorflow-build/tensorflow/tensorflow/tools/graph_transforms/BUILD:219:1: Linking of rule '//tensorflow/tools/graph_transforms:transform_graph' failed (Exit 1120): link.exe failed: error executing command

cd C:/users/administrator/_bazel_administrator/x7v2faqn/execroot/org_tensorflow

SET LIB=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64;

SET PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64;C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64;;C:\WINDOWS\system32

SET PWD=/proc/self/cwd

SET PYTHON_BIN_PATH=C:/Anaconda/envs/tensor/python.exe

SET PYTHON_LIB_PATH=C:/Anaconda/envs/tensor/lib/site-packages

SET TEMP=C:\Users\ADMINI1\AppData\Local\Temp

SET TF_DOWNLOAD_CLANG=0

SET TF_NEED_CUDA=0

SET TF_NEED_OPENCL_SYCL=0

SET TF_NEED_ROCM=0

SET TMP=C:\Users\ADMINI1\AppData\Local\Temp

C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe /nologo /OUT:bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph.exe /SUBSYSTEM:CONSOLE -DEFAULTLIB:advapi32.lib /MACHINE:X64 @bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph.exe-2.params /OPT:ICF /OPT:REF

LINK : warning LNK4044: unrecognized option '/lpthread'; ignored

Creating library bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph.lib and object bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph.exp

batch_kernels.lo.lib(batch_kernels.obj) : warning LNK4217: locally defined symbol ?DEVICE_CPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_CPU) imported in function "void __cdecl tensorflow::dynamic initializer for 'registrar__body__0__object''(void)" (??__Eregistrar__body__0__object@tensorflow@@YAXXZ) captured_function.lib(captured_function.obj) : warning LNK4049: locally defined symbol ?DEVICE_CPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_CPU) imported arithmetic_optimizer.lib(arithmetic_optimizer.obj) : warning LNK4049: locally defined symbol ?DEVICE_CPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_CPU) imported pin_to_host_optimizer.lib(pin_to_host_optimizer.obj) : warning LNK4049: locally defined symbol ?DEVICE_CPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_CPU) imported arithmetic_optimizer.lib(arithmetic_optimizer.obj) : warning LNK4217: locally defined symbol ?DEVICE_GPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_GPU) imported in function "private: bool __cdecl tensorflow::grappler::anonymous namespace'::ReorderCastAndTranspose::NodeIsOnCpuOrGpu(class tensorflow::NodeDef const *)const " (?NodeIsOnCpuOrGpu@ReorderCastAndTranspose@?A0x2ef8a95a@grappler@tensorflow@@AEBA_NPEBVNodeDef@4@@z)

layout_optimizer.lib(layout_optimizer.obj) : warning LNK4049: locally defined symbol ?DEVICE_GPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_GPU) imported

pin_to_host_optimizer.lib(pin_to_host_optimizer.obj) : warning LNK4049: locally defined symbol ?DEVICE_GPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_GPU) imported

unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl icu_62::ErrorCode::~ErrorCode(void)" (_imp??1ErrorCode@icu_62@@UEAA@XZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@z)

unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: signed char __cdecl icu_62::ErrorCode::isSuccess(void)const " (_imp?isSuccess@ErrorCode@icu_62@@QEBACXZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@z)

unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum UErrorCode __cdecl icu_62::ErrorCode::reset(void)" (_imp?reset@ErrorCode@icu_62@@qeaa?AW4UErrorCode@@xz) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@z)

unicode_script_op.lo.lib(unicode_script_op.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) const icu_62::ErrorCode::`vftable'" (_imp??_7ErrorCode@icu_62@@6b@) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@z)

bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph.exe : fatal error LNK1120: 4 unresolved externals

Target //tensorflow/tools/graph_transforms:transform_graph failed to build

INFO: Elapsed time: 569.319s, Critical Path: 237.59s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]

INFO: 0 processes.

FAILED: Build did NOT complete successfully

Issue 2:
System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):

windows 10 pro

TensorFlow installed from (source or binary):

source

TensorFlow version:

1.12

Python version:

3.6

Installed using virtualenv? pip? conda?:

conda

Bazel version (if compiling from source):

0.15.2

GCC/Compiler version (if compiling from source):

vs2015 build tools

CUDA/cuDNN version:

9.0/7

GPU model and memory:

2 X pascal6000, 24GB

Describe the problem

Hi,

i have installed tf 1.12 from source using bazel according to the instruction on site and the build was successful. now i tried building the graph_transforms tool (the reason why i installed tf from source in the first place) but i get the link error in the logs below. i tried following the suggestions in #23655 but i was still getting link errors.

any help on this would be really appreciated, i really want to start using the graph_transforms tool.

thanks

Provide the exact sequence of commands / steps that you executed before running into the problem

bazel build tensorflow/tools/graph_transforms:transform_graph

Any other info / logs

ERROR: C:/deep/tensorflow/tf-1.12/tensorflow/tensorflow/tools/graph_transforms/BUILD:219:1: Linking of rule '//tensorflow/tools/graph_transforms:transform_graph' failed (Exit 1120): link.exe failed: error executing command
cd C:/users/iariav/_bazel_iariav/6fo6vxbr/execroot/org_tensorflow
SET CUDA_TOOLKIT_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0
SET CUDNN_INSTALL_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0
SET INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt;
SET LIB=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64;
SET PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64;C:\windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\;;C:\WINDOWS\system32
SET PWD=/proc/self/cwd
SET PYTHON_BIN_PATH=C:/Users/iariav/Anaconda3/envs/tensorflow-v1.12/python.exe
SET PYTHON_LIB_PATH=C:/Users/iariav/Anaconda3/envs/tensorflow-v1.12/lib/site-packages
SET TEMP=C:\Users\iariav\AppData\Local\Temp
SET TF_CUDA_CLANG=0
SET TF_CUDA_COMPUTE_CAPABILITIES=6.1
SET TF_CUDA_VERSION=9.0
SET TF_CUDNN_VERSION=7
SET TF_NEED_CUDA=1
SET TF_NEED_OPENCL_SYCL=0
SET TF_NEED_ROCM=0
SET TMP=C:\Users\iariav\AppData\Local\Temp
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe /nologo /OUT:bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph /SUBSYSTEM:CONSOLE -DEFAULTLIB:advapi32.lib -Wl,-rpath,../local_config_cuda/cuda/lib64 -Wl,-rpath,../local_config_cuda/cuda/extras/CUPTI/lib64 /MACHINE:X64 @bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph-2.params
LINK : warning LNK4044: unrecognized option '/Wl,-rpath,../local_config_cuda/cuda/lib64'; ignored
LINK : warning LNK4044: unrecognized option '/Wl,-rpath,../local_config_cuda/cuda/extras/CUPTI/lib64'; ignored
LINK : warning LNK4044: unrecognized option '/lpthread'; ignored
Creating library bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph.lib and object bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph.exp
libbatch_kernels.lo(batch_kernels.o) : warning LNK4217: locally defined symbol ?DEVICE_CPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_CPU) imported in function "void __cdecl tensorflow::`dynamic initializer for 'registrar__body__0__object''(void)" (??__Eregistrar__body__0__object@tensorflow@@YAXXZ)
libcaptured_function.a(captured_function.o) : warning LNK4049: locally defined symbol ?DEVICE_CPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_CPU) imported
libarithmetic_optimizer.a(arithmetic_optimizer.o) : warning LNK4049: locally defined symbol ?DEVICE_CPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_CPU) imported
libpin_to_host_optimizer.a(pin_to_host_optimizer.o) : warning LNK4049: locally defined symbol ?DEVICE_CPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_CPU) imported
libcuda_platform.lo(cuda_dnn.o) : warning LNK4217: locally defined symbol ?ThenBlasGemm@Stream@stream_executor@@QEAAAEAV12@W4Transpose@blas@2@0_K11MAEBV?$DeviceMemory@M@2@H2HMPEAV52@H@Z (public: class stream_executor::Stream & __cdecl stream_executor::Stream::ThenBlasGemm(enum stream_executor::blas::Transpose,enum stream_executor::blas::Transpose,unsigned __int64,unsigned __int64,unsigned __int64,float,class stream_executor::DeviceMemory<float> const &,int,class stream_executor::DeviceMemory<float> const &,int,float,class stream_executor::DeviceMemory<float> *,int)) imported in function "public: virtual bool __cdecl stream_executor::cuda::CudnnSupport::DoMatMul(class stream_executor::Stream *,class stream_executor::DeviceMemory<float> const &,class stream_executor::DeviceMemory<float> const &,class stream_executor::dnn::BatchDescriptor const &,class stream_executor::dnn::BatchDescriptor const &,class stream_executor::DeviceMemory<float> *)" (?DoMatMul@CudnnSupport@cuda@stream_executor@@UEAA_NPEAVStream@3@AEBV?$DeviceMemory@M@3@1AEBVBatchDescriptor@dnn@3@2PEAV53@@Z)
libarithmetic_optimizer.a(arithmetic_optimizer.o) : warning LNK4217: locally defined symbol ?DEVICE_GPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_GPU) imported in function "private: bool __cdecl tensorflow::grappler::`anonymous namespace'::ReorderCastAndTranspose::NodeIsOnCpuOrGpu(class tensorflow::NodeDef const *)const " (?NodeIsOnCpuOrGpu@ReorderCastAndTranspose@?A0xbb50fe50@grappler@tensorflow@@AEBA_NPEBVNodeDef@4@@Z)
liblayout_optimizer.a(layout_optimizer.o) : warning LNK4049: locally defined symbol ?DEVICE_GPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_GPU) imported
libpin_to_host_optimizer.a(pin_to_host_optimizer.o) : warning LNK4049: locally defined symbol ?DEVICE_GPU@tensorflow@@3QEBDEB (char const * const tensorflow::DEVICE_GPU) imported
libunicode_script_op.lo(unicode_script_op.o) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl icu_62::ErrorCode::~ErrorCode(void)" (__imp_??1ErrorCode@icu_62@@UEAA@XZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
libunicode_script_op.lo(unicode_script_op.o) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: signed char __cdecl icu_62::ErrorCode::isSuccess(void)const " (__imp_?isSuccess@ErrorCode@icu_62@@QEBACXZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
libunicode_script_op.lo(unicode_script_op.o) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum UErrorCode __cdecl icu_62::ErrorCode::reset(void)" (__imp_?reset@ErrorCode@icu_62@@QEAA?AW4UErrorCode@@XZ) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
libunicode_script_op.lo(unicode_script_op.o) : error LNK2019: unresolved external symbol "__declspec(dllimport) const icu_62::ErrorCode::`vftable'" (__imp_??_7ErrorCode@icu_62@@6B@) referenced in function "public: virtual void __cdecl tensorflow::UnicodeScriptOp::Compute(class tensorflow::OpKernelContext *)" (?Compute@UnicodeScriptOp@tensorflow@@UEAAXPEAVOpKernelContext@2@@Z)
bazel-out/x64_windows-opt/bin/tensorflow/tools/graph_transforms/transform_graph : fatal error LNK1120: 4 unresolved externals
Target //tensorflow/tools/graph_transforms:transform_graph failed to build
INFO: Elapsed time: 782.281s, Critical Path: 295.06s
INFO: 1858 processes: 1858 local.
FAILED: Build did NOT complete successfully