Page 1 of 1

Windows 7 Unix Subsystem

Posted: Sun Jan 29, 2012 4:08 pm
by FallenAvatar
Has anyone played with this?

I am downloading and about to see if I can get gcc/ld/nasm/etc. working on it. And will report back if it works.

But I was wondering if anyone already has tried this and could share their experiences?

- Monk

Re: Windows 7 Unix Subsystem

Posted: Sun Jan 29, 2012 4:37 pm
by FallenAvatar
Just got this setup and installed.

Good things:
- gcc, g++, binutils, make are installed
- It is case sensitive
- With an option, can be fully POSIX compliant

Bad things:
- gcc/g++ are version 3.3
- binutils is version 2.13 (Not sure how old this really is, newest is 2.22)
- Uses korn instead of bash
- Is not fully POSIX compliant by default


Going to see if I can dl and compile a new version of binutils and gcc, and get nasm up and running...

- Monk

Re: Windows 7 Unix Subsystem

Posted: Sun Jan 29, 2012 4:44 pm
by Brynet-Inc
ksh is not a bad thing, also the version of the installed binutils/gcc is irrelevant because you should be creating a cross-compiler.

Re: Windows 7 Unix Subsystem

Posted: Sun Jan 29, 2012 6:09 pm
by FallenAvatar
Brynet-Inc wrote:ksh is not a bad thing, also the version of the installed binutils/gcc is irrelevant because you should be creating a cross-compiler.
I've never used ksh, so I will take your word on it. (It does seem to be fine for me, just playing with it a little bit)

And while a cross-compiler is pretty much a requirement, considering how recently Windows 7 came out, I was hoping the versions of binutils and gcc would be more up to date.

I'll try to get my OS copied from my linux dev machine, and compiling on this Windows box, and see how it goes.

- Monk

Re: Windows 7 Unix Subsystem

Posted: Sun Jan 29, 2012 7:41 pm
by Brynet-Inc
An OS isn't an OS until it has a port of ksh, I myself prefer OpenBSD's pdksh.

Honestly, I doubt this subsystem is very high priority, Microsoft's "SFU/SUA" was originally done by a 3rd party.. I imagine quite a lot of it isn't actively maintained.

The latest versions of many GNU programs, like binutils/gcc/bash, are under the GPLv3. For a lot of commercial and some permissively licensed systems, the license revisions are no longer suitable for inclusion as part of the base sets. A lot of systems "fork" a specific version of GNU utilities and maintain their own patches.

As an example, OpenBSD uses gcc 2.x/3x/4.2.1 depending on the platform, they have all been customized considerably, incorporating bug fixes and writing others independently.

It isn't unusual, a lot of embedded platform SDK's also use forks of earlier versions.

If you plan on compiling stuff in this environment, you're probably going to have to work a lot of stuff out for yourself.

Re: Windows 7 Unix Subsystem

Posted: Sun Jan 29, 2012 8:49 pm
by Love4Boobies
SUA, the POSIX subsystem, is developed independently of Windows. So the fact that Windows 7 came out recently doesn't mean anything as far as SUA is concerned.

Re: Windows 7 Unix Subsystem

Posted: Sun Jan 29, 2012 10:32 pm
by TylerH
tjmonk15 wrote:Just got this setup and installed.

Good things:
- gcc, g++, binutils, make are installed
- It is case sensitive
- With an option, can be fully POSIX compliant

Bad things:
- gcc/g++ are version 3.3
- binutils is version 2.13 (Not sure how old this really is, newest is 2.22)
- Uses korn instead of bash
- Is not fully POSIX compliant by default


Going to see if I can dl and compile a new version of binutils and gcc, and get nasm up and running...

- Monk
Unfortunately, as of 4.6.2, Interix has been obsoleted (deleted from GCC). You might be better off with Cygwin.

Re: Windows 7 Unix Subsystem

Posted: Sun Jan 29, 2012 11:29 pm
by Love4Boobies
The SUA target has been removed from GCC 4.6; however, it can still be used as a host. I'm guessing he's going to use his compiler for OS development (i.e., a cross-compiler, not a native compiler targeting UNIX with the Windows ABI). Similarly, no one uses the Cygwin target to develop an OS.

Re: Windows 7 Unix Subsystem

Posted: Mon Jan 30, 2012 1:47 am
by FallenAvatar
Yes, this is an attempt for a host environment. I am a huge fan of VS, and would love to use it for development, but the trick is getting a stable compiler/linker. I finally decided to try this as a build environment. I will keep report anything I find, as I go through this process.

I guess the licensing issues are the reason for the version that is available. I didn't realize the Unix subsystem was a 3rd party environment. But given that, shouldn't the licensing not be an issue?

- Monk

Re: Windows 7 Unix Subsystem

Posted: Mon Jan 30, 2012 2:26 am
by Brynet-Inc
tjmonk15 wrote:I guess the licensing issues are the reason for the version that is available. I didn't realize the Unix subsystem was a 3rd party environment. But given that, shouldn't the licensing not be an issue?
It was developed by a 3rd party and later acquired by Microsoft, it's likely maintained by a very small group of people.

Re: Windows 7 Unix Subsystem

Posted: Mon Jan 30, 2012 2:37 am
by FallenAvatar
Ahhh, that makes sense.

I will continue to expirement, and see if I can get a cross compiler up and running, get this system to work for osdev ;-)

- Monk

Re: Windows 7 Unix Subsystem

Posted: Mon Jan 30, 2012 8:09 am
by Creature
I think it's best to just stick to the standard tools for these kind of things, since it's deprecated (already). It may have been a good initiative however, I've seldom seen make execute as fast on Windows as it does under SUA.

Re: Windows 7 Unix Subsystem

Posted: Mon Jan 30, 2012 10:23 am
by Love4Boobies
It's not deprecated yet.

Re: Windows 7 Unix Subsystem

Posted: Tue Jan 31, 2012 11:35 am
by Creature
Love4Boobies wrote:It's not deprecated yet.
It will be ( starting with Windows 8 ). Proof: after booting up Windows 8, go to Programs and Features -> Turn Windows features on or off. Scroll down to "Subsystem for UNIX-based Applications", you'll read: "Subsystem for UNIX-based Applications (deprecated)", I recently noticed it while trying out Windows 8. Though no one is telling you to upgrade or stop using it, of course.