Skip to content

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

@raphael10-collab

Description

@raphael10-collab

Issue type

Build/Install

Have you reproduced the bug with TensorFlow Nightly?

No

Source

source

TensorFlow version

2.20.0

Custom code

No

OS platform and distribution

Linux Ubuntu 24.04

Mobile device

No response

Python version

3.12.8

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

Following the indications found here: https://ai.google.dev/edge/litert/build/cmake#build_installable_package
I'm trying to build tensorflowlite as installable package:

(base) raphy@raohy:~/Grasp/tflite_build$ cmake ../../tensorflow_src/tensorflow/lite/ \
> -DTFLITE_ENABLE_INSTALL=ON \
> -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
> -DSYSTEM_FARMHASH=ON \
> -DSYSTEM_PTHREADPOOL=ON \
> -DEigen3_DIR=/home/raphy/Grasp/eigen/share/eigen3/cmake \
> -DFlatBuffers_DIR=/home/raphy/Grasp/flatbuffers/lib/cmake/flatbuffers \
> -Dcpuinfo_DIR=/home/raphy/Grasp/cpuinfo/share/cpuinfo \
> -Druy_DIR=/home/raphy/Grasp/ruy/lib/cmake/ruy \
> -DNEON_2_SSE_DIR=/home/raphy/Grasp/NEON_2_SSE/lib/cmake/NEON_2_SSE \
> -Dabsl_DIR=/home/raphy/Grasp/abseil-cpp/lib/cmake/absl \
> -Dgemmlowp_DIR=/usr/lib/x86_64-linux-gnu/cmake/gemmlowp \
> -Wno-dev
-- Setting build type to Release, for debug builds use'-DCMAKE_BUILD_TYPE=Debug'.
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 14.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found farmhash: /usr/lib/x86_64-linux-gnu/libfarmhash.so
-- Downloading FP16 to /home/raphy/Grasp/tflite_build/FP16-source (define FP16_SOURCE_DIR to avoid it)
CMake Deprecation Warning at CMakeLists.txt:16 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/raphy/Grasp/tflite_build/FP16-download
[ 11%] Creating directories for 'fp16'
[ 22%] Performing download step (download, verify and extract) for 'fp16'
-- Downloading...
   dst='/home/raphy/Grasp/tflite_build/FP16-download/fp16-prefix/src/0a92994d729ff76a58f692d3028ca1b64b145d91.zip'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://github.com/Maratyszcza/FP16/archive/0a92994d729ff76a58f692d3028ca1b64b145d91.zip'
-- [download 7% complete]
-- [download 14% complete]
-- [download 32% complete]
-- [download 44% complete]
-- [download 62% complete]
-- [download 81% complete]
-- [download 99% complete]
-- [download 100% complete]
-- verifying file...
       file='/home/raphy/Grasp/tflite_build/FP16-download/fp16-prefix/src/0a92994d729ff76a58f692d3028ca1b64b145d91.zip'
-- Downloading... done
-- extracting...
     src='/home/raphy/Grasp/tflite_build/FP16-download/fp16-prefix/src/0a92994d729ff76a58f692d3028ca1b64b145d91.zip'
     dst='/home/raphy/Grasp/tflite_build/FP16-source'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 33%] No update step for 'fp16'
[ 44%] No patch step for 'fp16'
[ 55%] No configure step for 'fp16'
[ 66%] No build step for 'fp16'
[ 77%] No install step for 'fp16'
[ 88%] No test step for 'fp16'
[100%] Completed 'fp16'
[100%] Built target fp16
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Using ccache: /usr/bin/ccache
-- Building for XNNPACK_TARGET_PROCESSOR: x86_64
-- Downloading cpuinfo to /home/raphy/Grasp/tflite_build/cpuinfo-source (define CPUINFO_SOURCE_DIR to avoid it)
CMake Deprecation Warning at CMakeLists.txt:9 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/raphy/Grasp/tflite_build/cpuinfo-download
[ 11%] Creating directories for 'cpuinfo'
[ 22%] Performing download step (download, verify and extract) for 'cpuinfo'
-- Downloading...
   dst='/home/raphy/Grasp/tflite_build/cpuinfo-download/cpuinfo-prefix/src/8a1772a0c5c447df2d18edf33ec4603a8c9c04a6.zip'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://github.com/pytorch/cpuinfo/archive/8a1772a0c5c447df2d18edf33ec4603a8c9c04a6.zip'
