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

Windows build fails with a space in the pathname #9442

Closed
UK992 opened this issue Jan 27, 2016 · 17 comments
Closed

Windows build fails with a space in the pathname #9442

UK992 opened this issue Jan 27, 2016 · 17 comments

Comments

@UK992
Copy link
Contributor

@UK992 UK992 commented Jan 27, 2016

I can't build Servo on Windows 10, keep throwing this error:

unable to get packages from source

Caused by:
  Failed to unpack package `servo-skia v0.20130412.3`

Caused by:
  The system cannot find the path specified. (os error 3)
@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Jan 27, 2016

@UK992 Hrm, I haven't seen this before! Are you running ./mach build from within a MINGW64 window, as described in the readme?

CC'ing @Jayflux and @adamncasey in case they've seen this before.

@jdm
Copy link
Member

@jdm jdm commented Jan 27, 2016

@larsbergstrom Any chance you have a local cargo override for skia that didn't end up getting published?

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Jan 27, 2016

@jdm Nope, everything's clean & committed and we've verified on multiple other machines (jay, adam, and vlad).

@UK992
Copy link
Contributor Author

@UK992 UK992 commented Jan 27, 2016

@larsbergstrom yes, i used MINGW64.
This error is present when i try to build Servo in C:\msys64\home\<username>\servo.
Now I'm building Servo in C:\servo and no error in skia package. Weird.

@adamncasey
Copy link
Contributor

@adamncasey adamncasey commented Jan 27, 2016

I haven't seen that error before.

Strange. I'm building in C:\msys64\home\<username>\servo

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Jan 27, 2016

@UK992 does <username> have any spaces or other "interesting" characters in it?

@UK992
Copy link
Contributor Author

@UK992 UK992 commented Jan 27, 2016

@larsbergstrom It have spaces.

@adamncasey
Copy link
Contributor

@adamncasey adamncasey commented Jan 27, 2016

Just tried building servo in a directory with spaces and I got an error as well, though a different error.

$ pwd
/home/Adam/test test/servo

$ ./mach build -d
New python executable in C:/msys64/home/Adam/test test/servo/python/_virtualenv/bin/python2.7.exe
Not overwriting existing python script C:/msys64/home/Adam/test test/servo/python/_virtualenv/bin/python.exe (you must use C:/msys64/home/Adam/test test/servo/python/_virtualenv/bin/python2.7.exe)
ERROR: The executable "C:/msys64/home/Adam/test test/servo/python/_virtualenv/bin/python2.7.exe" could not be run: [Error 5] Access is denied
Running virtualenv with interpreter C:\msys64\mingw64\bin/python2.7.exe
Python virtualenv failed to execute properly.
@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Jan 27, 2016

I think we should probably have mach ensure the directory doesn't have a space in it, at least on Windows :-)

@UK992
Copy link
Contributor Author

@UK992 UK992 commented Jan 27, 2016

I removed spaces from username and is now a successfully build Servo in C:\msys64\home\. :)

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Jan 28, 2016

Can this issue be closed? Or do we still need a patch for mach to make sure we don't have spaces in a Windows directory?

@larsbergstrom larsbergstrom changed the title Can't build on Windows Windows build fails with a space in the pathname Jan 28, 2016
@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Jan 28, 2016

@KiChjang Yeah, I'd like to see a patch that fixes that issue. I've edited the issue.

The work here is to have mach check the path to see if there are any spaces in the pathname and generate an error if so.

@jdm
Copy link
Member

@jdm jdm commented Jan 28, 2016

Relevant code: python/servo/build_commands.py in the build method

@DemiMarie
Copy link

@DemiMarie DemiMarie commented Feb 6, 2016

Relying on access to a path with spaces is not a good idea on Windows, where usernames often have spaces. I think that mach should be able to build & execute Servo in a path containing spaces.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Feb 6, 2016

@drbo Certainly, I'd be open to another (definitely not E-easy) issue to get paths with spaces working on Windows. However, for this issue, since we do not currently support paths with spaces, I'd like to have a clear error message in place until someone has time to look at paths with spaces.

@vishy1618
Copy link

@vishy1618 vishy1618 commented Feb 11, 2016

I'd like to give this a try, if no one else is working on this.

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Feb 11, 2016

Go for it!

bors-servo added a commit that referenced this issue Feb 12, 2016
Exit mach with an error when building on a path with spaces. Fixes #9442

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9601)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.