[SERVER-43845] Cannot use -gsplit-dwarf on SCons on a POSIX system with sanitizer flags enabled Created: 04/Oct/19  Updated: 08/Oct/19  Resolved: 08/Oct/19

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Adam Cooper (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Dev Tools 2019-10-21
Participants:

 Description   

On Linux, when I am running with -gsplit-dwarf and --sanitize=address and --allocator=system it appears that -ggdb is also being added to my CCFLAGS. This leaves two -g options defined which is not a valid configuration and causes the assembler to fail.



 Comments   
Comment by Adam Cooper (Inactive) [ 08/Oct/19 ]

Well not gonna lie I just built with this configuration perfectly fine, so, uh... guess we can close this one under [¯\_(ツ)_/¯]

Command I used was

buildscripts/scons.py 
--allocator=system 
--sanitize=address 
CCFLAGS='-Wa,--compress-debug-sections,-gsplit-dwarf' 
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars 
MONGO_VERSION=0.0.0 
MONGO_GIT_HASH=unknown
 --ssl 
--dbg 
VARIANT_DIR=ninja 
--icecream 
--modules=ninja,enterprise 
--disable-warnings-as-errors 
build.ninja 
LINKFLAGS='-lrt -static-libasan'

Comment by Adam Cooper (Inactive) [ 08/Oct/19 ]

Having a difficult time reproducing this bug at the moment. Going through all of my SCons invocations that match the description. Will get back to you.

Comment by Andrew Morrow (Inactive) [ 08/Oct/19 ]

And what error do you get?

Comment by Adam Cooper (Inactive) [ 08/Oct/19 ]

buildscripts/scons.py 
--allocator=system 
--sanitize=address 
CCFLAGS='-Wa,--compress-debug-sections,-gsplit-dwarf -lrt' 
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars 
MONGO_VERSION="0.0.0" 
MONGO_GIT_HASH=unknown 
--ssl 
--dbg 
VARIANT_DIR=ninja 
--icecream 
--modules=ninja,enterprise 
--disable-warnings-as-errors 
build.ninja

Comment by Andrew Morrow (Inactive) [ 08/Oct/19 ]

adam.cooper - I'm reasonably sure that I've built with ASAN and split dwarf in the past. Could you provide your complete SCons invocation line, and details on the error you observe?

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