Skip to content

bazel 0.27 appears to no longer run on Trusty/RHEL/CentOS due to glibc compat #8652

Closed

Description

@mattklein123
/usr/bin/bazel: relocation error: /usr/bin/bazel: symbol _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
make: *** [bazel_clean] Error 127

Is this expected or should Bazel still support these platforms?

Activity

  1. mattklein123 commented on Jun 17, 2019

    @mattklein123
    Author
  2. jin commented on Jun 17, 2019

    @jin
    Member
  3. jin commented on Jun 17, 2019

    @jin
    Member
  4. mattklein123 commented on Jun 17, 2019

    @mattklein123
    Author

    Hmm, yikes. Dropping support for Trusty before EOL seems not great but maybe understandable, but I'm guessing that also dropping support for RHEL/CentOS is going to be very problematic for lots of people. Is there any chance of reconsidering this?

  5. moderation commented on Jun 17, 2019

    @moderation

    Error on RHEL 7 is:

    ldd --version
    ldd (GNU libc) 2.17
    
    ./bazel-0.27.0-linux-x86_64 
    ./bazel-0.27.0-linux-x86_64: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./bazel-0.27.0-linux-x86_64)
    ./bazel-0.27.0-linux-x86_64: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./bazel-0.27.0-linux-x86_64)
    ./bazel-0.27.0-linux-x86_64: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./bazel-0.27.0-linux-x86_64)
    
  6. added
    P0
    on Jun 17, 2019
  7. laurentlb commented on Jun 17, 2019

    @laurentlb
    Contributor

    There was a discussion here: https://groups.google.com/d/msg/bazel-dev/_D6XzfNkQQE/8TNKiNmsCAAJ

    It looks like the change is breaking more things than intended. I'll wait for Philipp's feedback, but I suspect we'll do a new release to fix this.

  8. mzeren-vmw commented on Jun 17, 2019

    @mzeren-vmw
    Contributor

    FWIW our internal build of bazel links libstdc++ statically to resolve this type of issue.

  9. mattklein123 commented on Jun 17, 2019

    @mattklein123
    Author

    FWIW our internal build of bazel links libstdc++ statically to resolve this type of issue.

    +1 it would be awesome if the bazel official builds could do this also.

  10. philwo commented on Jun 17, 2019

    @philwo
    Member

    tl;dr I'll fix this and will add official support for CentOS (we'll have to see which versions of CentOS we can do, but 7.x and 8.x sound very likely - does anyone still need CentOS 6.x?).

    @mzeren-vmw, could you share your patches (if any) / build command-line for Bazel that you use to statically link libstdc++? Maybe we can just use the same for our official releases.

    It looks like the change is breaking more things than intended.

    The change dropped official support for Ubuntu 14.04 LTS and instead made Ubuntu 16.04 LTS our main build platform to build Linux release artifacts on. It was unknown at the time which platforms that would break. The reasoning was that Ubuntu 14.04 LTS standard support ended, which makes it "de facto" end of life for the majority of users, because package repositories with security updates can now only be accessed via a paid subscription, which isn't an option for our CI.

    Users were asked on their opinion regarding this and we built several release candidates of Bazel 0.27.0 to learn about the larger impact of this change. I'm not aware of anyone complaining until after the final release.

    Dropping support for Trusty before EOL seems not great but maybe understandable, [...]

    Yes. We have to strike a balance here and going with the standard support period of the most popular operating systems seems like a good option for now.

    but I'm guessing that also dropping support for RHEL/CentOS is going to be very problematic for lots of people. Is there any chance of reconsidering this?

    This is unfortunate and I'll improve the current situation in two steps:

    • Build Linux releases in a way that let's them work on supported RHEL / CentOS versions.
    • Make RHEL / CentOS a fully supported OS that we test Bazel on.

    It would have been nice if people could have reported breakages earlier, while 0.27.0 was still in the release candidate phase (or even earlier, after the initial announcement that we'll build Bazel on Ubuntu 16.04 LTS in the future, but I understand that it's hard to extrapolate "it will stop working on CentOS 7.x" from that), but now let's see that we can get this to work in 0.28.0 and hopefully in a 0.27.1 patch release.

  11. moderation commented on Jun 17, 2019

    @moderation

    @philwo I'd be happy to test release candidate builds on RHEL. Where is the best place to track rc releases? They are not published on https://github.com/bazelbuild/bazel/releases and I don't see announcements on https://groups.google.com/forum/#!forum/bazel-dev

  12. philwo commented on Jun 17, 2019

    @philwo
    Member

    @moderation Thank you! I'll see that we can upload release candidates as pre-releases to GitHub.

    They are currently announced on the bazel-discuss group, e.g. see here: https://groups.google.com/forum/#!topic/bazel-discuss/9BFvKuEsEbg.

    Bazelisk also supports a "last_rc" version which will automatically use the newest release candidate if one is available, otherwise the latest stable release. I'm using this on my personal and work machine and will ask the Bazel team to use it, so that the release candidates get some more real world testing.

  13. mattklein123 commented on Jun 17, 2019

    @mattklein123
    Author

    @philwo FWIW, I think the static link fixes would also fix Trusty, at least in the short term, with the understanding it is not fully supported. We would really, really appreciate it if you could do this there also.

  14. 21 remaining items

  15. yongtang commented on Jun 21, 2019

    @yongtang

    @vbatts I tried with CentOS 7 + your bazel build and it works correctly. Thanks! 👍

  16. vbatts commented on Jun 21, 2019

    @vbatts

    @yongtang good to hear

  17. r4nt commented on Jun 24, 2019

    @r4nt
    Contributor

    If I remember correctly, last time this happened I saw libc symbol problems, too, in which case statically linking libstdc++ won't help.

    The simplest solution for now would probably be to use the manylinux2010 devtoolset gcc to compile bazel.

    https://github.com/pypa/manylinux
    image is at quay.io/pypa/manylinux2010_x86_64
    @philwo - let me know if you need more info, feel free to drop by my desk

  18. philwo commented on Jun 24, 2019

    @philwo
    Member

    I got Bazel to build and pass its entire test suite on CentOS 7.

    I’ll verify that the binaries work on all platforms that we supported before and then change our CI to build release binaries on CentOS 7 tomorrow.

    @r4nt Thanks, I’ll have a look at that!

  19. philwo commented on Jun 25, 2019

    @philwo
    Member

    @r4nt FWIW, I cannot build Bazel inside that container, it fails with C++ errors:

    ERROR: /bazel/src/main/tools/BUILD:50:1: Linking of rule '//src/main/tools:build-runfiles' failed (Exit 1): gcc failed: error executing command 
      (cd /tmp/bazel_KI4q5xoT/out/execroot/io_bazel && \
      exec env - \
        LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib \
        PATH=/opt/rh/devtoolset-8/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
        PWD=/proc/self/cwd \
      /opt/rh/devtoolset-8/root/usr/bin/gcc @bazel-out/k8-opt/bin/src/main/tools/build-runfiles-2.params)
    Execution platform: //:default_host_platform
    bazel-out/k8-opt/bin/src/main/tools/_objs/build-runfiles/build-runfiles.o:build-runfiles.cc:function RunfilesCreator::ReadManifest(std::string const&, bool, bool): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
    collect2: error: ld returned 1 exit status
    Target //src:bazel_nojdk failed to build
    

    (I also can't build it in a vanilla CentOS 6 container with similar errors - I guess we just use a too new version of C++ that isn't supported by CentOS 6's libstdc++ and compilers yet?)

  20. perfinion commented on Jun 25, 2019

    @perfinion

    @philwo devtoolset-8 should be a new enough GCC and libstdc++, its supposed to statically link in the missing bits but maybe that part is going wrong? (Note, devtoolset links to the proper centos7 libstdc++ what it can and only statically links the bits that are missing, it doesnt just statically link everything)

  21. added a commit that references this issue on Jun 25, 2019
  22. cgruber commented on Jul 1, 2019

    @cgruber
    Contributor

    Can someone on the bazel side please clarify what the plan of record is? If there's going to be a. 0.27.1 fix soon, then we don't have to address this the same way as if there won't. Even just knowing what's planned can help. I can't upgrade to 0.27.x without mitigating this somehow. Just upgrading our build machines is not a workable options for reasons I can't get in to.

  23. philwo commented on Jul 1, 2019

    @philwo
    Member

    @cgruber Please see #7816 (comment) and the announcement on the mailing list. Bazel 0.27.1 should be released in the next days. If you have any questions, let me know.

  24. cgruber commented on Jul 1, 2019

    @cgruber
    Contributor

    Oh! Sorry, I missed it. Thank you.

  25. philwo commented on Jul 1, 2019

    @philwo
    Member

    No worries 😊 I should have pointed it out here on the bug, too.

  26. philwo commented on Jul 8, 2019

    @philwo
    Member

    I'm closing this, because Bazel 0.27.1 is released and version from now on are built and tested on CentOS 7, so we should be good here. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0breakage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions