[SERVER-51771] libunwind fails to build with GCC >=10.2 Created: 20/Oct/20  Updated: 29/Oct/23  Resolved: 21/Oct/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0, 4.4.2

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

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Steps To Reproduce:

get ubuntu 20.04

install gcc/++ 10.2

build install mongo with gcc/++ 10.2

Sprint: Dev Platform 2020-11-02
Participants:

 Description   

In the newer GCC version, C globals are now not defined in the "common" bss section by default. linunwind will fail to build because of multiple definitions of _U_dyn_info_list symbol. This can be fixed by either putting an extern in front of the extra defs, save a single location, or using the -fcommon option to preserve the older GCC behavior.

 

Suggesting using the -fcommon option for the libunwind build as that will be safer, and we wont need to modify third party vendor-ed code.

 

More info can be found here: https://gcc.gnu.org/gcc-10/porting_to.html



 Comments   
Comment by Oleg Pudeyev (Inactive) [ 01/Dec/20 ]

Will this change be available in a 4.7 release?

Comment by Githook User [ 22/Oct/20 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-51771 added explicit -fcommon option so libunwind will build with GCC >=10.2

(cherry picked from commit 15542a4c9a523ff58ea0a0c5d40b834dee304bfa)
Branch: v4.4
https://github.com/mongodb/mongo/commit/9484c61ce65463aa35614081fa4eeaf53680d733

Comment by Githook User [ 21/Oct/20 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-51771 added explicit -fcommon option so libunwind will build with GCC >=10.2
Branch: master
https://github.com/mongodb/mongo/commit/15542a4c9a523ff58ea0a0c5d40b834dee304bfa

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