Skip to content
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

Bazel build failed when Building an optimized serving binary #2259

Closed
fishfl opened this issue Oct 10, 2024 · 4 comments
Closed

Bazel build failed when Building an optimized serving binary #2259

fishfl opened this issue Oct 10, 2024 · 4 comments
Assignees
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response type:support

Comments

@fishfl
Copy link

fishfl commented Oct 10, 2024

We are following the document to build an optimized tf-serving docker image.

Following the Dockerfile.devel and at the step of:
bazel build --color=yes --curses=yes --verbose_failures --output_filter=DONT_MATCH_ANYTHING --config=release tensorflow_serving/model_servers:tensorflow_model_server

there is an error occurs:
'''
ERROR: /root/.cache/bazel/bazel_root/e53bbb0b0da4e26d24b415310219b953/external/llvm-project/llvm/BUILD.bazel:251:11: Compiling llvm/lib/Support/BLAKE3/blake3.c failed: (Exit 1): gcc-10 failed: error executing command (from target @llvm-project//llvm:Support)
(cd /root/.cache/bazel/bazel_root/e53bbb0b0da4e26d24b415310219b953/execroot/tf_serving &&
exec env -
CC=/usr/bin/gcc-10
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/proc/self/cwd
/usr/bin/gcc-10 -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/k8-opt/bin/external/llvm-project/llvm/objs/Support/blake3.pic.d '-frandom-seed=bazel-out/k8-opt/bin/external/llvm-project/llvm/objs/Support/blake3.pic.o' -fPIC '-DLLVM_ON_UNIX=1' '-DHAVE_BACKTRACE=1' '-DBACKTRACE_HEADER=<execinfo.h>' '-DLTDL_SHLIB_EXT=".so"' '-DLLVM_PLUGIN_EXT=".so"' '-DLLVM_ENABLE_THREADS=1' '-DHAVE_DEREGISTER_FRAME=1' '-DHAVE_LIBPTHREAD=1' '-DHAVE_PTHREAD_GETNAME_NP=1' '-DHAVE_PTHREAD_H=1' '-DHAVE_PTHREAD_SETNAME_NP=1' '-DHAVE_REGISTER_FRAME=1' '-DHAVE_SETENV_R=1' '-DHAVE_STRERROR_R=1' '-DHAVE_SYSEXITS_H=1' '-DHAVE_UNISTD_H=1' -D_GNU_SOURCE '-DHAVE_MALLINFO=1' '-DHAVE_SBRK=1' '-DHAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=1' -DHAVE_BUILTIN_THREAD_POINTER '-DLLVM_NATIVE_ARCH="X86"' '-DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser' '-DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter' '-DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler' '-DLLVM_NATIVE_TARGET=LLVMInitializeX86Target' '-DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo' '-DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC' '-DLLVM_NATIVE_TARGETMCA=LLVMInitializeX86TargetMCA' '-DLLVM_HOST_TRIPLE="x86_64-unknown-linux-gnu"' '-DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-unknown-linux-gnu"' '-DLLVM_VERSION_MAJOR=20' '-DLLVM_VERSION_MINOR=0' '-DLLVM_VERSION_PATCH=0' '-DLLVM_VERSION_STRING="20.0.0git"' -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS '-DLLVM_HAS_AArch64_TARGET=1' '-DLLVM_HAS_AMDGPU_TARGET=1' '-DLLVM_HAS_ARM_TARGET=1' '-DLLVM_HAS_NVPTX_TARGET=1' '-DLLVM_HAS_PowerPC_TARGET=1' '-DLLVM_HAS_RISCV_TARGET=1' '-DLLVM_HAS_SystemZ_TARGET=1' '-DLLVM_HAS_X86_TARGET=1' '-DBLAKE3_USE_NEON=0' -DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512 -DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 '-DBAZEL_CURRENT_REPOSITORY="llvm-project"' -iquote external/llvm-project -iquote bazel-out/k8-opt/bin/external/llvm-project -isystem external/llvm-project/llvm/include -isystem bazel-out/k8-opt/bin/external/llvm-project/llvm/include -Wno-macro-redefined -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-but-set-variable -mavx -msse4.2 -w -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP
="redacted"' '-D__TIME__="redacted"' -c external/llvm-project/llvm/lib/Support/BLAKE3/blake3.c -o bazel-out/k8-opt/bin/external/llvm-project/llvm/_objs/Support/blake3.pic.o)

Configuration: 40a136273ac932f455a47c0b666c3c9a76c2cae460a70bb86120df95ce4da60c

Execution platform: @local_execution_config_platform//:platform

gcc-10: error: unrecognized command-line option '-Wthread-safety'
gcc-10: error: unrecognized command-line option '-Wself-assign'
gcc-10: error: unrecognized command-line option '-fcolor-diagnostics'
'''

It seems that the gcc-10 not recognized the options?
how to fix that? thanks!

@janasangeetha
Copy link

Hi @fishfl
Thank you for reporting. Please let us know the document you are following. Also, request you to share the steps to reproduce the issue.
Thank you!

Copy link

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Dec 10, 2024
Copy link

This issue was closed due to lack of activity after being marked stale for past 7 days.

Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response type:support
Projects
None yet
Development

No branches or pull requests

2 participants