Cygwin

Macaulay 2 for Microsoft Windows has been compiled under Cygwin, a system that provides Microsoft Windows with a high degree of compatibility with the GNU operating system (upon which GNU/Linux is based), which you will need in order to run Macaulay 2. Visit http://cygwin.com/ and install it, if you haven't done so already. Administrator privileges are not required, but up to 1GB of free disk space will be required.

After you have installed Cygwin, you should learn how to run programs in a Cygwin shell. Run the Cygwin shell from the start menu or from the icon on the desktop. A window will appear with a prompt in it. In that window you can enter many of the standard unix commands, such as ls, and they will work. One thing that's different about the environment in a cygwin shell is that the directory C:/ is visible only as /cygdrive/c/. Correspondingly, the root directory / of cygwin is visible to Windows programs only as something like C:/cygwin/ (depending on where you installed cygwin); the cygwin command for determining that path is cygpath -w / .

Installation of Cygwin is done with a program called setup.exe. It is possible to use it also to download and install Macaulay 2 from our repository as described in setup.html. That should work, but if not, an alternative is to install it as described in download.html, and then continue with the rest of the instructions on this page.

After downloading and installing Macaulay 2, you may be tempted to run M2.exe immediately, without running it in a cygwin shell. If you try that, you will get an error message about the sharable library cygwin1.dll not being found.

The best way to run Macaulay 2 is in emacs, and the best way to run emacs is under X11. So use cygwin's setup.exe to install emacs-X11. Then, in a cygwin shell, type "startx&" to start X Windows. If an Xterm window pops up, type "emacs&" in it to start emacs running (in a new window of its own). If an Xterm window doesn't pop up, then type "DISPLAY=:0 xterm&" to start one, or type "DISPLAY=:0 emacs&" to start emacs running directly. (Warning: the next time you run the cygwin setup program, it may try to replace emacs by an older version, for some mysterious reason. Watch out for that, and prevent it, if you prefer the recent version.)

Users new to emacs should spend some time becoming accustomed to it. A good place to start learning how to use emacs is with the Emacs Tutorial, which can be accessed after starting emacs.

Note: If you previously installed an older version of Macaulay 2 "manually" by unzipping a tar file, then it is important to move its files out of the way, unless you installed them under "/" or "/usr", where the new files will simply replace them. (In the future, the "setup" program will take care of deleting files from older versions.) Alternatively, if you don't want to (or you can't) move them out of the way, start the new M2 with the command "/usr/bin/M2", and after you get the first input prompt ("i1 = ") evaluate the expression "setup()". That action will modify your various init files so that the new M2 and its files will be found the next time you start a new cygwin shell, within that shell and its descendants.

Here are some current problems with Macaulay 2 running under Cygwin.

Here are some solutions for some common problems that occur when running Cygwin.

Let us know if there are any (further) problems!