-2.3 C
New York
Sunday, January 5, 2025

ios – TensorFlow error: defining a kind inside ‘offsetof’ is a Clang extension [-Werror,-Wgnu-offsetof-extensions]


I am new to this.

Making an attempt to construct the Selective Framework for iOS utilizing the under command –

bash tensorflow/lite/ios/build_frameworks.sh
--input_models=model1.tflite,model2.tflite
--target_archs=x86_64,armv7,arm64

However getting the error –

ERROR: /non-public/var/tmp/_bazel_tonmoy/d1033cf820cfe9e8569d67cf059cb6df/exterior/upb/BUILD:57:11: Compiling upb/upb.c [for tool] failed: (Exit 1): wrapped_clang failed: error executing command (from goal @upb//:upb) exterior/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 -DNDEBUG '-DNS_BLOCK_ASSERTIONS=1' ... (remaining 32 arguments skipped)

exterior/upb/upb/upb.c:192:10: error: defining a kind inside 'offsetof' is a Clang 
extension [-Werror,-Wgnu-offsetof-extensions]

192 | n &= ~(upb_alignof(upb_arena) - 1);

  |          ^~~~~~~~~~~~~~~~~~~~~~
exterior/upb/upb/upb.c:183:37: be aware: expanded from macro 'upb_alignof'

183 | #outline upb_alignof(kind) offsetof (struct { char c; kind member; }, member)

  |                                     ^~~~~~
/Purposes/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/embrace/__stddef_offsetof.h:16:43: be aware: expanded from macro 'offsetof'

16 | #outline offsetof(t, d) __builtin_offsetof(t, d)

  |                                           ^
1 error generated.

Error in little one course of '/usr/bin/xcrun'. 1

Goal //tensorflow/lite/ios/tmp:TensorFlowLiteSelectTfOps_framework did not construct

Use --verbose_failures to see the command traces of failed construct steps.

INFO: Elapsed time: 218.346s, Crucial Path: 17.92s

INFO: 4162 processes: 747 inside, 3415 native.

FAILED: Construct did NOT full efficiently

Tips on how to repair this difficulty, Im very newbie to this difficulty. What may very well be the rationale.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles