Notes on installing spin on 64bit Windows 7

CS4021 [email protected]
Notes on installing spin on 64bit Windows 7
1. Download the spin windows distribution pc_spin642.zip, unpack in C:/Spin and rename
spin_64bits.exe to spin.exe. Not sure if there is any difference between spin_32bit.exe and
spin_64bits.exe.
2. Download ActiveTcl Community Edition version 8.4.20 for Windows (64-bit, x64)x64 and unpack
in C:/Tcl.
3. Install Cygwin for 32-bit versions of Windows by running setup-x86.exe. Remember to select Devel
so that the gcc tool chain is installed.
4. Make sure C:/cygwin/bin; C:/Tcl/bin and C:/Spin are in your path
5. Create a desktop shortcut to C:/Spin/ispin
Later versions of Tcl have a problem with the implementation of the gets() function as used by
run_pan() in ispin.tcl. The effect is that the output of the pan verifier is not displayed as it runs. Not
sure how to fix this.
For the verification step, spin automatically generates C code for pan which it compiles and executes.
Spin assumes the VC++ compiler convention that sizeof(long) is always 4, while the cygwin versions of
gcc assume sizeof(long) is 4 or 8 depending on whether it is generating a 32 or 64 bit executable.
Consequently C:/cygwin64/bin/gcc will NOT work and C:/cygwin/bin/gcc must be used. Unfortunately
C:/cygwin/bin/gcc generates a 32bit executable. Could, perhaps be fixed adding a call to sed in ispin.tcl
to change line 7 in the generated pan.h file from
#define G_long 4
to
#define G_long 8
10-Oct-14