Skip to content

Tensorflow-Lite CMake Build Fails On Windows With VS Build Generator #62609

@embeddetech

Description

@embeddetech

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

2.15.0 (latest)

Custom code

No

OS platform and distribution

Windows 11

Mobile device

No response

Python version

No response

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

Tensorflow-lite build fails on Windows using CMake with Visual Studio 2022. In my experience, Tensorflow lite has never properly built with Visual Studio projects, and this is a major oversight.

Standalone code to reproduce the issue

Exact steps to reproduce:

git clone https://github.com/tensorflow/tensorflow
mkdir tensorflow_build
cd tensorflow_build
cmake ..\tensorflow\tensorflow\lite
cmake --build .

Relevant log output

Running the above, from the CMake output, it wasn't clear whether it built successfully or not, it seemed to just stop generating output:

  root_profiler.cc
  profiler.cc
  telemetry_setting_internal.cc
  sparsity_format_converter.cc
  schema_utils.cc
  Generating Code...

After then opening the Visual Studio 2022 project and building, it fails. 

C1083: Cannot open include file 'sys/mman.h': No such file or directory.
LNK1104: Cannot open file '..\..\Debug\tensorflow-lite.lib'
C1083: Cannot open include file: 'Python.h': No such file or directory
C1083: Cannot open include file: 'pybind11/functional.h': No such file or directory
C1083: Cannot open include file: 'Python.h': No such file or directory
C1083: Cannot open include file: 'Python.h': No such file or directory
C1083: Cannot open include file: 'Python.h': No such file or directory
C1083: Cannot open include file: 'unistd.h': No such file or directory
C1083: Cannot open include file: 'getopt.h': No such file or directory


PLEASE help resolve these Visual Studio build problems. I have great need of tflite as well as tflite-micro to build in Visual Studio.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions