Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on windows systems where username has space #32165

Closed
mariusGundersen opened this issue Feb 12, 2020 · 1 comment · Fixed by #32169
Closed

Build fails on windows systems where username has space #32165

mariusGundersen opened this issue Feb 12, 2020 · 1 comment · Fixed by #32169
Labels
area-Infrastructure untriaged New issue has not been triaged by the area owner

Comments

@mariusGundersen
Copy link
Contributor

I've tried to clone this project and make it build on my windows 10 machine, but I'm having trouble.

At first I cloned the project into my usual dev directory, which is at C:\Users\Marius Gundersen\dev\dotnet-runtime, but when I rat the build I got the error MSBUILD : error MSB1008: Only one project can be specified.. A bit of googling revealed that this happens when there is a space in the path.

So I moved the project to C:\dev\dotnet-runtime and tried again. Now it fails when I run build -subsetCategory coreclr -c Release with the error LINK : fatal error LNK1266: error reading instrumentation file 'C:\Users\Marius'; Unhandled PDB error [C:\dev\dotnet-runtime\artifacts\obj\coreclr\Windows_NT.x64.Release\src\dlls\mscoree\coreclr\coreclr.vcxproj]. Again the space in the path seems to be the issue.

Specifically it seems to be a problem in pgosupport.cmake file, these lines:

set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE        " /LTCG /USEPROFILE:PGD=${ProfilePath}")
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /LTCG /USEPROFILE:PGD=${ProfilePath}")

I wrapped the ${ProfilePath} in these two lines with \" (escaped since it's inside a string already), and now it seems to work.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Feb 12, 2020
@jkotas
Copy link
Member

jkotas commented Feb 12, 2020

I wrapped the ${ProfilePath} in these two lines with " (escaped since it's inside a string already), and now it seems to work.

Could you please submit a PR with this change now that you have tested it fixes part of the problem?

mariusGundersen added a commit to mariusGundersen/runtime that referenced this issue Feb 12, 2020
This fixes building the project on systems where there is a space in the path of the user. For example on Windows where the user might (hypothetically) be called 'Marius Gundersen' and the path to their user folder is `C:\Users\Marius Gundersen\` the build would fail

This fixes dotnet#32165
jkotas pushed a commit that referenced this issue Feb 16, 2020
This fixes building the project on systems where there is a space in the path of the user. For example on Windows where the user might (hypothetically) be called 'Marius Gundersen' and the path to their user folder is `C:\Users\Marius Gundersen\` the build would fail

This fixes #32165
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants