【问题标题】:Compiling Tensorflow with CMake on Windows fails with file version_info.cc not found在 Windows 上使用 CMake 编译 TensorFlow 失败,找不到文件 version_info.cc
【发布时间】:2017-10-19 16:13:29
【问题描述】:

类似于this 问题并与that 问题相关,我想从源代码在Windows 上构建Tensorflow 以启用deactivated by design to support as many machines as possible 的CPU 优化。从建议 Bazel is not supported on Windows 的官方文档中,我得出结论,CMake 构建是要走的路。

我找到了 CMake 说明 here,我认为通过查看 Tag v1.1.0,我可以构建它。但是按照说明操作后,我收到以下错误消息:

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)

声称找不到version_info.cc。该文件是什么,它是如何生成的,为什么它会丢失?有没有办法,我可以如何创建它来完成我的构建,或者我错过了一些文档中没有提到的配置?

【问题讨论】:

  • 请将“更新”下的部分移至答案帖自答在 Stack Overflow 上是允许的)。我们倾向于不在问题帖子中混合问题和解决方案。

标签: python windows build tensorflow cmake


【解决方案1】:

显然,这是一个known bug,它已经固定在 master 分支上,但仍然存在于旧版本中。手动修补文件或使用 master 分支可以解决此问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-09
    • 1970-01-01
    • 2014-06-01
    相关资源
    最近更新 更多