Skip to content

TFLM CI is currently broken #46415

@advaitjain

Description

@advaitjain

@tensorflow/micro

02e9e26 added a compiler flag that breaks the TFLM bazel build with the following error:

ERROR: /tmpfs/src/github/tensorflow/tensorflow/lite/kernels/internal/BUILD:685:11: C++ compilation of rule '//tensorflow/lite/kernels/internal:portable_tensor_utils' failed (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 35 argument(s) skipped)
gcc: error: unrecognized argument to -fsanitize= option: 'shift-base'

The underlying issue seems to be that the gcc version on the TFLM docker image (gcc (Debian 8.3.0-6) 8.3.0) does not support this argument.

Depending on your local gcc version, this may or may not be reproducible locally.

For example, for me: gcc (Debian 10.2.0-19) 10.2.0

bazel clean
bazel build -s tensorflow/lite/c:common

has the shift-base argument:

/usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/k8-opt/bin/tensorflow/lite/c/_objs/common/common.d '-frandom-seed=bazel-out/k8-opt/bin/tensorflow/lite/c/_objs/common/common.o' -iquote . -iquote bazel-out/k8-opt/bin -w -DAUTOLOAD_DYNAMIC_KERNELS -DFARMHASH_NO_CXX_STRING -Wno-sign-compare -O3 -fno-exceptions '-fno-sanitize=shift-base' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tensorflow/lite/c/common.c -o bazel-out/k8-opt/bin/tensorflow/lite/c/_objs/common/common.o)

but the build passes.

Metadata

Metadata

Assignees

Labels

comp:microRelated to TensorFlow Lite Microcontrollerstype: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