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

Failed to build Bazel 5.0.0 on Fedora #14819

Closed
Wyverald opened this issue Feb 15, 2022 · 10 comments
Closed

Failed to build Bazel 5.0.0 on Fedora #14819

Wyverald opened this issue Feb 15, 2022 · 10 comments
Labels
not stale Issues or PRs that are inactive but not considered stale P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug

Comments

@Wyverald
Copy link
Member

from @vbatts:

I've kicked off builds for fedora and cento.
This marks as package name as "bazel5"
https://copr.fedorainfracloud.org/coprs/build/3493215

The build failed on a number of the platforms

  • fedora 36 (all arches)
  • fedora rawhide (all arches)
ERROR: /builddir/build/BUILD/bazel-5.0.0/src/main/cpp/BUILD:228:11: Compiling src/main/cpp/rc_file.cc failed: (Exit 1): gcc failed: error executing command
   (cd /var/tmp/bazel_IjI0AnKi/out/execroot/io_bazel && \
   exec env - \
     PATH=/builddir/build/BUILD/bazel-5.0.0/bin-hack:/builddir/.local/bin:/builddir/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin \
     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/src/main/cpp/_objs/rc_file/rc_file.d '-frandom-seed=bazel-out/aarch64-opt/bin/src/main/cpp/_objs/rc_file/rc_file.o' -DBLAZE_OPENSOURCE -iquote . -iquote bazel-out/aarch64-opt/bin -include/usr/include/c++/11/limits -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c src/main/cpp/rc_file.cc -o bazel-out/aarch64-opt/bin/src/main/cpp/_objs/rc_file/rc_file.o)
# Configuration: 748b5b758b09e1994494c90a8cb080e0306949cc69b7accf3e2939eb3d3a3e35
# Execution platform: //:default_host_platform
<command-line>: fatal error: /usr/include/c++/11/limits: No such file or directory
compilation terminated.
[459 / 1,107] 3 actions running
     Compiling src/compiler/csharp_generator.cc [for host]; 4s local
     Compiling src/compiler/cpp_generator.cc [for host]; 4s local
     Compiling src/compiler/ruby_generator.cc [for host]; 0s local

https://download.copr.fedorainfracloud.org/results/vbatts/bazel/fedora-36-aarch64/03493215-bazel5/build.log.gz

  • epel 7 (all arches)
ERROR: /var/tmp/bazel_ypZaJyXq/out/external/com_github_grpc_grpc/BUILD:1254:16: Compiling src/core/lib/iomgr/resolve_address_custom.cc failed: (Exit 1): gcc failed: error executing command
   (cd /var/tmp/bazel_ypZaJyXq/out/execroot/io_bazel && \
   exec env - \
     PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/builddir/.local/bin:/builddir/bin \
     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/ppc-opt/bin/external/com_github_grpc_grpc/_objs/grpc_base_c/resolve_address_custom.d '-frandom-seed=bazel-out/ppc-opt/bin/external/com_github_grpc_grpc/_objs/grpc_base_c/resolve_address_custom.o' -iquote external/com_github_grpc_grpc -iquote bazel-out/ppc-opt/bin/external/com_github_grpc_grpc -iquote external/upb -iquote bazel-out/ppc-opt/bin/external/upb -iquote external/com_google_protobuf -iquote bazel-out/ppc-opt/bin/external/com_google_protobuf -iquote external/com_google_absl -iquote bazel-out/ppc-opt/bin/external/com_google_absl -iquote . -iquote bazel-out/ppc-opt/bin -isystem external/com_github_grpc_grpc/include -isystem bazel-out/ppc-opt/bin/external/com_github_grpc_grpc/include -isystem external/com_github_grpc_grpc/src/core/ext/upb-generated -isystem bazel-out/ppc-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/ppc-opt/bin/external/com_github_grpc_grpc/src/core/ext/upbdefs-generated -isystem third_party/zlib -isystem bazel-out/ppc-opt/bin/third_party/zlib -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/com_github_grpc_grpc/src/core/lib/iomgr/resolve_address_custom.cc -o bazel-out/ppc-opt/bin/external/com_github_grpc_grpc/_objs/grpc_base_c/resolve_address_custom.o)
# Configuration: cb266f3995a6d05424d5d5f9027f493b1e9335e0a601bb71bcd48f86902f55b7
# Execution platform: //:default_host_platform
In file included from external/com_github_grpc_grpc/src/core/lib/iomgr/closure.h:33:0,
                  from external/com_github_grpc_grpc/src/core/lib/iomgr/exec_ctx.h:35,
                  from external/com_github_grpc_grpc/src/core/lib/iomgr/pollset.h:27,
                  from external/com_github_grpc_grpc/src/core/lib/iomgr/pollset_set.h:24,
                  from external/com_github_grpc_grpc/src/core/lib/iomgr/resolve_address.h:36,
                  from external/com_github_grpc_grpc/src/core/lib/iomgr/resolve_address_custom.h:25,
                  from external/com_github_grpc_grpc/src/core/lib/iomgr/resolve_address_custom.cc:21:
external/com_github_grpc_grpc/src/core/lib/iomgr/resolve_address_custom.cc: In function 'grpc_error* try_split_host_port(const char*, const char*, std::string*, std::string*)':
external/com_github_grpc_grpc/src/core/lib/iomgr/resolve_address_custom.cc:97:60: error: no matching function for call to 'StrFormat(const char [28], const char*&)'
          absl::StrFormat("unparseable host:port: '%s'", name));

https://download.copr.fedorainfracloud.org/results/vbatts/bazel/epel-7-ppc64le/03493215-bazel5/build.log.gz

@Wyverald Wyverald added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Feb 15, 2022
@meteorcloudy meteorcloudy added P1 I'll work on this now. (Assignee required) and removed untriaged labels Feb 22, 2022
@meteorcloudy
Copy link
Member

