[SERVER-46299] SUSE15 C++ toolchain failure. Need binutils-2.32? Created: 21/Feb/20  Updated: 29/Oct/23  Resolved: 10/Apr/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.4.0-rc1

Type: Bug Priority: Critical - P2
Reporter: Billy Donahue Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-46418 disable libunwind on SUSE 15 Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

https://evergreen.mongodb.com/task/mongodb_mongo_master_suse15_compile_9bd2f484cb48136bb29c7eb7e0fc0ca34038fe3b_20_02_21_02_45_58

Sprint: STM 2020-03-23, Dev Platform 2020-04-06, Dev Platform 2020-04-20
Participants:

 Description   

SUSE15 compiles are failing at the g++ configure check level with:

/opt/mongodbtoolchain/v3/bin/g++ -o build/scons/cached/sconf_temp/conftest_ac30bfea77045c1c67c4f51773b51414_0.o -c build/scons/cached/sconf_temp/conftest_ac30bfea77045c1c67c4f51773b51414_0.cpp
/opt/mongodbtoolchain/v3/bin/g++ -o build/scons/cached/sconf_temp/conftest_ac30bfea77045c1c67c4f51773b51414_0_a6ac9ae1c23d913048128b97010574b4 build/scons/cached/sconf_temp/conftest_ac30bfea77045c1c67c4f51773b51414_0.o
/opt/mongodbtoolchain/revisions/23805b43dd027076b4ae48533ab385e20c61e0cf/stow/gcc-v3.Ev8/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../x86_64-mongodb-linux/bin/ld: /usr/lib64/libc_nonshared.a(elf-init.oS): unable to initialize decompress status for section .debug_info
/opt/mongodbtoolchain/revisions/23805b43dd027076b4ae48533ab385e20c61e0cf/stow/gcc-v3.Ev8/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../x86_64-mongodb-linux/bin/ld: /usr/lib64/libc_nonshared.a(elf-init.oS): unable to initialize decompress status for section .debug_info
/opt/mongodbtoolchain/revisions/23805b43dd027076b4ae48533ab385e20c61e0cf/stow/gcc-v3.Ev8/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../x86_64-mongodb-linux/bin/ld: /usr/lib64/libc_nonshared.a(elf-init.oS): unable to initialize decompress status for section .debug_info
/opt/mongodbtoolchain/revisions/23805b43dd027076b4ae48533ab385e20c61e0cf/stow/gcc-v3.Ev8/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../x86_64-mongodb-linux/bin/ld: /usr/lib64/libc_nonshared.a(elf-init.oS): unable to initialize decompress status for section .debug_info
/usr/lib64/libc_nonshared.a: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status
scons: Configure: no

We might need binutils-2.32 instead of binutils-2.30.
There is an interaction with newer elfutils (which we don't toolchain).

Apparently elfutils fixed a bug and binutils pre-2.32 relied on the buggy behavior.

https://wiki.gentoo.org/wiki/Binutils_2.32_upgrade_notes/elfutils_0.175:_unable_to_initialize_decompress_status_for_section_.debug_info



 Comments   
Comment by Andrew Morrow (Inactive) [ 03/Apr/20 ]

I tried doing an upgrade of the v3 toolchain to binutils-2.34 but was not successful. There appear to be incompatibilities between GCC 8 and such new binutils that I'm not sure how to resolve. Next week I will instead attempt to backport the fixes from https://sourceware.org/bugzilla/show_bug.cgi?id=23916 into binutils-2.30 and see if that works.

Comment by Brooke Miller [ 02/Apr/20 ]

Thanks for the reminder acm!

Comment by Billy Donahue [ 25/Feb/20 ]

This isn't a good time in our release cycle to debug the toolchain issues on SUSE 15, so I would like to just back out the SUSE15 AMI that's failing.
It's okay, we'll just do without libunwind and the required xz-devel package on that platform while we figure out how to fix our toolchain.

Regenerating the SUSE15 buildimage AMI exposed this issue. our toolchain isn't going to work with up-to-date SUSE15.

Toolchain issue:
https://evergreen.mongodb.com/task_log_raw/toolchain_builder_suse15_build_gcc_v3_patch_4453a1aef41ca664b2d589e196f59c34b961a65b_5e53dae77742ae65714c4d52_20_02_24_14_17_51/0?type=T#L11437

I believe this is caused by

/usr/lib64/libc_nonshared.a(elf-init.oS): unable to initialize decompress status for section .debug_info

The versions are slightly different for glibc-devel in the new SUSE15 AMI:
Current glibc-devel-2.26-13.36.1.x86_64
previous glibc-devel-2.26-13.24.1.x86_64

The problem isn't with the libc but rather the toolchain that SUSE used to build it.
It has sections encoded in a way that our toolchain binutils can't read.

Generated at Thu Feb 08 05:11:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.