-- [download 0% complete]
-- [download 1% complete]
-- [download 2% complete]
-- [download 3% complete]
-- [download 4% complete]
-- [download 5% complete]
-- [download 6% complete]
-- [download 7% complete]
-- [download 8% complete]
-- [download 9% complete]
-- [download 10% complete]
-- [download 11% complete]
-- [download 12% complete]
-- [download 13% complete]
-- [download 14% complete]
-- [download 15% complete]
-- [download 16% complete]
-- [download 17% complete]
-- [download 18% complete]
-- [download 19% complete]
-- [download 20% complete]
-- [download 21% complete]
-- [download 22% complete]
-- [download 23% complete]
-- [download 24% complete]
-- [download 25% complete]
-- [download 26% complete]
-- [download 27% complete]
-- [download 28% complete]
-- [download 29% complete]
-- [download 30% complete]
-- [download 31% complete]
-- [download 32% complete]
-- [download 33% complete]
-- [download 34% complete]
-- [download 35% complete]
-- [download 36% complete]
-- [download 37% complete]
-- [download 38% complete]
-- [download 39% complete]
-- [download 40% complete]
-- [download 41% complete]
-- [download 42% complete]
-- [download 43% complete]
-- [download 44% complete]
-- [download 45% complete]
-- [download 46% complete]
-- [download 47% complete]
-- [download 48% complete]
-- [download 49% complete]
-- [download 50% complete]
-- [download 51% complete]
-- [download 52% complete]
-- [download 53% complete]
-- [download 54% complete]
-- [download 55% complete]
-- [download 56% complete]
-- [download 57% complete]
-- [download 58% complete]
-- [download 59% complete]
-- [download 60% complete]
-- [download 61% complete]
-- [download 62% complete]
-- [download 63% complete]
-- [download 64% complete]
-- [download 65% complete]
-- [download 66% complete]
-- [download 67% complete]
-- [download 68% complete]
-- [download 69% complete]
-- [download 70% complete]
-- [download 71% complete]
-- [download 72% complete]
-- [download 73% complete]
-- [download 74% complete]
-- [download 75% complete]
-- [download 76% complete]
-- [download 77% complete]
-- [download 78% complete]
-- [download 79% complete]
-- [download 80% complete]
-- [download 81% complete]
-- [download 82% complete]
-- [download 83% complete]
-- [download 84% complete]
-- [download 85% complete]
-- [download 86% complete]
-- [download 87% complete]
-- [download 88% complete]
-- [download 89% complete]
-- [download 90% complete]
-- [download 91% complete]
-- [download 92% complete]
-- [download 93% complete]
-- [download 94% complete]
-- [download 95% complete]
-- [download 96% complete]
-- [download 97% complete]
-- [download 98% complete]
-- [download 99% complete]
-- [download 100% complete]
-- verifying file...
       file='/home/raphy/Grasp/tflite_build/cpuinfo-download/cpuinfo-prefix/src/8a1772a0c5c447df2d18edf33ec4603a8c9c04a6.zip'
-- Downloading... done
-- extracting...
     src='/home/raphy/Grasp/tflite_build/cpuinfo-download/cpuinfo-prefix/src/8a1772a0c5c447df2d18edf33ec4603a8c9c04a6.zip'
     dst='/home/raphy/Grasp/tflite_build/cpuinfo-source'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 33%] No update step for 'cpuinfo'
[ 44%] No patch step for 'cpuinfo'
[ 55%] No configure step for 'cpuinfo'
[ 66%] No build step for 'cpuinfo'
[ 77%] No install step for 'cpuinfo'
[ 88%] No test step for 'cpuinfo'
[100%] Completed 'cpuinfo'
[100%] Built target cpuinfo
-- Downloading FXdiv to /home/raphy/Grasp/tflite_build/FXdiv-source (define FXDIV_SOURCE_DIR to avoid it)
CMake Deprecation Warning at CMakeLists.txt:9 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/raphy/Grasp/tflite_build/FXdiv-download
[ 11%] Creating directories for 'fxdiv'
[ 22%] Performing download step (download, verify and extract) for 'fxdiv'
-- Downloading...
   dst='/home/raphy/Grasp/tflite_build/FXdiv-download/fxdiv-prefix/src/b408327ac2a15ec3e43352421954f5b1967701d1.zip'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://github.com/Maratyszcza/FXdiv/archive/b408327ac2a15ec3e43352421954f5b1967701d1.zip'
-- [download 78% complete]
-- [download 100% complete]
-- verifying file...
       file='/home/raphy/Grasp/tflite_build/FXdiv-download/fxdiv-prefix/src/b408327ac2a15ec3e43352421954f5b1967701d1.zip'
