Installing MSYS-MinGW

Jump to: navigation, search

Friggin CowInstructions for setting up Minimalist GNU for Windows along with Minimal SYStem.

Links for Downloads

Step 1 (MSYS Base System)

  • Extract msysCORE-1.0.11-bin.tar.gz or Install MSYS-1.0.11.exe.
    • If using tar.gz, delete the \postinstall directory. And would be preferable to extract to "C:\msys\1.0".
    • If using installer, select No when asked to run post install script.
  • Rename "etc\fstab.sample" to "etc\fstab". Edit the following lines so they point to the correct paths:
c:/mingw		/mingw

Should be changed to something like

C:/msys/1.0/mingw	/mingw

Step 1.5 (Update MSYS CORE)


  • Delete the \postinstall directory.
  • This can not be done while running MSYS. This update should not be necessary to run most MSYS components, and it really only updates 3 primary files: msys-1.0.dll, msysmnt.exe, ps.exe.
  • To extract .tar.lzma you can use 7zip.

Step 2 (Required Script Components)

  • Extract/Install the following packages to "msys\1.0\mingw\bin". The utilities must be placed directly in this path, not a subdirectory of it.
wget 1.11.4
7zip 4.65 CLI

Step 3 (The Script)

  • Start msys.bat.

Note: if it give an error message and does not display a command window you will need to do the following: 1. create a shortcut to msys.bat by right-clicking on the icon and selecting creat shortcut. 2. right click on the shortcut and choose "Properties" 3. change the field labelled "Start in:" to the correct bin folder, like "C:\msys\1.0\bin". 4. start msys.bat - should display a window now.--Dragon 02:00, 9 January 2011 (UTC)

You may notice it looks a bit different from past versions, besides just the colors. The MSYS devs decided to start using Windows' native terminal, cmd, for the MSYS environment for various development related reasons. This script will modify msys.bat to use rxvt by default. If you aren't programming and developing applications this should have no real effect on you. Just be aware you can switch between the two with the parameters --rxvt or --norxvt (or change the default behavior back).

  • Download to your home directory by typing (or whatever method you choose):

Note: Jan 8 2001: wget reported: "libiconv-1.13.1-2-msys-1.0.13-bin.tar.lzma did not download correctly, the scrip t variables may be out of date." and "WARNING: File does not exist to extract. /home/dragon/msys_mingw_components/libiconv-1.13.1-2-msys-1.0.13-bin.tar.lzma ./ line 326: tar: command not found". Everythen else ok - did not seem to be a problem. --Dragon 02:03, 9 January 2011 (UTC)

  • Next begin the script by typing:

The script will first download all the components with wget (which is approximately 82MB of packages). This will take awhile. After this a "hit any key" prompt will appear, this is the only prompt in the script. After you hit "any key" the components will be extracted, renamed, edited, patched, and installed as necessary.

  • When the script is complete there are still two important steps you must manually perform.
    • First: Assure the paths in /etc/fstab are correct to where you installed msys/mingw. The /etc/fstab file will be displayed as the second to last thing in the script. If the paths look correct you have nothing to do, otherwise correct them as necessary.
    • Second: You will see instructions to copy some files from your Windows TEMP directory to the "msys\1.0" directory. If you type:
echo $TEMP

You can find the TEMP directory on your machine, capitalization of this variable is important. There should be two dirs to copy: /bin and /share. This will be for updating BASH, which is in use so long as MSYS is running. So you must first exit the shell and then copy the files manually. You will need to exit the shell for the other modifications to take place as well anyways.

  • YOU ARE DONE! n_n

List of Components Downloaded in Script

MinGW x86 Required Components

  • binutils-2.20.51-1-mingw32
  • mingwrt-3.18-mingw32
  • w32api-3.15-1-mingw32
  • make-3.82-3-mingw32
  • gcc-4.5.1-tdm-1-core (SJLJ)
  • gcc-4.5.1-tdm-1-c++ (SJLJ)
  • gcc-4.5.1-tdm-1-openmp (SJLJ)

MSYS/MinGW Components

  • Just read the script

Installed to MinGW

  • dx7headers
  • glib_2.24.0-2
  • nasm-2.09.01
  • pkg-config_0.23-3
  • unrarw32-3.91
  • yasm-1.1.0


  • mingwrt-3.18-mingw32_file64.diff (largefile support)

Problematic Components

  • MSYS rxvt (initiallly tested and had some segfaults with all kinds of weird win32 video corruption in _other windows_, rxvt-

Optional Things

  • msysgit (you will need to manually move the files, merging their msys with yours will be BAD).

Further Notes


  • 2010-09-07: Updated everything mingw/msys'ish. TDM 4.5.1 builds, newer nasm/yasm/etc. Does not include svn/git.
  • 2010-04-30: Updated glib_2.24.0-2, yasm-1.0.0_win32.
  • 2010-03-31: Updated msysCORE-1.0.14-1, mingwrt-3.18-mingw32, binutils-2.20.1-2-mingw32, xz-4.999.9beta_20091209-1-msys, glib_2.22.5-1_win32, nasm-2.08.01-win32, unrarw32-3.9.1, Git- Also a fix for msys.bat (with msvc inclusion) on x64 Windows.
  • 2009-12-04: Updated to mingwrt-3.17
  • 2009-12-03: Huge update from all the mingw naming changes and separation of packages (ohlol this is fun)

Fully premade MinGW+MSYS environment (with git) which use the instructions above. Remember to modify the mount paths in /etc/fstab if you do not extract directly to the C:\ drive.


If any of the above seems incorrect, edit the wiki. Or harass me. This guide should work perfectly if the exact versions mentioned are used, I've done it many times compiling mplayer with dependencies (which is alot of stuff).