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

Vagrantfile has invalid names for Windows #15

Closed
kamaroyl opened this issue Aug 7, 2020 · 11 comments · Fixed by #16
Closed

Vagrantfile has invalid names for Windows #15

kamaroyl opened this issue Aug 7, 2020 · 11 comments · Fixed by #16
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kamaroyl
Copy link
Contributor

kamaroyl commented Aug 7, 2020

Installing the sandbox on windows, vagrant up results in a fatal error due to the use of : in the filename. Should use a delimiting character that doesn't cause issues in Windows

@drunkirishcoder drunkirishcoder added good first issue Good for newcomers help wanted Extra attention is needed labels Aug 7, 2020
@drunkirishcoder
Copy link
Contributor

thank you for bringing this to our attention! we couldn't test this on a Windows machine and didn't realize that would be a problem.

@kamaroyl
Copy link
Contributor Author

No problem, in the short term, I have just removed the prefix. I have run into some other issues, but I'm not sure if they are relevant to capsule.
Do you all have a preference for the naming scheme for the vagrant box names? It appears - is allowed, the fix could just be to replace : with -; https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

@zeeshanlakhani
Copy link
Member

@kamaroyl def. let us know what else you run into. If that's the fix, that's super easy, and we'd accept the pr :).

@kamaroyl
Copy link
Contributor Author

So, issues thusfar in my windows playground:

  • Windows virtualization seems to run into issues on update/upgrade, and may require a reinstallation/repair of virtual box :(
  • Some issue with dpkg; had to manually run sudo dpkg --configure -a and apt-get install -y linux-headers-uname -r dkms
  • Silliness with permissions around /var/run/docker.sock
  • zlib not present in docker container which causes cargo to fail

@zeeshanlakhani
Copy link
Member

@kamaroyl thanks for this.

After these steps, did things work? And, to be sure, Docker for Windows is what you're using here, yeah? What Windows and VB versions? If you're down to help on this with me, we can probably even get a github action running that will build the container, run it, and run the test suite on a Windows VM (not necessarily testing the vagrant issue you first mentioned, but we can fix that anyhow). Let me know. We can talk on the discord too!

@kamaroyl
Copy link
Contributor Author

Hey @zeeshanlakhani
A) seems to be just common on Windows virtual box; I was digging through posts from 2015 - 2020 with similar behaviors
C) It was that exact issue, though, running as root I wouldn't have expected that issue? chmod-ing to 6
D) Looking a bit closer at the issue, it might be something with the version of rustc on the box? (rust-lang/cargo#8258, version installed is rustc 1.43.0 (4fb7144ed 2020-04-20) Looks like the git issue was fixed in June https://github.com/rust-lang/cargo/issues/8258). For whatever reason, rustup is having issues with versions later than 1.43.0; trying to install later versions.

After looking at this with fresh eyes this morning, I'm wondering if most of these errors aren't caused by network instability in VB. Seems like VB gets its network cut out from under it; I'm seeing inconsistent check sum failures on different files when trying to install a later version of rust.

I don't currently have the entire setup working unfortunately, hoping if I can get past this cargo issue I can try and run the testsuite. Windows version could definitely be a problem; I'm on Windows 10 Home Insider Preview Build 20197.rs_prerelease.200818-1420;
VB is 6.1.12 r139181

@zeeshanlakhani
Copy link
Member

@kamaroyl cool. For A and C, seemingly we should have a Windows section in the README. Let's discuss what it may look like once you're all up and running.

For D, I can update the rust container to a newer version, if one works. So, let me know if the most recent does: 1.45. You should be able to just take the docker.mk and change where we pull from via this version: https://github.com/capsule-rs/sandbox/blob/master/docker.mk#L14.

VB is a pain, but is most generic sadly.

@kamaroyl
Copy link
Contributor Author

Okay, so, I blew away the Windows Insider box and rebuilt it; now running Windows Pro 10.0.19041 Build 19041 with virtualization enabled. It's been much smoother this time. I did run into an issue running vagrant up
VagrantUp.log

The container was a bit more work; ran into quite a few seg faults. Ended up having to update a bunch of packages and upgrade rust to stable (1.45.2), but I finally got tests to run 🎉🎉🎉

@zeeshanlakhani
Copy link
Member

@kamaroyl dope! It's possible we need a round of updates, and can test that works across distros (and vagrant formatting as you mentioned). Yay to hear. I'll do a PR to update the Rust container version we use first.

@kamaroyl
Copy link
Contributor Author

@zeeshanlakhani It's kinda wild when you start getting linker segfaults
LinkerSegfault.log

@zeeshanlakhani
Copy link
Member

@kamaroyl not surprising. It may be an issue in our build.rs with what modules we can load wrt to the underlying windows host, but I'll check it with Rust 1.45.2 as well. We'll probably need a compilation flag for windows builds specifically. Here's what I'm referring to: https://github.com/capsule-rs/capsule/blob/master/ffi/build.rs#L25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Development

Successfully merging a pull request may close this issue.

3 participants