Bash is coming to Windows!

109 views
Skip to first unread message

Cosimo Lupo

unread,
Mar 31, 2016, 5:52:05 AM3/31/16
to mingwpy
I guess you heard the news:


Just curious to know if you guys think this may have any implications on the work you're doing on mingwpy.

E.g. could it mean in the future we won't need to use MSYS2 to build the mingwpy toolchain?

Cheers

Cosimo

Carl Kleffner

unread,
Mar 31, 2016, 8:43:23 AM3/31/16
to min...@googlegroups.com
It is (will be) available for Windows10 only; today it is just an announcment. It is not a community project. No one can say if this will be a nine-days wonder or more. You can start ELF-binaries from the bash, but it is unclear to me if you can start Windows binaries as well.

This is where msys2 shines: use msys2 (posix) and wi32 binaries from one shell.

Cheers

Carl


--
You received this message because you are subscribed to the Google Groups "mingwpy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mingwpy+u...@googlegroups.com.
To post to this group, send email to min...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mingwpy/5d26fa0b-7a20-4430-9dba-7788a18f6461%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruben De Smet

unread,
Mar 31, 2016, 8:53:06 AM3/31/16
to min...@googlegroups.com
Also: mingwpy will be used some day as a cross compiler. I don't think
Microsoft would offer that.

And nobody says that they will support the "real" mingw on Ubuntu, I'd
rather think they will make their MSVC compiler run on their "Ubuntu".
>> <https://groups.google.com/d/msgid/mingwpy/5d26fa0b-7a20-4430-9dba-7788a18f6461%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .

stone...@gmail.com

unread,
Mar 31, 2016, 2:02:01 PM3/31/16
to mingwpy, ruben....@rubdos.be
Maybe it's just a co-product of their goal to bring docker experience on Windows ?

Ruben De Smet

unread,
Mar 31, 2016, 2:10:14 PM3/31/16
to stone...@gmail.com, mingwpy
On 03/31/2016 08:02 PM, stone...@gmail.com wrote:
> Maybe it's just a co-product of their goal to bring docker experience on
> Windows ?
>

Sounds very probable to me. In any case: mingwpy must go on, albeit just
for a cross compiler ^^

Tony Kelman

unread,
Mar 31, 2016, 2:12:05 PM3/31/16
to mingwpy, ruben....@rubdos.be
Given this uses the Ubuntu repositories, you can just install http://packages.ubuntu.com/search?keywords=mingw-w64 to get a windows-targetting cross compiler. Should work fine, decent chance it would run faster than building things under MSYS2 depending on how much better the Windows Subsystem for Linux's fork implementation is than cygwin's. This is why mingwpy should really endeavor to upstream absolutely everything so that one day it doesn't have to be a fork or special build configuration of mingw-w64, it can just be invoked by a few flags in Python-specific build systems.

You could also package a custom build of mingwpy as an Ubuntu PPA and do things that way. Personally I find opensuse's support for cross compiling, number of already-packaged libraries, and build service for making your own custom personal packages much better than Debian-based distributions, so I'll be trying to run other distributions' user-space programs once I get my hands on this new subsystem.

Ruben De Smet

unread,
Mar 31, 2016, 2:14:10 PM3/31/16
to min...@googlegroups.com, ruben....@rubdos.be
On 03/31/2016 08:12 PM, Tony Kelman wrote:
> You could also package a custom build of mingwpy as an Ubuntu PPA and do
> things that way. Personally I find opensuse's support for cross compiling,
> number of already-packaged libraries, and build service for making your own
> custom personal packages much better than Debian-based distributions, so
> I'll be trying to run other distributions' user-space programs once I get
> my hands on this new subsystem.

Commenting on build systems: I personally use Fedora's cross compilers
in Docker images, and Arch on my personal machine. PKGBUILD is an
awesome way of cross building packages.

Tony Kelman

unread,
Mar 31, 2016, 3:20:28 PM3/31/16
to mingwpy, ruben....@rubdos.be, ruben....@telenet.be
Fedora and Arch aren't bad and have pretty good library selections too. OBS is what really clinches it for me, https://build.opensuse.org/project/show/windows:mingw:win64 is like a github-for-binaries. Automatically fires off rebuilds of all dependent libraries once updated packages are rebuilt, etc. And there's a nice pull-request-like system for proposing patches and version updates for when users get more impatient than maintainers.

stone...@gmail.com

unread,
Apr 2, 2016, 7:28:38 AM4/2/16
to mingwpy, ruben....@rubdos.be, ruben....@telenet.be

Ruben De Smet

unread,
Apr 2, 2016, 8:22:01 AM4/2/16
to stone...@gmail.com, mingwpy, ruben....@rubdos.be
On 04/02/2016 01:28 PM, stone...@gmail.com wrote:
> MS/Linux seems on the horizon:
>
> http://www.zdnet.com/article/head-of-oracle-linux-moves-to-microsoft/#ftag=RSSbaffb68
>

