"./mach build" broken on Windows due to space in home directory name
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox81 fixed)
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
After running ./mach create-mach-environment
on my Windows machine today, ./mach build
failed with an "Error loading mozconfig".
Specifically, python/mozbuild/mozbuild/mozconfig_loader
fails with
line 29: c:\Users\Jonathan: No such file or directory
My Windows user name is "Jonathan Kew", which includes a space, and this becomes part of the path to my tools in ~/.mozbuild
. So $3
on line 29 there needs to be quoted. The same applies to line 47.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Adding quotes in mozconfig_loader
seems to be sufficient to get my build working again. I guess an alternative would be to ensure Windows short paths are always passed for all these parameters, but quoting the params seems the safer thing to do.
Updated•5 years ago
|
![]() |
||
Comment 3•5 years ago
|
||
I thought there was a long-standing convention/bug that you had to have your srcdir/objdir on a path with no spaces?
Comment 4•5 years ago
|
||
Yeah, this is a known issue -- it's written all over the documentation.
I think my take is that I'm okay with taking incremental changes to improve the situation here (like for example this patch seems fine), but we shouldn't take it upon ourselves to unilaterally fix every broken thing in this case.
Comment 5•5 years ago
|
||
Err -- actually, I think this particular bug is about how the HOME directory ~
has spaces, while the srcdir
and objdir
don't necessarily do so. So that would actually be a regression -- I don't think we've ever said your home directory needs to also not have spaces.
Assignee | ||
Comment 6•5 years ago
|
||
Right, it's the (long) name of my home dir that has a space, which has never been a problem in the past. My src and obj trees are elsewhere and are space-free.
![]() |
||
Comment 7•5 years ago
|
||
My mistake! This bug (and the proposed fix) seem very reasonable, then.
Comment 9•5 years ago
|
||
bugherder |
Description
•