[Bug] `libtensorflow` does not include `tensor.h` (has just 2 files under `tensorflow/core/`)
Author: SwuduSusuwuCreated May 13, 2025Updated Sep 17, 2026
Labelsstat:awaiting responsetype:bugstalecomp:coreTF 2.11
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
No
Source
binary
TensorFlow version
tf 2.11
Custom code
No
OS platform and distribution
GitHub Workflow on Ubuntu
Mobile device
GitHub Workflow
Python version
Not applicable (C++ TensorFlow)
Bazel version
Not applicable
GCC/compiler version
Not applicable
CUDA/cuDNN version
Not applicable
GPU model and memory
Not applicable
Current behavior?
https://github.com/SwuduSusuwu/SusuLib/actions/runs/14992373759/job/42118538367#step:5:130
[2025-05-13 08:53:50] [build-stdout] ./cxx/ClassTensorFlowCns.hxx:16:10: fatal error: 'tensorflow/core/framework/tensor.h' file not found
Standalone code to reproduce the issue
Issue is on version libtensorflow-*-2.11.0 (libtensorflow-*-2.16.0 is not available to download)
~ $ wget -q https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.11.0.tar.gz
~ $ tar --list -f libtensorflow-cpu-linux-x86_64-2.11.0.tar.gz | grep "tensorflow/core"
include/tensorflow/core/
include/tensorflow/core/platform/
include/tensorflow/core/platform/ctstring.h
include/tensorflow/core/platform/ctstring_internal.h
~ $ tar --list -f libtensorflow-cpu-linux-x86_64-2.11.0.tar.gz | grep "tensor.h"
include/tensorflow/c/tf_tensor.h
~ $ wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.16.0.tar.gz
--2025-05-13 01:56:01-- https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.16.0.tar.gz
Resolving storage.googleapis.com (storage.googleapis.com)... 2607:f8b0:4007:809::201b, 2607:f8b0:4007:817::201b, 2607:f8b0:4007:818::201b, ...
Connecting to storage.googleapis.com (storage.googleapis.com)|2607:f8b0:4007:809::201b|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-05-13 01:56:02 ERROR 404: Not Found.
libtensorflow-*-2.16.1 was also 404 Not Found.
Relevant log output
All relevant GitHub Autobuild output from https://github.com/SwuduSusuwu/SusuLib/blob/57c936847e8c7f739b92cfe972562afef5381bc6/build.sh#L32-L95:
[2025-05-13 15:59:09] [build-stdout] [Notice: `./build.sh` was executed through one of GitHub's Workflows, will auto-install `libeigen3-dev` and `libtensorflow`.]
[2025-05-13 15:59:09] [build-stdout] WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
[2025-05-13 15:59:09] [build-stdout] Reading package lists...
[2025-05-13 15:59:09] [build-stdout] Building dependency tree...
[2025-05-13 15:59:09] [build-stdout] Reading state information...
[2025-05-13 15:59:09] [build-stdout] Suggested packages:
[2025-05-13 15:59:09] [build-stdout] libeigen3-doc libmpfrc++-dev
[2025-05-13 15:59:09] [build-stdout] The following NEW packages will be installed:
[2025-05-13 15:59:09] [build-stdout] libeigen3-dev
[2025-05-13 15:59:09] [build-stdout] 0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
[2025-05-13 15:59:09] [build-stdout] Need to get 1056 kB of archives.
[2025-05-13 15:59:09] [build-stdout] After this operation, 9081 kB of additional disk space will be used.
[2025-05-13 15:59:09] [build-stdout] Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
[2025-05-13 15:59:09] [build-stdout] Get:2 http://azure.archive.ubuntu.com/ubuntu jammy/universe amd64 libeigen3-dev all 3.4.0-2ubuntu2 [1056 kB]
[2025-05-13 15:59:10] [build-stdout] Fetched 1056 kB in 0s (14.5 MB/s)
[2025-05-13 15:59:10] [build-stdout] Selecting previously unselected package libeigen3-dev.
[2025-05-13 15:59:16] [build-stdout] (Reading database ... 272241 files and directories currently installed.)
[2025-05-13 15:59:16] [build-stdout] Preparing to unpack .../libeigen3-dev_3.4.0-2ubuntu2_all.deb ...
[2025-05-13 15:59:16] [build-stdout] Unpacking libeigen3-dev (3.4.0-2ubuntu2) ...
[2025-05-13 15:59:16] [build-stdout] Setting up libeigen3-dev (3.4.0-2ubuntu2) ...
[2025-05-13 15:59:17] [build-stdout] NEEDRESTART-VER: 3.5
[2025-05-13 15:59:18] [build-stdout] NEEDRESTART-KCUR: 6.8.0-1027-azure
[2025-05-13 15:59:18] [build-stdout] NEEDRESTART-KEXP: 6.8.0-1027-azure
[2025-05-13 15:59:18] [build-stdout] NEEDRESTART-KSTA: 1
[2025-05-13 15:59:19] [build-stdout] WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
[2025-05-13 15:59:19] [build-stdout] Reading package lists...
[2025-05-13 15:59:20] [build-stdout] Building dependency tree...
[2025-05-13 15:59:20] [build-stdout] Reading state information...
[2025-05-13 15:59:20] [build-stdout] E: Unable to locate package libtensorflow
[2025-05-13 15:59:20] [build-stdout] 2025-05-13 15:59:20 URL:https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.11.0.tar.gz [121659491/121659491] -> "libtensorflow-cpu-linux-x86_64-2.11.0.tar.gz" [1]
[2025-05-13 15:59:23] [build-stdout] .
[2025-05-13 15:59:23] [build-stdout] ..
[2025-05-13 15:59:23] [build-stdout] tensorflow
[2025-05-13 15:59:23] [build-stdout] .
[2025-05-13 15:59:23] [build-stdout] ..
[2025-05-13 15:59:23] [build-stdout] c
[2025-05-13 15:59:23] [build-stdout] core
[2025-05-13 15:59:23] [build-stdout] tsl
[2025-05-13 15:59:23] [build-stdout] .
[2025-05-13 15:59:23] [build-stdout] ..
[2025-05-13 15:59:23] [build-stdout] platform
[2025-05-13 15:59:23] [build-stdout] ls: cannot access 'include/tensorflow/third-party': No such file or directory
[2025-05-13 15:59:23] [build-stdout] Cloning into 'xla'...
[2025-05-13 15:59:24] [build-stdout] [Notice: SUSUWU_DEPENDENCY_INCLUDE(): Found package `libtensorflow`, FLAGS_USER will use `-F./include/`.]
[2025-05-13 15:59:24] [build-stdout] find: ‘./tensorflow/’: No such file or directory
[2025-05-13 15:59:24] [build-stdout] [Notice: SUSUWU_DEPENDENCY_INCLUDE(): Found package `xla`, FLAGS_USER will use `-F./xla/`.]
[2025-05-13 15:59:24] [build-stdout] [Notice: SUSUWU_DEPENDENCY_INCLUDE(): Found package `tsl`, FLAGS_USER will use `-F./xla/third_party/tsl/`.]
[2025-05-13 15:59:24] [build-stdout] [Notice: SUSUWU_DEPENDENCY_INCLUDE(): Found package `ml_dtypes`, FLAGS_USER will use `-F./xla/third_party/py/`.]
[2025-05-13 15:59:24] [build-stdout] [Notice: SUSUWU_DEPENDENCY_INCLUDE(): Found package `eigen`, FLAGS_USER will use `-F/usr/include/eigen3`.]
[2025-05-13 15:59:24] [build-stdout] [Warning: SUSUWU_PRODUCTION_USE(): `git branch` is "HEAD"; for production use, use `git switch trunk`.]
[2025-05-13 15:59:24] [build-stdout] [Notice: SUSUWU_PROCESS_RELEASE_DEBUG(): `./build.sh ` defaults to `./build.sh --debug`.]
[2025-05-13 15:59:24] [build-stdout] [Notice: SUSUWU_PROCESS_RELEASE_DEBUG(): `./build.sh --debug` is slow (use `./build.sh --release` to improve how fast `./${BINDIR}/${OUTPUT}` executes).]
[2025-05-13 15:59:24] [build-stdout] [Notice: SUSUWU_SETUP_OBJDIR(): To redirect `clang++ -c ... -o "${OBJDIR}${OBJ}.o"` (which has `OBJDIR="./obj/"`), use `OBJDIR="<new-path>"` (where "<new-path>" is a directory which you choose).]
[2025-05-13 15:59:24] [build-stdout] [Notice: SUSUWU_SETUP_BINDIR(): To redirect `clang++ ... -o "${BINDIR}${OUTPUT}"` (which has `BINDIR="./bin/"`), use `BINDIR="<new-path>"` (where "<new-path>" is a directory which you choose).]
[2025-05-13 15:59:53] [build-stdout] ./cxx/ClassTensorFlowCns.hxx:16:10: fatal error: 'tensorflow/core/framework/tensor.h' file not found
[2025-05-13 15:59:53] [build-stdout] #include <tensorflow/core/framework/tensor.h> /* tensorflow::Tensor tensorflow::TensorShape */
[2025-05-13 15:59:53] [build-stdout] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2025-05-13 15:59:53] [build-stdout] 1 error generated.
[2025-05-13 15:59:57] [build-stdout] [Notice: `clang++ -g -Og -fno-omit-frame-pointer -std=c++11 -fsanitize=address -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment -DSUSUWU_EXPERIMENTAL -DSUSUWU_DEFAULT_BRANCH="trunk" -I./include/ -I./xla/ -I./xla/third_party/tsl/ -I./xla/third_party/py/ -I/usr/include/eigen3 -Wall -Wno-unused-function -Wno-unused-function -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers -Wpedantic ./cxx/ClassTensorFlowCns.hxx` failed, will not enable `CXXFLAGS="${CXXFLAGS} -std=c++17 -DUSE_TENSORFLOW_CNS"` (skipped). If `libtensorflow` is installed, insert `-std=c++17 -DUSE_TENSORFLOW_CNS` into `./build.sh:FLAGS_USER`. To troubleshoot, use `cd ./include/ && ./configure`]
Source: tensorflow/tensorflow