Closed Bug 1659685 Opened 5 years ago Closed 5 years ago

"./mach build" broken on Windows due to space in home directory name

Categories

(Firefox Build System :: General, defect)

Unspecified
Windows
defect

Tracking

(firefox81 fixed)

RESOLVED FIXED
81 Branch
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.

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.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
See Also: → 1659602
See Also: 1659602

I thought there was a long-standing convention/bug that you had to have your srcdir/objdir on a path with no spaces?

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.

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.

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.

My mistake! This bug (and the proposed fix) seem very reasonable, then.

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/12dc30518f32 Quote parameters passed to mozconfig_loader, in case of spaces in paths. r=rstewart
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: