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 10 support for junixsocket #40

Closed
vbachurin opened this issue Jul 10, 2017 · 8 comments
Closed

Windows 10 support for junixsocket #40

vbachurin opened this issue Jul 10, 2017 · 8 comments
Assignees
Labels
enhancement A request to enhance the current functionality verify The issue is considered fixed/done, and reassigned to the originator to verify.
Milestone

Comments

@vbachurin
Copy link

Duplicate of this.

Hi,

I have started using Docker for Windows Beta and trying to build a Docker image on my Windows machine using gradle.
It used to be fine on Linux, but on Windows 10 I get the following exception:

Operating System not officially supported by junixsocket: Windows 10
java.lang.UnsatisfiedLinkError: Could not find library in classpath, tried: [libjunixsocket-windows10-1.8-amd64.so, libjunixsocket-windows10-1.5-amd64.so]

Is there a chance to have junitsocket support Windows?
Because with Docker for Windows more and more developers will switch to Windows.

Thanks in advance.

@gesellix
Copy link
Contributor

As far as I know there won't be a chance to make Unix sockets work on Windows. Windows knows a concept of named pipes, similar, but not interoperable to Unix sockets. Consequently, junixsocket wouldn't be the correct library on Windows.

@gesellix
Copy link
Contributor

How do you connect from Gradle to Docker?

@vbachurin
Copy link
Author

Thanks for your response!
Answering your question, com.bmuschko:gradle-docker-plugin
https://github.com/bmuschko/gradle-docker-plugin

@gesellix
Copy link
Contributor

Since the bmuschko/gradle-docker-plugin uses docker-java internally, I suggest you to follow the existing issue at docker-java/docker-java#765 - maybe you could leave a note there to increase awareness.

@kohlschuetter
Copy link
Member

Time flies!

AF_UNIX is now available on Windows 10. https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/

However, I do not have the resources to actively work on supporting this platform. Feel free to provide a pull request.

@kohlschuetter
Copy link
Member

kohlschuetter commented Feb 17, 2019

Look what happened. With cross-compilation support introduced in junixsocket 2.2, we can now support junixsocket on Windows 10! (It required some effort, but not as much as anticipated)

Please download junixsocket 2.2.0 and verify :)

@kohlschuetter kohlschuetter reopened this Feb 17, 2019
@kohlschuetter kohlschuetter added enhancement A request to enhance the current functionality verify The issue is considered fixed/done, and reassigned to the originator to verify. and removed wontfix labels Feb 17, 2019
@kohlschuetter kohlschuetter added this to the 2.2 milestone Feb 17, 2019
@gesellix
Copy link
Contributor

gesellix commented Feb 18, 2019

Regarding AF_UNIX on Windows for Docker clients there's now moby/moby#36442 the next step to be resolved (and a whole rabbit hole with Golang support, etc.) ;)
... nevertheless thanks for adding Windows support to junixsocket!

@kohlschuetter kohlschuetter changed the title Operating System not officially supported by junixsocket: Windows 10 Operating System not officially supported by junixsocket: Windows 10 (Update: now supported) Feb 19, 2019
@kohlschuetter kohlschuetter changed the title Operating System not officially supported by junixsocket: Windows 10 (Update: now supported) Windows 10 support for junixsocket Feb 19, 2019
@Poddster
Copy link

Hi @kohlschuetter

Thanks for adding Windows 10 support. I was having some issues using it with another C program, and so was inspecting the C code for org_newsclub_net_unix_NativeUnixSocket.c and noticed something unusual:

The #ifdef referenced here has an else here and an endif here at the bottom of the function.

Is that intentional?

The reason I ask is that there's multiple #ifdef _WIN32 inside that else block, which makes it seem like you expect those parts of the code to be compiled on windows (e.g. avoiding the stat and chmod)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A request to enhance the current functionality verify The issue is considered fixed/done, and reassigned to the originator to verify.
Projects
None yet
Development

No branches or pull requests

4 participants