New issue
Advanced search Search tips

Issue 821482 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Build tools don't support spaces in temp directory path on Windows

Project Member Reported by mmenke@chromium.org, Mar 13 2018

Issue description

I was getting the following error while building on my personal Windows machine, which I've build Chrome on in the past without issue:

[1/2831] LINK genmacro.exe genmacro.exe.pdb
FAILED: genmacro.exe genmacro.exe.pdb
C:/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./genmacro.exe /PDB:./genmacro.exe.pdb @./genmacro.exe.rsp

c:\users\matt : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
LINK : fatal error LNK1327: failure during running mt.exe
ninja: build stopped: subcommand failed.

Depending on the target I tried to build, I'd get the same error, but for a different exe, so the issue is not with a particular gn file, but rather with the build infrastructure. 
 My Windows user directory is "c:\users\matt menke\", so the issue seems to be some tool does no like spaces in paths.

After randomly digging around for a while, I noticed a reference to "environment.x64", and looked at the file.  It has two references to my Windows temp directory.  Updating those paths to just point to d:\temp instead (Leaving other paths with spaces alone, including other references to my user directory) seems to fix the issue.  While I suppose I can just change the location of my temp directory, this no-spaces-in-temp-path requirement seems rather unexpected, and the failure output doesn't exactly make it easy to figure out that moving the temp directory will fix the problem (Moving one's user profile is a bit more involved, but should also fix the issue, I assume).
 

Comment 1 by mmenke@chromium.org, Mar 21 2018

Cc: dpranke@chromium.org scottmg@chromium.org
Is there any solution here other than moving my user profile directory, or changing my (system wide) temp file to some other location?  It seems weird that when not using goma, the temp path on Windows apparent cannot have spaces in it, or linking will fail.
Cc: brucedaw...@chromium.org tikuta@chromium.org
interesting. We should fix the tooling, at least, to make that work.

Comment 3 by tikuta@chromium.org, Mar 22 2018

I tried to reproduce the issue by setting space containing envvar to TMP and TEMP like below.
TMP=c:\src\sp ace
TEMP=c:\src\sp ace

But I was able to link genmacro.exe successfully.

I'm suspecting this is linker issue.
https://developercommunity.visualstudio.com/content/problem/131714/visual-c-linker-not-proprely-parses-path-with-spac.html
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/d4477bec-252b-47e4-bc6e-bd98e3076f69/cusersjuan-general-error-c1010070-failed-to-load-and-parse-the-manifest-the-system-cannot?forum=vssetup

Comment 4 by mmenke@chromium.org, Mar 23 2018

Status: WontFix (was: Untriaged)
Sorry for the slot response.  I'll poke at it some more when I have time, but if this is an MSVC issue, obviously nothing we can do here.

Sign in to add a comment