[SERVER-49410] SCons does not handle tool paths with spaces Created: 09/Jul/20  Updated: 27/Oct/23  Resolved: 27/Oct/23

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

Type: Bug Priority: Major - P3
Reporter: Ryan Egesdahl (Inactive) Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File config.log    
Assigned Teams:
Server Development Platform
Operating System: ALL
Participants:

 Description   

SCons is not able to run builds whenever the tools have paths with spaces in them. There is no reason this can't happen on any *NIX or Windows setup, and it's a trap for unaware developers. We should fix this behavior so SCons can use these tools correctly.

buildscripts/scons.py --variables-files=etc/scons/mongodbtoolchain_v3_clang.vars  scons --dbg=on --opt=on --link-model=dynamic --ninja=next CXX='/tmp/path with spaces innit/bin/clang++' CC='/tmp/path with spaces innit/bin/clang++' generate-ninja
 
scons: Reading SConscript files ...
scons: running with args /home/ubuntu/.pyenv/versions/3.7.7/bin/python3 buildscripts/scons.py --variables-files=etc/scons/mongodbtoolchain_v3_clang.vars scons --dbg=on --opt=on --link-model=dynamic --ninja=next CXX=/tmp/path with spaces innit/bin/clang++ CC=/tmp/path with spaces innit/bin/clang++ generate-ninja
Using variable customization file /home/ubuntu/.scons/site_scons/mongo_custom_variables.py
Using variable customization file etc/scons/mongodbtoolchain_v3_clang.vars
Mkdir("build/scons")
scons version: 3.1.2
python version: 3 7 7 'final' 0
CC is /tmp/path with spaces innit/bin/clang++
/tmp/path with spaces innit/bin/clang++ resolves to /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/llvm-v3.99u/bin/clang-7
CXX is /tmp/path with spaces innit/bin/clang++
/tmp/path with spaces innit/bin/clang++ resolves to /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/llvm-v3.99u/bin/clang-7
Checking whether the C compiler works... no
C compiler /tmp/path with spaces innit/bin/clang++ doesn't work
See /home/ubuntu/workspace/mongo/build/scons/config.log for details


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