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

Ubuntu on Windows #954

Closed
kraih opened this issue May 7, 2016 · 10 comments
Closed

Ubuntu on Windows #954

kraih opened this issue May 7, 2016 · 10 comments

Comments

@kraih
Copy link
Member

kraih commented May 7, 2016

Now that Ubuntu on Windows exists and a lot of UNIX features just work, we might want to remove the $^O checks in Mojo::Server::Prefork and Mojo::Server::Hypnotoad.

I imagine it will become the default way to deploy Perl applications on Windows, so we should have good support for it. Here's also an installation guide for those that want to investigate.

@kraih
Copy link
Member Author

kraih commented May 7, 2016

As a first step we are now checking for fork emulation instead of Windows. dc0da0f

@kraih
Copy link
Member Author

kraih commented May 9, 2016

After fighting a little bit with microsoft/WSL#186 i have been able to confirm that Hypnotoad zero downtime software upgrades now work on Windows.

@kraih
Copy link
Member Author

kraih commented May 13, 2016

Looks like there is not much more we can do for now.

@kraih kraih closed this as completed May 13, 2016
@jberger
Copy link
Member

jberger commented May 13, 2016

I think that the biggest thing at this point is making sure that perl itself builds without fork emulation in ubuntu on windows. That of course is beyond our (direct) control. Other than that I don't think we need anymore specific documentation right? It would just follow the standard guides?

@yuki-kimoto
Copy link
Contributor

@kraih

Can you install IO::Socket::IP?

IInstallation of IO::Socket::IP 0.38 fail.

I don't install Mojolicious because I can't install IO::Socket::IP.

Checking dependencies from MYMETA.json ...
Checking if you have IO::Socket 0 ... Yes (1.36)
Checking if you have Socket 1.97 ... Yes (2.009)
Checking if you have Test::More 0.88 ... Yes (0.98)
Building and testing IO-Socket-IP-0.38
Building IO-Socket-IP
t/00use.t ........................... ok
t/01local-client-v4.t ............... ok
t/02local-server-v4.t ............... ok
t/03local-cross-v4.t ................ ok
t/04local-client-v6.t ............... ok
t/05local-server-v6.t ............... ok
t/06local-cross-v6.t ................ ok
t/10args.t .......................... ok
t/11sockopts.t ...................... ok
t/12port-fallback.t ................. ok
t/13addrinfo.t ...................... ok
t/14fileno.t ........................ ok
t/15io-socket.t ..................... ok
t/16v6only.t ........................ ok
t/17gai-flags.t ..................... ok
t/18fdopen.t ........................ ok
t/19no-addrs.t ...................... ok
t/20subclass.t ...................... ok
t/21as-inet.t ....................... ok
t/22timeout.t ....................... ok
t/30nonblocking-connect.t ........... ok

#   Failed test '$socket not yet connected'
#   at t/31nonblocking-connect-internet.t line 38.

#   Failed test '->connect eventually fails with ECONNREFUSED'
#   at t/31nonblocking-connect-internet.t line 92.
#   dollarbang = Transport endpoint is not connected
# Looks like you failed 2 tests of 9.
t/31nonblocking-connect-internet.t ..
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/9 subtests
t/99pod.t ........................... skipped: Test::Pod 1.00 required for testing POD

@jhthorsen
Copy link
Member

@yuki-kimoto: Which perl version do you have? Makefile.PL for Mojolicious says:

IO::Socket::IP 0.37 first shipped with Perl 5.21.11

This means that if you have an earlier version of Perl, then you probably need to report this bug to the author of IO::Socket::IP.

@yuki-kimoto
Copy link
Contributor

OK

@mbeijen
Copy link

mbeijen commented Sep 25, 2016

IO::Socket::IP has one test failing because of the way the network is emulated on Ubuntu on Windows.
You can install IO::Socket::IP for the system perl from the ubuntu repositories:

apt-get install -y libio-socket-ip-perl

but of course that does not change the fact the module test is failing 💃 - so with regards to running Mojolicious on Ubuntu on Windows, ymmv.
This would be more or less the same as skipping the tests, only you get a slightly older version than on CPAN but you get package updates.

@jhthorsen: It is true that IO::Socket::IP is in 'core perl' since 5.22, but you can still install it on older perls from CPAN.

@Tekki
Copy link

Tekki commented Sep 25, 2016

The Perl version included in the Linux Subsystem is 5.18.2, the version of IO::Socket::IP you get from the Ubuntu repo is 0.25. There are still a lot of issues with network connections, expecially with 3rd party firewall solutions. In many cases Bash isn't able to establish a connection, even with firewalls turned off. This may be the reason why the installation from CPAN fails.

@yuki-kimoto
Copy link
Contributor

@mbeijen
@Tekki

thank you. network is not stable in Ubuntu on Windows.

I want to run GitPrep https://github.com/yuki-kimoto/gitprep on Ubuntu on Windows.

Only way to IO::Socket::IP is maybe forcing installation now.

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

No branches or pull requests

6 participants