Building flatbuffers with cmake

Hi all -

I’m trying to build TF-Lite with these instructions

I’m using this method, because it seems that building with bazel doesn’t like the Android NDK I’m pointing it to (25.1.x > 21 → not supported error by bazel (known issue).

These instructions suggest I build the flatbuffers piece. OK…but I’m running into another problem:

cmake ../../tensorflow/lite/tools/cmake/native_tools/flatbuffers/
CMake Warning at CMakeLists.txt:43 (find_package):
  By not providing "Findflatbuffers.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "flatbuffers", but CMake did not find one.

  Could not find a package configuration file provided by "flatbuffers" with
  any of the following names:


  Add the installation prefix of "flatbuffers" to CMAKE_PREFIX_PATH or set
  "flatbuffers_DIR" to a directory containing one of the above files.  If
  "flatbuffers" provides a separate development package or SDK, be sure it
  has been installed.

It seems like the *.cmake files this CMakeLists.txt is asking for, are not in the TF repo (anymore?)

So, what do I do here to be able to build?

Thanks, Charles.

I was able to build flatbuffers after all. I had to make a small change to the flatbuffers.cmake file
So, how do I communicate this patch to the maintainers?

I also noticed a small inconsistency with the source documentation on how to build. Who do I talk to about that?

Thanks, Charles.


Welcome to the Tensorflow Forum!

Thank you for reporting.

You can make modifications to the documentation by submitting a Pull Request.