[SERVER-84539] Bazel Execution Failing in Amazon Linux due to mismatched glibc version Created: 03/Jan/24  Updated: 21/Jan/24  Resolved: 10/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Zack Winter Assignee: Zack Winter
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Build
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Currently Bazel fails to execute on Amazon Linux because the hermetic gcc is linked with glibc version 2.34, but the system version is 2.26. glibc is backwards compatible, but not forwards compatible.

A possible solution is building and bundling our own libc with all dynamically loaded dependencies, but this is a pretty big initiative. See https://crosstool-ng.github.io/ for something we could utilize to do this for us.

The other solution is to build gcc with an earlier version of glibc. Since it's backwards compatible, gcc will then be runnable on systems with newer versions of glibc. One drawback to this is that we would potentially lose out on new ABI breaking features in glibc that may improve compilation speed. We also may be forced to upgrade to a newer version of glibc if a newer gcc requires it. This however should not affect the resulting binaries built (they should be bitwise identical regardless of glibc version).



 Comments   
Comment by Githook User [ 10/Jan/24 ]

Author:

{'name': 'Zack Winter', 'email': '3457246+zackwintermdb@users.noreply.github.com', 'username': 'zackwintermdb'}

Message: SERVER-84539 Switch bazel to link gcc/clang against glibc v2.26 (#17861)

GitOrigin-RevId: 8682c216fabbd333ab14f121b641bae16b7c2741
Branch: master
https://github.com/mongodb/mongo/commit/3f47eb78fc8498fc356ec4eab358c95c56060977

Generated at Thu Feb 08 06:55:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.