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

windows link error #60283

Open
yisir323 opened this issue Apr 10, 2023 · 6 comments
Open

windows link error #60283

yisir323 opened this issue Apr 10, 2023 · 6 comments
Assignees
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype:cpu-intel To track windows cpu issues subtype:windows Windows Build/Installation Issues TF 2.12 For issues related to Tensorflow 2.12 type:build/install Build and install issues

Comments

@yisir323
Copy link

yisir323 commented Apr 10, 2023

Click to expand!

Issue Type

Build/Install

Have you reproduced the bug with TF nightly?

No

Source

source

Tensorflow Version

2.12.0

Custom Code

No

OS Platform and Distribution

Windows 10 professional

Mobile device

No response

Python version

3.8.5 64bit

Bazel version

5.3.0

GCC/Compiler version

visual studio 2019

CUDA/cuDNN version

No response

GPU model and memory

cpu model

Current Behaviour?

A bug happened!when I compile TensorFlow 2.12.0  to produce Windows C++ API files. I have tried severl times. The same erro happended. I hope you can help me,thank you

Standalone code to reproduce the issue

I used Windows 10 operating system, Visual Studio 2019 C++, Bazel 5.3.0, and TensorFlow 2.12.0 to compile Windows C++ API files. My Bazel build command is: "G:\Bazel5\Bazel --output_user_root=g:\tfoutPut4 build --config=opt --define=no_tensorflow_py_deps=true --jobs=8 --subcommands //tensorflow:tensorflow_cc.dll //tensorflow:install_headers > log.txt 2> err.txt". The compilation was successful, but the linking failed with the error message: "ERROR: G:/tensorflow/tensorflow/BUILD:1219:21: Linking tensorflow/tensorflow_cc.dll failed: (Exit 1120): link.exe failed: error executing command".

Relevant log output

ERROR: G:/tensorflow/tensorflow/BUILD:1219:21: Linking tensorflow/tensorflow_cc.dll failed: (Exit 1120): link.exe failed: error executing command 
  cd /d G:/tfoutput4/ic7qrvhc/execroot/org_tensorflow
  SET LIB=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64
    SET PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\\x64;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\devinit;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\\MSBuild\Current\Bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\;;C:\Windows\system32;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
    SET PWD=/proc/self/cwd
    SET PYTHON_BIN_PATH=C:/ProgramData/Anaconda3/python.exe
    SET PYTHON_LIB_PATH=C:/ProgramData/Anaconda3/Lib/site-packages
    SET RUNFILES_MANIFEST_ONLY=1
    SET TEMP=C:\Users\yisir\AppData\Local\Temp
    SET TF2_BEHAVIOR=1
    SET TMP=C:\Users\yisir\AppData\Local\Temp
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe @bazel-out/x64_windows-opt/bin/tensorflow/tensorflow_cc.dll-2.params
# Configuration: 86b0c99414660dd887a605e34d6ccaa371dc6e6122db6d3c5d156e9013ebeb17
# Execution platform: @local_execution_config_platform//:platform
INFO: Elapsed time: 8232.786s, Critical Path: 458.51s
INFO: 15506 processes: 3617 internal, 11889 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

The following is an excerpt from another log file stdout-23850 int my dirctory G:/tfoutput4/ic7qrvhc/execroot/org_tensorflow/bazel-out/_tmp/actions/ :

tensorflow_cc.dll.if.exp: error LNK2001: unresolved external symbol "public: int __cdecl tensorflow::BytesList::value_size(void)const " (?value_size@BytesList@tensorflow@@QEBAHXZ)
tensorflow_cc.dll.if.exp: error LNK2001: unresolved external symbol "public: int __cdecl tensorflow::FloatList::value_size(void)const " (?value_size@FloatList@tensorflow@@QEBAHXZ)
tensorflow_cc.dll.if.exp: error LNK2001: unresolved external symbol "public: int __cdecl tensorflow::Int64List::value_size(void)const " (?value_size@Int64List@tensorflow@@QEBAHXZ)
ibtensorflow_framework.so.2.12.0.if.lib(libtensorflow_framework.so.2.12.0): error LNK2005: TF_NewBufferFromString already defined in tf_buffer.lib(tf_buffer.obj)
libtensorflow_framework.so.2.12.0.if.lib(libtensorflow_framework.so.2.12.0): error LNK2005: TF_NewTensor already defined in tf_tensor.lib(tf_tensor.obj)
libtensorflow_framework.so.2.12.0.if.lib(libtensorflow_framework.so.2.12.0): error LNK2005: TF_TensorData already defined in tf_tensor.lib(tf_tensor.obj)
Creating library bazel-out/x64_windows-opt/bin/tensorflow/tensorflow_cc.dll.if.lib and object bazel-out/x64_windows-opt/bin/tensorflow/tensorflow_cc.dll.if.exp
LINK: warning LNK4217: symbol "TFE_NewContextOptions" (defined in "c_api.lo.lib(c_api.obj)") already imported in "pass_utils.lib(utils.obj)" (function "?InitializeTFRuntime@quant@mlir@@YAPEAUTFE_Context@@XZ" (?InitializeTFRuntime@quant@mlir@@YAPEAUTFE_Context@@XZ))
LINK: warning LNK4286: symbol "TFE_NewContextOptions" (defined in "c_api.lo.lib(c_api.obj)") already imported in "tf_dialect_passes.lo.lib(constant_fold.obj)"
@google-ml-butler google-ml-butler bot added type:build/install Build and install issues type:performance Performance Issue labels Apr 10, 2023
@yisir323
Copy link
Author

the following are the two log files:
err - 副本.txt
stdout-23850.txt

@tilakrayal tilakrayal added TF 2.12 For issues related to Tensorflow 2.12 subtype:cpu-intel To track windows cpu issues labels Apr 10, 2023
@tilakrayal
Copy link
Contributor

@SuryanarayanaY,
I was able to reproduce the issue on tensorflow v2.12. Kindly find the reference below.

# Execution platform: @local_execution_config_platform//:platform
ERROR: C:/tensorflow/tensorflow/BUILD:1309:11: Linking tensorflow/tensorflow_cc.dll failed: (Exit 1120): link.exe failed: error executing command 
 

@tilakrayal tilakrayal added subtype:windows Windows Build/Installation Issues and removed type:performance Performance Issue labels Apr 11, 2023
@sachinprasadhs
Copy link
Contributor

@mraunak , Could you please take a look into the issue. Thanks!

@sachinprasadhs sachinprasadhs added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Jun 1, 2023
@mraunak
Copy link
Contributor

mraunak commented Jun 22, 2023

Hi, @yisir323, sorry for the delayed response. Could you please run the above command again on the latest commit and let us know the issue you are facing?

@ddrous
Copy link

ddrous commented Aug 15, 2023

Hi all, any chance there's been some progress on this issue ?

@ajithrp123
Copy link

please check this issue #61226
Seems similar to this one.
Seems tensorflow_cc target not supported in windows in some tensorflow versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype:cpu-intel To track windows cpu issues subtype:windows Windows Build/Installation Issues TF 2.12 For issues related to Tensorflow 2.12 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

7 participants