-- Downloading... done
-- extracting...
     src='/home/raphy/Grasp/tflite_build/FXdiv-download/fxdiv-prefix/src/b408327ac2a15ec3e43352421954f5b1967701d1.zip'
     dst='/home/raphy/Grasp/tflite_build/FXdiv-source'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 33%] No update step for 'fxdiv'
[ 44%] No patch step for 'fxdiv'
[ 55%] No configure step for 'fxdiv'
[ 66%] No build step for 'fxdiv'
[ 77%] No install step for 'fxdiv'
[ 88%] No test step for 'fxdiv'
[100%] Completed 'fxdiv'
[100%] Built target fxdiv
-- Downloading pthreadpool to /home/raphy/Grasp/tflite_build/pthreadpool-source (define PTHREADPOOL_SOURCE_DIR to avoid it)
CMake Deprecation Warning at CMakeLists.txt:9 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/raphy/Grasp/tflite_build/pthreadpool-download
[ 11%] Creating directories for 'pthreadpool'
[ 22%] Performing download step (download, verify and extract) for 'pthreadpool'
-- Downloading...
   dst='/home/raphy/Grasp/tflite_build/pthreadpool-download/pthreadpool-prefix/src/4e80ca24521aa0fb3a746f9ea9c3eaa20e9afbb0.zip'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://github.com/google/pthreadpool/archive/4e80ca24521aa0fb3a746f9ea9c3eaa20e9afbb0.zip'
-- verifying file...
       file='/home/raphy/Grasp/tflite_build/pthreadpool-download/pthreadpool-prefix/src/4e80ca24521aa0fb3a746f9ea9c3eaa20e9afbb0.zip'
-- Downloading... done
-- extracting...
     src='/home/raphy/Grasp/tflite_build/pthreadpool-download/pthreadpool-prefix/src/4e80ca24521aa0fb3a746f9ea9c3eaa20e9afbb0.zip'
     dst='/home/raphy/Grasp/tflite_build/pthreadpool-source'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 33%] No update step for 'pthreadpool'
[ 44%] No patch step for 'pthreadpool'
[ 55%] No configure step for 'pthreadpool'
[ 66%] No build step for 'pthreadpool'
[ 77%] No install step for 'pthreadpool'
[ 88%] No test step for 'pthreadpool'
[100%] Completed 'pthreadpool'
[100%] Built target pthreadpool
-- Found Python: /home/raphy/miniconda3/bin/python3.12 (found version "3.12.8") found components: Interpreter
-- Generating microkernels.cmake
No microkernel found in src/reference/unary-elementwise.cc
No microkernel found in src/reference/binary-elementwise.cc
No microkernel found in src/reference/packing.cc
-- Using ccache: /usr/bin/ccache
--
-- 3.21.9.0
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT - Success
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
-- Configuring done (45.5s)
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-delegate" 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 (0.7s)
CMake Generate step failed.  Build files cannot be regenerated correctly.

Standalone code to reproduce the issue

(base) raphy@raohy:~/Grasp/tflite_build$ cmake ../../tensorflow_src/tensorflow/lite/ \
    > -DTFLITE_ENABLE_INSTALL=ON \
    > -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
    > -DSYSTEM_FARMHASH=ON \
    > -DSYSTEM_PTHREADPOOL=ON \
    > -DEigen3_DIR=/home/raphy/Grasp/eigen/share/eigen3/cmake \
    > -DFlatBuffers_DIR=/home/raphy/Grasp/flatbuffers/lib/cmake/flatbuffers \
    > -Dcpuinfo_DIR=/home/raphy/Grasp/cpuinfo/share/cpuinfo \
    > -Druy_DIR=/home/raphy/Grasp/ruy/lib/cmake/ruy \
    > -DNEON_2_SSE_DIR=/home/raphy/Grasp/NEON_2_SSE/lib/cmake/NEON_2_SSE \
    > -Dabsl_DIR=/home/raphy/Grasp/abseil-cpp/lib/cmake/absl \
    > -Dgemmlowp_DIR=/usr/lib/x86_64-linux-gnu/cmake/gemmlowp \
    > -Wno-dev

-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 14.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found farmhash: /usr/lib/x86_64-linux-gnu/libfarmhash.so

Relevant log output

Metadata

Metadata

Assignees

Labels

comp:liteTF Lite related issuesstaleThis label marks the issue/pr stale - to be closed automatically if no activitystat:awaiting responseStatus - Awaiting response from authorsubtype: ubuntu/linuxUbuntu/Linux Build/Installation Issuestype:build/installBuild and install issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions