You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bazel 0.27 appears to no longer run on Trusty/RHEL/CentOS due to glibc compat #8652
/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?
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?
./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)
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.
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.
@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.
(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?)
@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)
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.
Activity
mattklein123 commentedon Jun 17, 2019
cc @moderation
jin commentedon Jun 17, 2019
cc @philwo @fweikert @laurentlb
jin commentedon Jun 17, 2019
See #7816 (comment)
mattklein123 commentedon Jun 17, 2019
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?
moderation commentedon Jun 17, 2019
Error on RHEL 7 is:
laurentlb commentedon Jun 17, 2019
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.
mzeren-vmw commentedon Jun 17, 2019
FWIW our internal build of bazel links libstdc++ statically to resolve this type of issue.
mattklein123 commentedon Jun 17, 2019
+1 it would be awesome if the bazel official builds could do this also.
philwo commentedon Jun 17, 2019
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.
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.
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.
This is unfortunate and I'll improve the current situation in two steps:
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.
moderation commentedon Jun 17, 2019
@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
philwo commentedon Jun 17, 2019
@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.
mattklein123 commentedon Jun 17, 2019
@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.
21 remaining items
yongtang commentedon Jun 21, 2019
@vbatts I tried with CentOS 7 + your bazel build and it works correctly. Thanks! 👍
vbatts commentedon Jun 21, 2019
@yongtang good to hear
r4nt commentedon Jun 24, 2019
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
philwo commentedon Jun 24, 2019
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!
philwo commentedon Jun 25, 2019
@r4nt FWIW, I cannot build Bazel inside that container, it fails with C++ errors:
(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?)
perfinion commentedon Jun 25, 2019
@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)
Fix CI
cgruber commentedon Jul 1, 2019
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.
philwo commentedon Jul 1, 2019
@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.
cgruber commentedon Jul 1, 2019
Oh! Sorry, I missed it. Thank you.
philwo commentedon Jul 1, 2019
No worries 😊 I should have pointed it out here on the bug, too.
Teach cc_configure about BAZEL_LINKLIBS env variable
philwo commentedon Jul 8, 2019
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. :)
Teach cc_configure about BAZEL_LINKLIBS env variable