So the head of Oracle moves to Microsoft? Fork all the things! Oh wait.

(Sorry for this post)

carlkl

unread,
Apr 2, 2016, 11:34:54 AM4/2/16
to mingwpy, ruben....@rubdos.be


Am Donnerstag, 31. März 2016 20:12:05 UTC+2 schrieb Tony Kelman:
Given this uses the Ubuntu repositories, you can just install http://packages.ubuntu.com/search?keywords=mingw-w64 to get a windows-targetting cross compiler. Should work fine, decent chance it would run faster than building things under MSYS2 depending on how much better the Windows Subsystem for Linux's fork implementation is than cygwin's. This is why mingwpy should really endeavor to upstream absolutely everything so that one day it doesn't have to be a fork or special build configuration of mingw-w64, it can just be invoked by a few flags in Python-specific build systems.

You could also package a custom build of mingwpy as an Ubuntu PPA and do things that way. Personally I find opensuse's support for cross compiling, number of already-packaged libraries, and build service for making your own custom personal packages much better than Debian-based distributions, so I'll be trying to run other distributions' user-space programs once I get my hands on this new subsystem.

Is there somw advice somewhere how to create and deploy a customized mingwpy PPA? For a first test it might be enough to create and use customized gcc specs.

Carl
 

Big Stone

unread,
Apr 2, 2016, 11:50:18 AM4/2/16
to min...@googlegroups.com
The demo shows a PC which start linux in root mode and a Visual Studio, for a "build" conference.

So at this point we don't know if every Windows10 end-user will be able to have it, and for free.

>> To post to this group, send email to min...@googlegroups.com.
>> To view this discussion on the web visit

--
You received this message because you are subscribed to a topic in the Google Groups "mingwpy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mingwpy/nfMBauBS4v0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mingwpy+u...@googlegroups.com.

To post to this group, send email to min...@googlegroups.com.

Olivier Grisel

unread,
Apr 2, 2016, 11:57:44 AM4/2/16
to mingwpy
This is basically User Mode Linux with the Ubuntu 14.04 user land
binaries + a Windows Kernel / Linux syscall translation layer (kind of
the reverse of Wine). There are more details in this video:

https://channel9.msdn.com/Events/Build/2016/P488

In practice it means that manylinux1 wheels should work on Windows via
the shipped Ubuntu Python.

Right now it seems to be only available in preview for registered
microsoft developers but I think the BUILD announcement stated that it
should be available on via the windows store this summer for all
windows 10 users.

I wonder if stuff like numpy.memmap would work though. In the video
they say that fork works but I wonder if they respect the copy on
write semantics. I remember I encountered sever bugs with numpy
mmap_mode='c' on large arrays under Windows in the past. Anyways,
it's an interesting development but it would still be great to have a
full working gcc/g++/gfortain toolchain for the native windows runtime
environment.

--
Olivier

Tony Kelman

unread,
Apr 2, 2016, 5:25:15 PM4/2/16
to mingwpy
Last time I modified a PPA myself was a year and a half ago, so I don't remember many of the details. You can download the sources and build deps via apt, either starting from the existing ubuntu mingw-w64 cross compilers or someone else's ppa such as https://launchpad.net/~tobydox/+archive/ubuntu/mingw-x-trusty

After making source modifications and rebuilding locally, you have to gpg sign and upload to launchpad which should have guides you can find. Modifying the default package means I think your ppa would overwrite the existing locations which might not be ideal. The tobydox build is set up to install under /opt somewhere IIRC so it's separate.

stone...@gmail.com

unread,
Apr 3, 2016, 3:22:25 PM4/3/16
to mingwpy

carlkl

unread,
Apr 4, 2016, 3:34:00 AM4/4/16
to mingwpy, stone...@gmail.com
quote:

Third, note that Bash and Linux tools cannot interact with Windows applications and tools, and vice-versa. So you won’t be able to run Notepad from Bash, or run Ruby in Bash from PowerShell.

Carl

Olivier Grisel

unread,
Apr 4, 2016, 3:55:28 AM4/4/16
to mingwpy, stone...@gmail.com
2016-04-04 9:34 GMT+02:00 carlkl <cmkle...@gmail.com>:
> quote:
>
> Third, note that Bash and Linux tools cannot interact with Windows
> applications and tools, and vice-versa. So you won’t be able to run Notepad

That's really too bad ;)

--
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

Tony Kelman

unread,
Apr 4, 2016, 9:27:16 PM4/4/16
to mingwpy
That just means they haven't written a "cygstart" style launcher yet. Hopefully that'll be possible. Regardless, as long as the system calls that the cross-compilers need are implemented (don't see how they'd be any different than the system calls needed by a Linux-to-Linux compiler) you should still be able to build libraries and executables. You just have to switch to a Windows shell to run tests. (Unless you feel like installing Ubuntu's Wine, because nothing says Fun like trying to round-trip through compatibility layers that translate in opposite directions.)
Reply all
Reply to author
Forward
0 new messages