Open hasankhurshid29 opened 2 years ago
yes, i am also facing issue building it in latest raspberry pi 4 64 bit hardware:
1) error unrecognized option in the "sudo make requirement": update-java-alternatives -s java-1.11.0-openjdk-armhf 2) building bazel fails with error: .ERROR: Unrecognized option: --tool_java_runtime_version=local_jdk
I changed the bazel argument to "--tool_java_runtime_version=11" as said in the bazel documentation. But it gives this error during compilation.
ERROR: /tmp/bazel_MDHIXcRN/out/external/com_github_grpc_grpc/BUILD:1640:16: Compiling src/core/ext/filters/client_channel/dynamic_filters.cc failed: (Exit 1): gcc failed: error executing command (cd /tmp/bazel_MDHIXcRN/out/execroot/io_bazel && \ exec env - \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games \ PWD=/proc/self/cwd \ /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 '-std=c++0x' -MD -MF bazel-out/aarch64-opt/bin/external/com_github_grpc_grpc/_objs/grpc_client_channel/dynamic_filters.d '-frandom-seed=bazel-out/aarch64-opt/bin/external/com_github_grpc_grpc/_objs/grpc_client_channel/dynamic_filters.o' -iquote external/com_github_grpc_grpc -iquote bazel-out/aarch64-opt/bin/external/com_github_grpc_grpc -iquote external/upb -iquote bazel-out/aarch64-opt/bin/external/upb -iquote external/com_google_protobuf -iquote bazel-out/aarch64-opt/bin/external/com_google_protobuf -iquote external/com_google_absl -iquote bazel-out/aarch64-opt/bin/external/com_google_absl -iquote . -iquote bazel-out/aarch64-opt/bin -isystem external/com_github_grpc_grpc/include -isystem bazel-out/aarch64-opt/bin/external/com_github_grpc_grpc/include -isystem external/com_github_grpc_grpc/src/core/ext/upb-generated -isystem bazel-out/aarch64-opt/bin/external/com_github_grpc_grpc/src/core/ext/upb-generated -isystem external/com_github_grpc_grpc/src/core/ext/upbdefs-generated -isystem bazel-out/aarch64-opt/bin/external/com_github_grpc_grpc/src/core/ext/upbdefs-generated -isystem third_party/zlib -isystem bazel-out/aarch64-opt/bin/third_party/zlib -fno-canonical-system-headers -Wno-builtin-macro-redefined '-DDATE="redacted"' '-DTIMESTAMP="redacted"' '-DTIME="redacted"' -c external/com_github_grpc_grpc/src/core/ext/filters/client_channel/dynamic_filters.cc -o bazel-out/aarch64-opt/bin/external/com_github_grpc_grpc/_objs/grpc_client_channel/dynamic_filters.o)
Configuration: af1cd4a9f0085ebdd0ae9abd7d82eed3debb639d8433192fa63299fdfa011f37
Execution platform: //:default_host_platform
In file included from /usr/include/c++/10/bits/move.h:57, from /usr/include/c++/10/bits/stl_pair.h:59, from /usr/include/c++/10/bits/stl_algobase.h:64, from /usr/include/c++/10/vector:60, from external/com_github_grpc_grpc/src/core/ext/filters/client_channel/dynamic_filters.h:22, from external/com_github_grpc_grpc/src/core/ext/filters/client_channel/dynamic_filters.cc:19: /usr/include/c++/10/type_traits: In substitution of 'template<class ... _Cond> using _Require = std::enable_if_t<std::and_<
>::value> [with _Cond = {std::or_<std::chrono::treat_as_floating_point , std:: and_<std::integral_constant<bool, (typename std::ratio_divide<_Period2, std::ratio<60, 1> >::type::den == 1)>, std::not_<std::chrono::treat_as_floating_point<_Rep> > > >}]': /usr/include/c++/10/chrono:429:14: required from 'struct std::chrono::duration<long int, std::ratio<60> >' external/com_google_absl/absl/time/time.h:1434:30: required from 'constexpr absl::lts_20210324::Duration absl::lts_20210324::time_internal::FromChrono(const std::chrono::duration<_Rep1, _Period1>&) [with Rep = long int; Period = std::ratio<60>]' external/com_google_absl/absl/time/time.h:1556:37: required from here /usr/include/c++/10/type_traits:2195:11: internal compiler error: Segmentation fault 2195 | using _Require = enable_if_t<and_<_Cond...>::value>; | ^~~~ 0x7f98db595c ??? ../sysdeps/aarch64/strcmp.S:65 0x7f98d59217 __libc_start_main ../csu/libc-start.c:308 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See file:///usr/share/doc/gcc-10/README.Bugs for instructions. Target //src:bazel_nojdk failed to build INFO: Elapsed time: 2322.478s, Critical Path: 484.57s INFO: 2889 processes: 79 internal, 2074 local, 736 worker. FAILED: Build did NOT complete successfullyERROR: Could not build Bazel
Following this tutorial for building bazel in raspberry pi 4 64 bit finally worked, make sure to use SD card more than 16gb alteast.
https://gist.github.com/EKami/9869ae6347f68c592c5b5cd181a3b205
Following this tutorial for building bazel in raspberry pi 4 64 bit finally worked
Does this mean stock Bazel builds on a Raspberry Pi these days? That would be great.
yes, few java heap flag to be added to make it work, that's it. it is described in the tutorial link shared above.
hardware: raspberry pi 4 8 gb