@vbatts Can you help investigate this issue? Is this due to an old gcc version you use?

@Wyverald
Copy link
Member Author

@bazel-io fork 5.1

@vbatts
Copy link

vbatts commented Feb 23, 2022 via email

@meteorcloudy
Copy link
Member

@vbatts I understand, can you help debug this or provide a fedora docker image so we can reproduce the failure, currently we have no way to investigate what's going wrong.

@vbatts
Copy link

vbatts commented Feb 24, 2022 via email

@meteorcloudy
Copy link
Member

Target //src:bazel_nojdk up-to-date:
  bazel-bin/src/bazel_nojdk
INFO: Elapsed time: 285.352s, Critical Path: 167.49s
INFO: 2951 processes: 76 internal, 2139 local, 736 worker.
INFO: Build completed successfully, 2951 total actions
WARNING: Option 'java_toolchain' is deprecated
WARNING: Option 'host_java_toolchain' is deprecated
WARNING: Option 'host_javabase' is deprecated

Build successful! Binary is here: /root/rpmbuild/BUILD/bazel-5.0.0/output/bazel
+ env ./scripts/generate_bash_completion.sh --bazel=output/bazel --output=output/bazel-complete.bash
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.qWDTFO
+ umask 022
+ cd /root/rpmbuild/BUILD
+ '[' /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64 '!=' / ']'
+ rm -rf /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64
++ dirname /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64
+ mkdir -p /root/rpmbuild/BUILDROOT
+ mkdir /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64
+ cd bazel-5.0.0
+ /usr/bin/mkdir -p /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64//usr/bin
+ /usr/bin/mkdir -p /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64//usr/share/bash-completion/completions
+ /usr/bin/cp output/bazel /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64//usr/bin/bazel-real
+ /usr/bin/cp ./scripts/packages/bazel.sh /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64//usr/bin/bazel
+ /usr/bin/cp output/bazel-complete.bash /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64//usr/share/bash-completion/completions/bazel
+ /usr/lib/rpm/check-buildroot
Processing files: bazel5-5.0.0-0.fc34.x86_64
Provides: bazel bazel5 = 5.0.0-0.fc34 bazel5(x86-64) = 5.0.0-0.fc34
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /bin/bash libc.so.6()(64bit) libc.so.6(GLIBC_2.10)(64bit) libc.so.6(GLIBC_2.11)(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.15)(64bit) libc.so.6(GLIBC_2.16)(64bit) libc.so.6(GLIBC_2.17)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.2)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.32)(64bit) libc.so.6(GLIBC_2.33)(64bit) libc.so.6(GLIBC_2.4)(64bit) libc.so.6(GLIBC_2.6)(64bit) libc.so.6(GLIBC_2.7)(64bit) libc.so.6(GLIBC_2.9)(64bit) libdl.so.2()(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libm.so.6(GLIBC_2.29)(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.12)(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) librt.so.1()(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libstdc++.so.6(CXXABI_1.3.5)(64bit) libstdc++.so.6(CXXABI_1.3.8)(64bit) libstdc++.so.6(GLIBCXX_3.4)(64bit) libstdc++.so.6(GLIBCXX_3.4.11)(64bit) libstdc++.so.6(GLIBCXX_3.4.14)(64bit) libstdc++.so.6(GLIBCXX_3.4.15)(64bit) libstdc++.so.6(GLIBCXX_3.4.17)(64bit) libstdc++.so.6(GLIBCXX_3.4.18)(64bit) libstdc++.so.6(GLIBCXX_3.4.19)(64bit) libstdc++.so.6(GLIBCXX_3.4.20)(64bit) libstdc++.so.6(GLIBCXX_3.4.21)(64bit) libstdc++.so.6(GLIBCXX_3.4.22)(64bit) libstdc++.so.6(GLIBCXX_3.4.29)(64bit) libstdc++.so.6(GLIBCXX_3.4.9)(64bit) rtld(GNU_HASH)
Conflicts: bazel bazel2 bazel3 bazel4
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/bazel5-5.0.0-0.fc34.x86_64
Wrote: /root/rpmbuild/RPMS/x86_64/bazel5-5.0.0-0.fc34.x86_64.rpm

Hmm, the build actually succeeded for me.

Is this change related vbatts/copr-build-bazel@3d85864 ?

@vbatts
Copy link

vbatts commented Feb 25, 2022 via email

@meteorcloudy
Copy link
Member

I'm getting when running make .container.run FED_VER=rawhide:

Errors during downloading metadata for repository 'fedora-cisco-openh264':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-rawhide&arch=x86_64 [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'fedora-cisco-openh264': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-rawhide&arch=x86_64 [getaddrinfo() thread failed to start]
Fedora - Rawhide - Developmental packages for t 0.0  B/s |   0  B     00:00

Can you help check if setting BAZEL_CXXOPTS=c++11 helps? And vbatts/copr-build-bazel@3d85864 seems to be fixing a similar issue, do you know what's the difference this time?

@meteorcloudy meteorcloudy added P2 We'll consider working on this in future. (Assignee optional) and removed P1 I'll work on this now. (Assignee required) labels Mar 2, 2022
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Jun 14, 2023
@meteorcloudy meteorcloudy added not stale Issues or PRs that are inactive but not considered stale and removed stale Issues or PRs that are stale (no activity for 30 days) labels Jun 26, 2023
@vbatts
Copy link

vbatts commented Aug 3, 2023

we can close this issue. I'll open a new one regarding builds on fedora 38 and recent bazel versions (6.2 and 6.3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not stale Issues or PRs that are inactive but not considered stale P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug
Projects
None yet
Development

No branches or pull requests

4 participants