New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tflite-runtime-nightly
on ARM64 has minimum GLIBC requirement 2.33, which prevents installation in official python
container images
#59631
Comments
tflite-runtime-nightly
on ARM64 has minimum GLIBC 2.33, which prevents installation in offiicial python
container imagestflite-runtime-nightly
on ARM64 has minimum GLIBC 2.33, which prevents installation in official python
container images
Interesting that we'd get 2.33 when Ubuntu 20.04 build images should be 2.31 |
tflite-runtime-nightly
on ARM64 has minimum GLIBC 2.33, which prevents installation in official python
container imagestflite-runtime-nightly
on ARM64 has minimum GLIBC requirement 2.33, which prevents installation in official python
container images
ldd -v output from the arm64 build:
This does not happen in the x86_64 build:
|
objdump -T output of failing symbols on arm64
On x86_64:
|
Similar issue on armv7 builds:
Exact same symbols on arm64 build are the ones failing on armv7 |
Could you confirm if this only happens in |
Doesn't seem to happen on upstream
I just checked python 3.9 version of tflite-runtime-nightly and it happens on arm64/armv7 builds as well. It started happening on Judging from the time frame, it was after |
Right, recently ARM toolchain was updated. #57585 |
@terryheo Ah I see. I thought we'd be using the toolchains from https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/tools/cmake/download_toolchains.sh, but I guess that's only for the cmake build? download_toolchains.sh could be updated to 9.2.1 if we want to bump it a little to keep glibc versions happy (e.g.):
Although not sure if Full file below for posterity in case that also needs to happen... toolchains.diff #!/bin/bash
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR/../../../.."
TOOLCHAINS_DIR=$(realpath tensorflow/lite/tools/cmake/toolchains)
mkdir -p ${TOOLCHAINS_DIR}
case $1 in
armhf)
- if [[ ! -d "${TOOLCHAINS_DIR}/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf" ]]; then
- curl -LO https://storage.googleapis.com/mirror.tensorflow.org/developer.arm.com/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz >&2
- tar xvf gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz -C ${TOOLCHAINS_DIR} >&2
+ if [[ ! -d "${TOOLCHAINS_DIR}/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf" ]]; then
+ curl -LO https://storage.googleapis.com/mirror.tensorflow.org/developer.arm.com/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz >&2
+ tar xvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -C ${TOOLCHAINS_DIR} >&2
fi
- ARMCC_ROOT=${TOOLCHAINS_DIR}/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf
+ ARMCC_ROOT=${TOOLCHAINS_DIR}/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
echo "ARMCC_FLAGS=\"-march=armv7-a -mfpu=neon-vfpv4 -funsafe-math-optimizations \
- -isystem ${ARMCC_ROOT}/lib/gcc/arm-linux-gnueabihf/8.3.0/include \
- -isystem ${ARMCC_ROOT}/lib/gcc/arm-linux-gnueabihf/8.3.0/include-fixed \
- -isystem ${ARMCC_ROOT}/arm-linux-gnueabihf/include/c++/8.3.0 \
- -isystem ${ARMCC_ROOT}/arm-linux-gnueabihf/libc/usr/include \
+ -isystem ${ARMCC_ROOT}/lib/gcc/arm-none-linux-gnueabihf/9.2.1/include \
+ -isystem ${ARMCC_ROOT}/lib/gcc/arm-none-linux-gnueabihf/9.2.1/include-fixed \
+ -isystem ${ARMCC_ROOT}/arm-none-linux-gnueabihf/include/c++/9.2.1 \
+ -isystem ${ARMCC_ROOT}/arm-none-linux-gnueabihf/libc/usr/include \
-isystem \"\${CROSSTOOL_PYTHON_INCLUDE_PATH}\" \
-isystem /usr/include\""
- echo "ARMCC_PREFIX=${ARMCC_ROOT}/bin/arm-linux-gnueabihf-"
+ echo "ARMCC_PREFIX=${ARMCC_ROOT}/bin/arm-none-linux-gnueabihf-"
;;
aarch64)
- if [[ ! -d "${TOOLCHAINS_DIR}/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu" ]]; then
- curl -LO https://storage.googleapis.com/mirror.tensorflow.org/developer.arm.com/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz >&2
- tar xvf gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz -C ${TOOLCHAINS_DIR} >&2
+ if [[ ! -d "${TOOLCHAINS_DIR}/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu" ]]; then
+ curl -LO https://storage.googleapis.com/mirror.tensorflow.org/developer.arm.com/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz >&2
+ tar xvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -C ${TOOLCHAINS_DIR} >&2
fi
- ARMCC_ROOT=${TOOLCHAINS_DIR}/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu
+ ARMCC_ROOT=${TOOLCHAINS_DIR}/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
echo "ARMCC_FLAGS=\"-funsafe-math-optimizations \
- -isystem ${ARMCC_ROOT}/lib/gcc/aarch64-linux-gnu/8.3.0/include \
- -isystem ${ARMCC_ROOT}/lib/gcc/aaarch64-linux-gnu/8.3.0/include-fixed \
- -isystem ${ARMCC_ROOT}/aarch64-linux-gnu/include/c++/8.3.0 \
- -isystem ${ARMCC_ROOT}/aarch64-linux-gnu/libc/usr/include \
+ -isystem ${ARMCC_ROOT}/lib/gcc/aarch64-none-linux-gnu/9.2.1/include \
+ -isystem ${ARMCC_ROOT}/lib/gcc/aarch64-none-linux-gnu/9.2.1/include-fixed \
+ -isystem ${ARMCC_ROOT}/aarch64-none-linux-gnu/include/c++/9.2.1 \
+ -isystem ${ARMCC_ROOT}/aarch64-none-linux-gnu/libc/usr/include \
-isystem \"\${CROSSTOOL_PYTHON_INCLUDE_PATH}\" \
-isystem /usr/include\""
- echo "ARMCC_PREFIX=${ARMCC_ROOT}/bin/aarch64-linux-gnu-"
+ echo "ARMCC_PREFIX=${ARMCC_ROOT}/bin/aarch64-none-linux-gnu-"
;;
rpi0)
- if [[ ! -d "${TOOLCHAINS_DIR}/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf" ]]; then
- curl -LO https://storage.googleapis.com/mirror.tensorflow.org/developer.arm.com/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz >&2
- tar xvf gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz -C ${TOOLCHAINS_DIR} >&2
+ if [[ ! -d "${TOOLCHAINS_DIR}/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf" ]]; then
+ curl -LO https://storage.googleapis.com/mirror.tensorflow.org/developer.arm.com/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz >&2
+ tar xvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -C ${TOOLCHAINS_DIR} >&2
fi
- ARMCC_ROOT=${TOOLCHAINS_DIR}/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf
+ ARMCC_ROOT=${TOOLCHAINS_DIR}/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
echo "ARMCC_FLAGS=\"-march=armv6 -mfpu=vfp -mfloat-abi=hard -funsafe-math-optimizations \
- -isystem ${ARMCC_ROOT}/lib/gcc/arm-linux-gnueabihf/8.3.0/include \
- -isystem ${ARMCC_ROOT}/lib/gcc/arm-linux-gnueabihf/8.3.0/include-fixed \
- -isystem ${ARMCC_ROOT}/arm-linux-gnueabihf/include/c++/8.3.0 \
- -isystem ${ARMCC_ROOT}/arm-linux-gnueabihf/libc/usr/include \
+ -isystem ${ARMCC_ROOT}/lib/gcc/arm-none-linux-gnueabihf/9.2.1/include \
+ -isystem ${ARMCC_ROOT}/lib/gcc/arm-none-linux-gnueabihf/9.2.1/include-fixed \
+ -isystem ${ARMCC_ROOT}/arm-none-linux-gnueabihf/include/c++/9.2.1 \
+ -isystem ${ARMCC_ROOT}/arm-none-linux-gnueabihf/libc/usr/include \
-isystem \"\${CROSSTOOL_PYTHON_INCLUDE_PATH}\" \
-isystem /usr/include\""
- echo "ARMCC_PREFIX=${ARMCC_ROOT}/bin/arm-linux-gnueabihf-"
+ echo "ARMCC_PREFIX=${ARMCC_ROOT}/bin/arm-none-linux-gnueabihf-"
;;
*)
echo "Usage: download_toolchains.sh [armhf|aarch64|rpi0]" >&2
exit
;;
esac
echo "download_toolchains.sh completed successfully." >&2 |
I've updated internal build script to use CMake to build Python wheels. Regarding the |
#59631 PiperOrigin-RevId: 509334090
Will test the new |
It now seems that the x86 wheels are broken. To reproduce, use the following FROM python:3.10-slim-bullseye
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PIP_NO_CACHE_DIR 1
RUN pip install "tflite-runtime-nightly==2.13.0.dev20230214"
RUN python -c "import tflite_runtime.interpreter as tflite" Trying to build this container image:
We haven't tested ARM yet. |
Seems to happen on ARM builds as well |
Oops. Let me take a look. |
@samypr100 @terryheo Wanted to report that |
Somewhat related to this issue: Are there any plans of releasing Related to ARM-software/Tool-Solutions#169 (comment) |
They already exist. Linux
MacOS
|
Whops sorry, I meant |
To fix undefined symbol: _ZN6tflite9telemetry20TelemetryReportEventEP13TfLiteContextPKc12TfLiteStatus This PR resolves #59631 PiperOrigin-RevId: 510050310
System information
provided in TensorFlow): No
python:3.10-slim-bullseye
container image on ARM64happens on a mobile device: N/A
tflite-runtime-nightly
2.13.0.dev20230207
Describe the problem
python:3.10-slim-bullseye
containertflite-runtime-nightly
2.13.0.dev20230207
There are not yet any Debian bookworm-based
python
official images yet, so it's not possible to bump up to a newer Debian version with a newer GLIBC.Other background
This worked fine in a
python:3.10-slim-bullseye
x86 container, so perhaps the GLIBC version requirements are different due to how the ARM64 wheels were built?Here are the GLIBC versions of various Linux platforms:
Related to:
CC @samypr100 @terryheo
The text was updated successfully, but these errors were encountered: