I can build tensorflow/lite with cmake...but where does it install itself?

Hi again -

So I’m able to build tflite with the cmake command in the documentation, on x86_64 Linux. What I don’t know, is where does libtensorflow-lite.so install itself when I run “sudo cmake --install .” ?

The documentation doesn’t mention this step. The output I am seeing seems to indicate there is no libtensorflow-lite.so? Can I get some clarification?

Or, how can I confirm libtensorflow-lite.so is in a standard Linux lib-path (not with pip either, but with pkg-config)?

Thanks, Charles.

So, I came across this paragraph in the cmake build documentation:

Note: This generates a static library libtensorflow-lite.a in the current directory but the library isn’t self-contained since all the transitive dependencies are not included. To use the library properly, you need to create a CMake project. Please refer the “Create a CMake project which uses TensorFlow Lite” section.

I think this needs updating. I was able to generate the libtensorflow-lite.a static lib into a libtensorflow-lite.so lib and there were no undefined refs. So I can surmise the CMakeLists.txt script contexts that handle the “cmake --install .” command can be updated to copy over the shared-object lib and headers into a standard linux path?

I pulled down a pretty recent tag: r2.11

Thoughts? Charles.

So I tried the following command from the documentation:

crm@shazbox:~/src/tensorflow/t$ cmake ../tensorflow/lite -DTFLITE_ENABLE_INSTALL=ON   -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -Dabsl_DIR=~/tf-foo/lib/cmake/absl -DEigen3_DIR=~/tf-foo/share/eigen3/cmake -DNEON_2_SSE_DIR=~/tf-foo/lib/cmake/NEON_2_SSE -Dcpuinfo_DIR=~/tf-foo/share/cpuinfo -Druy_DIR=~/tf-foo/lib/cmake/ruy

I’m gathering this is the preferred way to install libtensorflow-lite libs and headers

I replaced with /home/$USER/tf-foo/

The command returned this error:

CMake Error in CMakeLists.txt:

  Target "tensorflow-lite" INTERFACE_INCLUDE_DIRECTORIES property contains

  path:
    "/home/crm/src/tensorflow/t/gemmlowp"
  which is prefixed in the build directory.

CMake Error: install(EXPORT "tensorflow-liteTargets" ...) includes target "tensorflow-lite" which requires target "absl_flags" that is not in any export set.

CMake Error: install(EXPORT "tensorflow-liteTargets" ...) includes target "tensorflow-lite" which requires target "absl_hash" that is not in any export set.

CMake Error: install(EXPORT "tensorflow-liteTargets" ...) includes target "tensorflow-lite" which requires target "absl_status" that is not in any export set.

CMake Error: install(EXPORT "tensorflow-liteTargets" ...) includes target "tensorflow-lite" which requires target "absl_strings" that is not in any export set.

CMake Error: install(EXPORT "tensorflow-liteTargets" ...) includes target "tensorflow-lite" which requires target "absl_synchronization" that is not in any export set.

CMake Error: install(EXPORT "tensorflow-liteTargets" ...) includes target "tensorflow-lite" which requires target "absl_variant" that is not in any export set.

CMake Error: install(EXPORT "tensorflow-liteTargets" ...) includes target "tensorflow-lite" which requires target "ruy" that is not in any export set.

CMake Error: install(EXPORT "tensorflow-liteTargets" ...) includes target "tensorflow-lite" which requires target "pthreadpool" that is not in any export set.

CMake Error: install(EXPORT "tensorflow-liteTargets" ...) includes target "tensorflow-lite" which requires target "XNNPACK" that is not in any export set.

-- Generating done