Windows 7 Unix Subsystem

Programming, for all ages and all languages.
Post Reply
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Windows 7 Unix Subsystem

Post 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
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: Windows 7 Unix Subsystem

Post 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
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Windows 7 Unix Subsystem

Post 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.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: Windows 7 Unix Subsystem

Post 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
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Windows 7 Unix Subsystem

Post 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.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Windows 7 Unix Subsystem

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
TylerH
Member
Member
Posts: 285
Joined: Tue Apr 13, 2010 8:00 pm
Contact:

Re: Windows 7 Unix Subsystem

Post 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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Windows 7 Unix Subsystem

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: Windows 7 Unix Subsystem

Post 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
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Windows 7 Unix Subsystem

Post 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.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: Windows 7 Unix Subsystem

Post 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
User avatar
Creature
Member
Member
Posts: 548
Joined: Sat Dec 27, 2008 2:34 pm
Location: Belgium

Re: Windows 7 Unix Subsystem

Post 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.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Windows 7 Unix Subsystem

Post by Love4Boobies »

It's not deprecated yet.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Creature
Member
Member
Posts: 548
Joined: Sat Dec 27, 2008 2:34 pm
Location: Belgium

Re: Windows 7 Unix Subsystem

Post 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.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
Post Reply