Saturday, February 2, 2008

Compiling (relatively) simple programs under SFU

Microsoft Services for Unix (SFU) provides a basic Unix-like environment under Windows and is useful for many things. It allows you to use things like *nix shell scripts and many *nix utilities under Windows.

For the instructions posted below, I assume that you already have a working bash installation. See this post as well as this information (the last link is the newer information) to get a working bash version installed. You may need to disable DEP from boot.ini in order to get bash running.

The steps that I took before attempting to install any packages:
  • Installed Interop System's installer and bash
  • Installed the GNU SDK from the SFU installer
  • Installed the following development-related packages: (everything on this list might not be needed)
    • autoconf
    • automake
    • c89
    • gmake
    • install
    • m4-gnu
  • Renamed /bin/sh and replaced it with a symbolic link to /usr/local/bash (configure scripts usually crashed with a NT exception on the standard sh (ksh IIRC))
Once sh is replaced with bash, configure scripts run fine (assuming you're not attempting to build large, complex programs with several dependencies)

Using the normal "./configure", followed by "make && make install" procedure I have successfully compiled and installed the following applications:
  • sarg
  • nano
It is also possible to run Gentoo under SFU, which should provide a nice package manager that automates compilation. Gentoo under Interix (The name of SFU's Unix) was originally a April's fool joke. However, according to this page in Gentoowiki it appears to be possible. A HOWTO can be found here.

No comments:

Post a Comment