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 Errors - Windows OS #4815

Closed
kat-coding opened this issue Apr 27, 2023 · 9 comments
Closed

Build Errors - Windows OS #4815

kat-coding opened this issue Apr 27, 2023 · 9 comments

Comments

@kat-coding
Copy link
Contributor

Observed behavior

When building the project I am getting multiple errors and the build fails.

Steps to reproduce

Rust Version: 1.68.2
Ockam Version: "0.84.0"
Windows 11

Screenshot 2023-04-27 144157

Expected behavior

Successful Build

@mrinalwadhwa
Copy link
Member

@kat-coding thank you for reporting that.

@mrinalwadhwa
Copy link
Member

All these errors are in the unix domain sockets (UDS) transport.
https://github.com/build-trust/ockam/tree/develop/implementations/rust/ockam/ockam_transport_uds

UDS is not available on windows should we need to make it so that the UDS transport is only compiled when compiling of unix targets. @etorreborre thoughts on what the change here should be?

@tensor-programming
Copy link

tensor-programming commented May 18, 2023

Been following this thread, support for Unix domain sockets was introduced in Windows 10 and It became generally available in version 1809. You could conditionally compile out the UDS transport for windows or use something like the azure tokio-uds-windows library to get it working. The library in question hasn't been touched in 5 years, but it doesn't look all that difficult to bring it up to date. After skimming through the library, updating the dependencies would also require updating the underlying azure mio-uds-windows library too. Most of the changes are just interface changes for miow and tokio.

@mrinalwadhwa
Copy link
Member

@tensor-programming thank you, super helpful context.

@tensor-programming
Copy link

tensor-programming commented May 19, 2023

If its alright with you guys, I might take some time this weekend to build a PR on this issue. My main work station is windows and I am curious about the windows UDS API in the rust ecosystem.

@mrinalwadhwa
Copy link
Member

That sounds awesome. Let us know if you have any questions that we can help with as you explore.

@tensor-programming
Copy link

will do, thanks.

@tensor-programming
Copy link

tensor-programming commented May 25, 2023

I started working on this finally (had a bit of a personal issue to deal with this weekend), and I've hit a bit of a snag when implementing the tokio side of things. For setting up the required listeners and streams, I need access to the PollEvented type in Tokio but that was made private after version 0.3 (I would assume this is why Azure didn't keep their libraries up to date). According to this issue, someone is working on a official windows implementation for both Mio and Tokio. I am going to see if I can help them and speed things up given that the alternative is to either use out of date libraries or to use a custom interface that will eventually be superseded by their solution. From the bit of research I've done, seems like there is some considerations for adding windows UDS support to the rust std library eventually to have parity with the os::unix libraries which would further increase the viability of this solution.

We could temporarily choose not to compile the UDS stack on windows until the Tokio patch is settled and at the very least, that would settle the other windows issue; #2250.

Edit: I have made a variant that does compile on windows. I had to ignore UDS and also add some windows specific logic into the ockam_api library for killing processes. The build will also have to ignore the two rust examples that use the UDS logic as well. Apart from that, the test suite turns up all green. Ill clean it up before I make a PR next week.

@tensor-programming
Copy link

Sorry, I had some personal issues that made me fall off the map for a few months. Ill take a look again tomorrow and see if I can turn something in so that at the very least things will compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants