Compiling and Installing the Globus Toolkit Software on Windows with Cygwin

Scripts Included:

  • gt5.0.2-patch
    • Globus Toolkit 5.0.2 patch to enable compilation using Cygwin (Dr. Peter Li)
    • script to set up environment for SSO on TeraGrid

This is a brief guide to compiling and installing the Globus Toolkit software on Windows using Cygwin.

I am using Cygwin 2.721 and Globus Toolkit 5.0.2 under Windows Vista 64-bit.

The patches and command line parameters are originally from Dr. Peter Li at the Salk Institute (his original posts can be found here and here).

Installing Necessary Cygwin Packages

You will need the following packages in order to compile the Globus Toolkit:


Devel --> gcc-core
Devel --> gcc-g++
Devel --> gcc4-core
Devel --> gcc4-g++
Devel --> make
Editors --> vim
Net --> OpenSSH
Net --> libopenssl098
Net --> openssl
Text --> less
Utils --> diffutils
Utils --> patch
Web --> wget

For those who do not know, you can install additional packages to your existing Cygwin installation by running the setup program again. To set up Cygwin (and Console2), see these instructions.

Downloading and Patching the Globus Toolkit

Open Cygwin and go to your HOME directory:


Get the latest source tarball (5.0.2, in my case):


If this doesn't work, go to and download it manually.

Unpack it (this will take a bit):

tar -xvf gt5.0.2-all-source-installer.tar.bz2

We need to apply a patch first (written by Dr. Peter Li from the Salk Institute). Normally, I would list the patch in the instructions, but since patch is picky about formatting, I would suggest you just download it here. Alternatively, just use wget:


Once you have the patch, apply it:

patch -i gt5.0.2-patch --verbose -p0

If you see any errors, email me at

Compiling the Globus Toolkit

Now we are ready to compile. BE WARNED: this will take a VERY, VERY, VERY LONG TIME. It took me somewhere around 6 to 8 hours for me to compile this on a respectable laptop.

In either event, we are going to install everything into $HOME/globus, so:

makedir $HOME/globus
cd gt5*-installer
./configure --prefix=$HOME/globus --with-buildopts="-verbose -static=1"
make gsi-myproxy gsi-openssh gridftp

If this should fail near the end, try just recompiling the last one:

make gridftp

If it fails earlier, try again:

make gsi-myproxy gsi-openssh gridftp

If you get conflicts with sys/types.h and winsock.h, try deleting your $HOME/globus folder and trying again:

rm -rf $HOME/globus
make clean
./configure --prefix=$HOME/globus --with-buildopts="-verbose -static=1"
make gsi-myproxy gsi-openssh gridftp

If it still fails, email me at

Finally, add the Globus bin directory to your path:

export PATH=$HOME/globus/bin:$PATH

You can get rid of the source directory and tarball when you're done. The installed software takes about 91MB of space.

Logging In

Let us assume that the Globus Toolkit is installed in $HOME/globus. The following script will set up your environment for logging into TeraGrid sites:


export LD_LIBRARY_PATH=$HOME/globus/lib


echo "Cleaning up old proxy information..."
unset X509_CERT_DIR
unset X509_USER_CERT
unset X509_USER_KEY
unset X509_USER_PROXY

myproxy-logon -T -l $1

export X509_CERT_DIR=$HOME/.globus/certificates
export X509_USER_CERT=`(grid-proxy-info -path)`
export X509_USER_KEY=`(grid-proxy-info -path)`
export X509_USER_PROXY=`(grid-proxy-info -path)`

You can download this script here. To use it, you would call the following with your TeraGrid portal username:

source <username>

After entering your TeraGrid portal password, you should be able to log into any TeraGrid site using gsissh:


Transferring Data

You will also have access to globus-url-copy, so you can do large data transfers using the GridFTP protocol:

export POPLE_HOME=`gsissh 'cd $HOME; pwd'`
export RANGER_HOME=`gsissh 'cd $HOME; pwd'`
globus-url-copy -vb -fast -stripe -tcp-bs 8M -p 8 file://$POPLE_HOME/gaussian/water.cube gsi$RANGER_HOME/water2.cube

Here is an explanation of the parameters:

-vb = display bytes transferred and average performance

-fast = Recommended when using GridFTP servers. Use MODE E for all data transfers, including reusing data channels between list and transfer operations.

-stripe = enable striped transfers on supported servers

-tcp-bs <size> = specifies the size (in bytes) of the TCP buffer to be used by the underlying ftp data channels 8M is a good value, although technically the best is determined by: bandwidth in Megabits per second (Mbs) * RTT in milliseconds (ms) * 1000 / 8 RTT = roundtrip time it takes a packet to get from the source to the destination (use ping to determine this)

-p <count> = specifies the number of parallel data connections that should be used


This document has outlined how to install (and briefly how to use) the Globus Toolkit softare under Windows using Cygwin. If you have any questions or comments, please don't hesitate to contact me at

Last updated December 7, 2010