Alexander Pacha
Alexander Pacha

Reputation: 9710

Compiling Tensorflow with CMake on Windows fails with file version_info.cc not found

Similar to this question and related to that questions, I would like to build Tensorflow on Windows from sources to enable the CPU optimizations that are deactivated by design to support as many machines as possible. From the official documentation that suggests that Bazel is not supported on Windows, I conclude that the CMake build is the way to go.

I found the CMake instructions here, where I assumed that by checking out Tag v1.1.0, I could be able to build it. But after following the instructions, I get the following error-message:

Build FAILED.

"C:\Users\Alex\Repositories\tensorflow\tensorflow\contrib\cmake\build\tf_python_build_pip_package.vcxproj" (default target) (1) ->
"C:\Users\Alex\Repositories\tensorflow\tensorflow\contrib\cmake\build\pywrap_tensorflow_internal.vcxproj" (default target) (3) ->
"C:\Users\Alex\Repositories\tensorflow\tensorflow\contrib\cmake\build\pywrap_tensorflow_internal_static.vcxproj" (default target) (4) ->
"C:\Users\Alex\Repositories\tensorflow\tensorflow\contrib\cmake\build\tf_core_cpu.vcxproj" (default target) (5) ->
"C:\Users\Alex\Repositories\tensorflow\tensorflow\contrib\cmake\build\tf_core_framework.vcxproj" (default target) (6) ->
(ClCompile target) ->
  c1xx : fatal error C1083: Cannot open source file: 'C:\Users\Alex\Repositories\tensorflow\tensorflow\core\util\version_info.cc': No such file or directory [C:\Users\Alex\Repositories\tensorflow\tensorflow\contrib\cmake\build\tf_core_framework.vcxproj]

    0 Warning(s)
    1 Error(s)

which claims that version_info.cc could not be found. What is that file, how is it generated and why is it missing? Is there a way, how I can create it to complete my build or am I missing some configuration that was not mentioned in the document?

Upvotes: 2

Views: 943

Answers (1)

Alexander Pacha
Alexander Pacha

Reputation: 9710

Apparently, this is a known bug that is already fixed on master branch, but still exists in older versions. Manually patching the files or using master branch solves this issue.

Upvotes: 1

Related Questions