I ran my ./configure
You have bazel 4.2.1- (@non-git) installed.
Please specify the location of python. [Default is /usr/bin/python3]:
Found possible Python library paths:
/usr/lib/python3/dist-packages
/usr/local/lib/python3.7/dist-packages
Please input the desired Python library path to use. Default is [/usr/lib/python3/dist-packages]
Do you wish to build TensorFlow with ROCm support? [y/N]: N
No ROCm support will be enabled for TensorFlow.
Do you wish to build TensorFlow with CUDA support? [y/N]: N
No CUDA support will be enabled for TensorFlow.
Do you wish to download a fresh release of clang? (Experimental) [y/N]: N
Clang will not be downloaded.
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]:
Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: N
Not configuring the WORKSPACE for Android builds.
Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
--config=mkl # Build with MKL support.
--config=mkl_aarch64 # Build with oneDNN and Compute Library for the Arm Architecture (ACL).
--config=monolithic # Config for mostly static monolithic build.
--config=numa # Build with NUMA support.
--config=dynamic_kernels # (Experimental) Build kernels into separate shared objects.
--config=v1 # Build with TensorFlow 1 API instead of TF 2 API.
Preconfigured Bazel build configs to DISABLE default on features:
--config=nogcp # Disable GCP support.
--config=nonccl # Disable NVIDIA NCCL support.
Configuration finished
But when I run:
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package --jobs 4
I got these errors
ERROR: /home/pi/tensorflow/tensorflow/compiler/xla/service/llvm_ir/BUILD:64:11: Compiling tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc 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 173 argument(s) skipped) In file included from external/com_google_absl/absl/base/internal/endian.h:29, from external/com_google_absl/absl/strings/cord.h:73, from ./tensorflow/core/platform/default/cord.h:22, from ./tensorflow/core/platform/cord.h:25, from ./tensorflow/core/platform/tstring.h:24, from ./tensorflow/core/platform/types.h:23, from ./tensorflow/core/platform/logging.h:20, from ./tensorflow/core/platform/status.h:27, from ./tensorflow/core/lib/core/status.h:19, from ./tensorflow/compiler/xla/status.h:19, from ./tensorflow/compiler/xla/array.h:33, from ./tensorflow/compiler/xla/array2d.h:29, from ./tensorflow/compiler/xla/literal.h:32, from ./tensorflow/compiler/xla/service/llvm_ir/llvm_util.h:34, from tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc:16: external/com_google_absl/absl/base/casts.h: In instantiation of 'Dest absl::lts_20210324::bit_cast(const Source&) [with Dest = long long int; Source = void (*)(const char*, long long int); typename std::enable_if<(! absl::lts_20210324::internal_casts::is_bitcastable<Dest, Source>::value), int>::type <anonymous> = 0]': tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc:385:78: required from here external/com_google_absl/absl/base/casts.h:176:30: error: static assertion failed: Source and destination types should have equal sizes. static_assert(sizeof(Dest) == sizeof(Source), ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ external/com_google_absl/absl/base/casts.h: In instantiation of 'Dest absl::lts_20210324::bit_cast(const Source&) [with Dest = long long int; Source = const char*; typename std::enable_if<(! absl::lts_20210324::internal_casts::is_bitcastable<Dest, Source>::value), int>::type <anonymous> = 0]': tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc:387:57: required from here external/com_google_absl/absl/base/casts.h:176:30: error: static assertion failed: Source and destination types should have equal sizes. Target //tensorflow/tools/pip_package:build_pip_package failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 22466.499s, Critical Path: 630.59s INFO: 5274 processes: 786 internal, 4488 local. FAILED: Build did NOT complete successfully
I searched a lot and I didn't find anything related to this. Could you help me?
My configurations:
gcc 8.3.0
bazel 4.2.1
python 3.7.3