Building 2.11 from source on Windows

Hi all,

Tryign to build 2.11 stable on Windows but keep running into this error after my bazel command:

ERROR: C:/users/babar/tf/tensorflow/python/BUILD:3633:8: in cmd attribute of genrule rule //tensorflow/python:pywrap_tensorflow_import_lib_file: variable '$<' : no input file

this is before any compilation starts, looks like the make automatic variable is not expanded correctly but i dont know how to debug it. Any suggestions from the team?


This error message suggests that the pywrap_tensorflow_import_lib_file rule is expecting an input file, but it is not able to find it.

To debug this issue, you can try running the build with the --verbose_failures option to get more detailed error messages.

You can check if all the input files that the rule requires are present in the specified location. You may also try running a clean build by removing any previously generated files and then rebuild.

Thank you!

Hi @chunduriv , thanks for the reply. I already do bazel clean --expunge at the beginning and I added

--logging=6 \
--subcommands \
--verbose_failures \

to my bazel command but no help. is there other way to debug why it is not able to find that file? if i remove that line from the BUILD file the compilation starts but linking fails because the .lib file is corrupt 0kb or something.

btw everything works fine on linux and osx.

I suspect you’re having the same issue I am. I have created this GH issue: Windows build fails with "pywrap_tensorflow_import_lib_file: variable '$<' : no input file" · Issue #59938 · tensorflow/tensorflow · GitHub

I agree this seems to only affect Windows for tf 2.11.