Skip to content

TF Lite (CMake): neon2sse missing license file location #55741

@stewartmiles

Description

@stewartmiles
Click to expand!

Issue Type

Bug

Source

source

Tensorflow Version

2.9.0

Custom Code

No

OS Platform and Distribution

Linux

Mobile device

No response

Python version

3.8

Bazel version

N/A

GCC/Compiler version

N/A

CUDA/cuDNN version

N/A

GPU model and memory

N/A

Current Behaviour?

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake tracks licenses for each dependency of an imported module of TensorFlow Lite. This allows projects using TF Lite to build an aggregate license file for redistribution (e.g https://github.com/google-research/falken/blob/e15aea40aec08e1e5858905e7dd6de7da2e4a1ec/sdk/cpp/CMakeLists.txt#L196 )

https://github.com/tensorflow/tensorflow/commit/1485091a6a64989a01cd2db76d53fe71653ae666 caused a regression in TF Lite's CMake dependencies by manually specifying a download URL where the license URL can no longer be inferred by `OverridableFetchContent.cmake`.

I'm happy to provide a fix that:
* Specifies the license URL and downloaded location.
* Enables license file checking in the TF Lite CMake project.

Standalone code to reproduce the issue

Add `set(OVERRIDABLE_FETCH_CONTENT_LICENSE_CHECK ON)` near the top of `tensorflow/lite/CMakeLists.txt`, configure the project and wait for configuration to fail due to neon2sse missing a license.

Relevant log output

$ cd tensorflow/lite
$ mkdir build
$ cd build
$ cmake ..
# lots of output
- Could NOT find CLANG_FORMAT: Found unsuitable version "0.0", but required is exact version "9" (found CLANG_FORMAT_EXECUTABLE-NOTFOUND)
--
-- Configured Eigen 3.4.90
--
-- Performing Test FARMHASH_HAS_BUILTIN_EXPECT
-- Performing Test FARMHASH_HAS_BUILTIN_EXPECT - Success
-- Looking for strtof_l
-- Looking for strtof_l - found
-- Looking for strtoull_l
-- Looking for strtoull_l - found
CMake Error at tools/cmake/modules/OverridableFetchContent.cmake:571 (message):
  Required license URL not found for neon2sse
Call Stack (most recent call first):
  tools/cmake/modules/neon2sse.cmake:37 (OverridableFetchContent_Populate)
  tools/cmake/modules/Findneon2sse.cmake:18 (include)
  CMakeLists.txt:148 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/stewart/src/tensorflow/tensorflow/lite/build/CMakeFiles/CMakeOutput.log".
See also "/home/stewart/src/tensorflow/tensorflow/lite/build/CMakeFiles/CMakeError.log".

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions