Difference between revisions of "Slicer3:Build Instructions Windows"

From Slicer Wiki
Jump to: navigation, search
 
(58 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
Note: this process can take several hours to complete.
 
Note: this process can take several hours to complete.
  
* Prerequisites:
+
===Installing Cygwin===
** Windows XP or Vista
 
** Fast network connection
 
** About 10G free disk space
 
** Fast CPU and Disk
 
 
 
'''Installing Cygwin'''
 
  
 
Go to the following [http://www.cygwin.com/setup.exe web page]
 
Go to the following [http://www.cygwin.com/setup.exe web page]
Line 31: Line 25:
 
* curl
 
* curl
 
* cvs
 
* cvs
 +
* git
 +
* subversion
 
* tcltk
 
* tcltk
* subversion
 
 
* unzip
 
* unzip
 +
* zip
  
 
For each of these packages, click on 'Skip' so that a version number appears.  After you have clicked on all of the above packages, click 'Next'.
 
For each of these packages, click on 'Skip' so that a version number appears.  After you have clicked on all of the above packages, click 'Next'.
Line 43: Line 39:
 
You should now have an icon on your desktop that looks like a black C with a green arrow.  Double click the icon to start Cygwin.
 
You should now have an icon on your desktop that looks like a black C with a green arrow.  Double click the icon to start Cygwin.
  
'''Installing Microsoft Visual Studio Express'''
+
===Installing Microsoft Visual Studio Express===
  
 
Go to the following [http://www.microsoft.com/express/download webpage].   
 
Go to the following [http://www.microsoft.com/express/download webpage].   
Line 65: Line 61:
 
When the Setup Complete window appears, click 'Exit'. You will now have to restart your computer to finish the installation.  
 
When the Setup Complete window appears, click 'Exit'. You will now have to restart your computer to finish the installation.  
  
'''Building Slicer'''
+
=== Open cygwin terminal window ===
 +
 
 +
Double-click on the Cygwin icon on your desktop to open a Cygwin shell.
  
After your computer reboots, double-click on the Cygwin icon on your desktop to open a Cygwin shell.
+
For Windows Vista and Windows 7: With the default user access control settings Slicer compilation fails. To build Slicer on these operating systems you have to open the cygwin shell with elevated permissions, using one of these methods:
 +
* Option 1 (recommended, simplest): Run cygwin shell as an administrator: Right-click on the Cygwin icon (or cygwin.bat) and select ''Run as Administrator''. Click on ''Yes'' if the User Access Control popup is displayed.
 +
* Option 2 (recommended, more complex to set up, but then simple to use): Run the build process in a cygwin shell that has Administrator rights.  See this page for instructions: http://www.lamnk.com/blog/computer/run-cygwin-on-vista-as-administrator/
 +
* Option 3 (complex, not recommended): Run cygwin xterm as administrator. Go to *\Cygwin\bin (for new installs; old installs it will be in *\Cygwin\usr\X11R6\bin). Right-click on "xterm" and select "Run as administrator". A wrapper script may be needed to run xterm with correct DISPLAY, see [[Slicer3:xterm wrapper]]. Confirm Run-as.
 +
* Option 3 (unsafe, not recommended): Completely disable UAC. Go to Control Panel->User Accounts->"Turn User Account Control on or off" (see [http://groups.google.com/group/microsoft.public.win32.programmer.networks/browse_thread/thread/46f076a851255a95 forum posting]). Note that disabling UAC makes your computer more vulnerable to malware attacks.
 +
* Option 4 (just an idea, it is not known to work): Change CMake and/or getbuildtest to use a known-writable TMP and TEMP directory (within the Slicer build tree?).
  
Type the following command at the Cygwin prompt:
+
===Building Slicer===
 +
 
 +
Type the following command at the Cygwin terminal window:
  
 
  svn co http://svn.slicer.org/Slicer3/trunk Slicer3
 
  svn co http://svn.slicer.org/Slicer3/trunk Slicer3
Line 77: Line 82:
 
  ./Slicer3/Scripts/getbuildtest.tcl
 
  ./Slicer3/Scripts/getbuildtest.tcl
  
This will fail, but will set up a mostly correct directory structure. Type:
+
===Troubleshooting===
 +
 
 +
====Problems with Python compilation====
 +
 
 +
Python can only be built on Visual Studio 9 (2008) for windows. Python compilation shall be disabled if Slicer is built with an earlier Visual Studio version (otherwise Python compilation fails and Slicer build is not completed).  The disabling is automatically done in Slicer 3.5 versions after January 20, 2010. To compile an earlier Slicer version with a compiler other than Visual Studio 9 the following shall be performed to disable Python usage:
 +
 
 +
Edit the file
 +
 
 +
./Slicer3/slicer_variables.tcl
 +
 
 +
<pre>
 +
# getbuildtest Option for build using system Python, should be "true" or "false"
 +
set ::USE_SYSTEM_PYTHON "false"
 +
# CMake option for Python, must be "OFF" on "ON", default is "ON"
 +
set ::USE_PYTHON "ON"
  
rm -rf Slicer3-lib/CMake-build
+
# CMake option for numerical Python, only matters if Python is on
 +
set ::USE_NUMPY "ON"
 +
# getbuildtest option for SCIPY - also build support libraries (blas and lapack) needed for scipy
 +
# - should be off except for experimentation (does not work on all plaftorms - requires fortran)
 +
# - should be "true" or "false"
 +
set ::USE_SCIPY "false"
 +
</pre>
  
Go to the following [http://www.cmake.org/files/vCVS/cmake-2.7.20080410-win32-x86.exe webpage]
+
and set USE_PYTHON to "OFF".
  
When prompted whether to run or save the program, click 'Run', and then 'Run' again when you see the security warning. Minimize your browser window so you can see the CMake 2.7 Setup window.  Click 'Next', 'I Agree'.
+
Python compilation is disabled by default for Windows 7 systems, because Slicer build has to be restarted several times to successfully complete. If you need Python then modify slicer_variables.tcl and start the build multiple times. Long term solution will be to compile Python with CMake (work in progress).
  
Select 'Do not add CMake to the system PATH' and click 'Next'
+
====Problems with svn checkout during build====
  
Set destination folder to:
+
Sometimes svn or cvs checkout or the CMake configuration process fails. As a workaround, run getbuildtest with the --update option a few times, until all the libraries are completely checked out and built. On Windows 7 all anti-virus and search indexing software are turned off and usually at least one retry is needed.
  
C:\cygwin\home\username\Slicer3-lib\CMake-build and click 'Next'
+
This hint was contributed by Wolfgang Schramm, [http://massmail.spl.harvard.edu/pipermail/slicer-devel/2009/003229.html see his original post on slicer-devel list]
  
Leave the default Start Menu Folder, and click 'Install'  When the installation finishes, go back to your Cygwin window.
+
<pre>
 +
[A problem can be] caused by an incomplete checkout of the VTK (and
 +
ITK, KWWIDGETS,...) libraries. This bug is not reproducible (at least I'm
 +
the only one I knew who had this problem).
 +
I have the following workaround:
  
Now, type:
+
1) Install TortoiseCVS
 +
2) Do a complete slicer build and let it fail.
 +
3) Do a CVS update on EVERY library which is under CVS (SVN checkouts work
 +
fine) - be careful with Batchmake since this is not only one cvs projects
 +
but several.
 +
4) Build as described by the wiki.
  
  ./Slicer3/Scripts/getbuildtest.tcl
+
</pre>
 +
 
 +
====Multiple compilers are installed and Slicer chooses a wrong one====
 +
 
 +
If you have multiple Visual Studio compiler versions installed on the same computer and you want to use a different compiler than the one that Slicer automatically detected, then comment out the lines in the slicer_variables file for the VS you don't want to use.
 +
 
 +
 
 +
====No SLN files created for VTK, ITK, KWWidgets, or other libraries ====
 +
 
 +
'''cvs [checkout aborted]: cannot rename file CVS/Entries.Backup to CVS/Entries: permission denied'''
 +
 
 +
These are also problems with cvs checkout.  Try disabling the on-demand scan of Windows Security Essentials (or other anti-virus). This solved the problem for me on Windows 7. -Greg Sharp, Nov 24, 2009.
 +
 
 +
There are many reports on SVN checkout problems when search indexing or anti-virus software is running on Windows 7 (http://social.technet.microsoft.com/Forums/en/w7itprogeneral/thread/df935a52-a0a9-4f67-ac82-bc39e0585148). Disable search indexing on the Slicer build directories and during the compilation temporarily disable real-time anti-virus protection.
 +
 
 +
====Existing files with long names cannot be found during compilation with Visual Studio 8====
 +
 
 +
The maximum path length in Windows is limited (http://www.developmentnow.com/g/55_2006_10_0_0_833954/Length-of-the-full-path-exceeds-the-maximum-path-length-allowed-.htm). If Slicer is checked out into a directory with a long full path name, then the Visual Studio 8 compiler cannot find some files (typically longer file names in project with long names) and gives the ''fatal error C1083: Cannot open source file'' error. To avoid this error Slicer shall be installed in a directory with a short path. A full path of 45 characters was used successfully, a path longer than 50 has caused problems.
 +
 
 +
====Visual Studio 2005 crashes during compilation====
 +
 
 +
Visual Studio 2005 may crash while compiling Slicer. It usually occurs if other applications are running. If you experience this problem, then close all applications, restart the compilation and don't use your PC for anything else during Slicer compilation. In the worst case you have to restart the compilation a few times.
 +
 
 +
====Visual Studio 2008 crashes during compilation====
  
 +
If Visual Studio 2008 is installed properly then it doesn't crash during Slicer compilation. Make sure to install the latest Microsoft Visual Studio 2008 Service pack (Service Pack 1, as of February 2010).
 +
If you still have problems then uninstall any other Visual Studio versions, remove all traces of previous installations (delete old Microsoft Visual Studio directories from C:\Program Files) and reinstall Visual Studio with the latest service packs.
  
'''Notes on Vista build'''  
+
====Build fails on Windows Vista or Windows 7 due to starting build as non-admin user====
 +
The getbuildtest.tcl step may fail on Vista with the message 'Fatal error: lnk1104 cannot open file "TempFile"' when CMake attempts to build the compiler test "cmTryCompileExec". This is be due to Vista/7 'User Account Control' blocking access to temp directories.
  
It may be necessary to add the option -t "" to the getbuildtest.tcl calls:
+
See the [[Slicer3:Build_Instructions_Windows#Open_cygwin_terminal_window | instructions above]] to start the cygwin shell with elevated permissions.
  
./Slicer3/Scripts/getbuildtest.tcl -t ""
+
====Package generation fails on Windows 7 due to Windows Search Indexing conflict====
 +
Package generation may fail on Windows 7 with the error message "Problem removing toplevel directory" if Windows Search Indexing is enabled. Replace Slicer3-lib/CMake-build with the contents of this zip file: http://www.cmake.org/files/dev/cmake-2.8.1.20100603-g3d1e8-win32-.zip and restart the build to resolve the issue.
  
This disables Dart submissions, which initially caused an error for due to missing file "DartConfiguration.tcl" (though this was probably due to the permissions issue next).
+
====CMake configuration step of KWWidgets or other library fails on Windows 7 due to Windows Search Indexing conflict====
 +
Replace Slicer3-lib/CMake-build with the contents of this zip file: http://www.cmake.org/files/dev/cmake-2.8.1.20100603-g3d1e8.zip and restart the build to resolve the issue.
  
Depending on account permissions, the final getbuildtest.tcl step may fail on Vista with the message 'Fatal error: lnk1104 cannot open file "TempFile"' when CMake attempts to build the compiler test "cmTryCompileExec". This seems to be due to Vista 'User Account Control' blocking access to temp directories.
+
=Slicer3 Windows development compatibility matrix=
  
If Administrator account is available, one option is to disable UAC. Go to Control Panel->User Accounts->"Turn User Account Control on or off" (see [http://groups.google.com/group/microsoft.public.win32.programmer.networks/browse_thread/thread/46f076a851255a95 forum posting]) This requires a computer restart.
+
==Slicer3-3.7 trunk==
 +
{| style="background-color:#cfcfcf;" border=1 cellpadding=2
 +
|+
 +
|-
 +
! Compiler / OS !! Windows XP SP3 !! Windows 7 (limitations: {{ref|Win7SvnCvsIssues}})
 +
|-
 +
! Visual Studio 2005 Professional (limitations: {{ref|NoPythonVs8}}{{ref|CompilerCrash}})
 +
| may work, not regularly tested|| may work, not regularly tested
 +
|-
 +
! Visual Studio 2008 Professional
 +
| '''works, regularly tested {{ref|Vs2008XpDashboard}}''' || may work, not regularly tested
 +
|-
 +
! Visual Studio 2008 Express (limitations: {{ref|NoPythonVs9Express}})
 +
| may work, not regularly tested || may work, not regularly tested
 +
|-
 +
! Visual Studio 2010
 +
| probably does not work, not tested || probably does not work, not tested
 +
|-
 +
|}
  
== This is how I was able to successfully build on Vista == (inorton
+
==Slicer3-3.6==
Another option is to run cygwin xterm as administrator. Go to *\Cygwin\bin (for new installs; old installs it will be in *\Cygwin\usr\X11R6\bin). Right-click on "xterm" and select "Run as administrator". Confirm this, then run ./Slicer3/Scripts/getbuildtest.tcl ... A wrapper script may be needed to run xterm with correct DISPLAY, see [[Slicer3:xterm wrapper]]. Once xterm is running as Administrator, follow the above steps to run getbuildtest.tcl. I had to run the final getbuildtest.tcl step twice to get a successful build. The first time, all of the libraries built correctly but GenerateLM ran all night at 80% CPU and seemed.. stuck. I killed the process (through Task Manager, the processes are detached from cygwin); then re-ran. The second time, all libraries were skipped (correctly) and GenerateLM finished in 15 minutes (this produced a functioning binary). I ran a third time without the -t "" option, in order to run all tests.
+
{| style="background-color:#cfcfcf;" border=1 cellpadding=2
)
+
|+
 +
|-  
 +
! Compiler / OS !! Windows XP SP3 !! Windows 7 (limitations: {{ref|Slicer36Win7SvnCvsIssues}})
 +
|-
 +
! Visual Studio 2005 Professional (limitations: {{ref|Slicer36NoPythonVs8}}{{ref|Slicer36CompilerCrash}})
 +
| may work|| may work
 +
|-
 +
! Visual Studio 2008 Professional
 +
| '''Used for official Release Builds''' || works (but note there are a number of limitations for Windows 7)
 +
|-
 +
! Visual Studio 2008 Express (limitations: {{ref|Slicer36NoPythonVs9Express}})
 +
| may work || may work
 +
|-
 +
! Visual Studio 2010
 +
| probably does not work, not tested || probably does not work, not tested
 +
|-
 +
|}
  
A third option (untested) would be to change CMake and/or getbuildtest to use a known-writable TMP and TEMP directory (within the Slicer build tree?).
+
==Notes==
 +
# {{note|Win7SvnCvsIssues}} Sometimes SVN/CVS checkouts are incomplete see details [[Slicer3:Build_Instructions_Windows#No_SLN_files_created_for_VTK.2C_ITK.2C_KWWidgets | here]]
 +
# {{note|NoPythonVs8}} No Python support: According to [http://docs.python.org/whatsnew/2.6.html#port-specific-changes-windows python.org documentation] visual studio 2008 is the supported compiler for python 2.6.
 +
# {{note|CompilerCrash}} Visual Studio 2005 may crash while compiling Slicer, see details [[Slicer3:Build_Instructions_Windows#Visual_Studio_2005_crashes_during_compilation | here]]
 +
# {{note|Vs2008XpDashboard}} See details on Slicer3 dashboard: http://www.cdash.org/CDash/index.php?project=Slicer3&filtercount=1&showfilters=1&field1=buildname/string&compare1=61&value1=Win32-vs9
 +
# {{note|NoPythonVs9Express}} No Python support: According to [http://docs.python.org/whatsnew/2.6.html#port-specific-changes-windows python.org documentation] visual studio 2008 is the supported compiler for python 2.6.
 +
# {{note|Slicer36Win7SvnCvsIssues}} Sometimes SVN/CVS checkouts are incomplete see details [[Slicer3:Build_Instructions_Windows#Problems_with_svn_checkout_during_build | here]]
 +
# {{note|Slicer36NoPythonVs8}} No Python support: According to [http://docs.python.org/whatsnew/2.6.html#port-specific-changes-windows python.org documentation] visual studio 2008 is the supported compiler for python 2.6.
 +
# {{note|Slicer36CompilerCrash}} Visual Studio 2005 may crash while compiling Slicer, see details [[Slicer3:Build_Instructions_Windows#Visual_Studio_2005_crashes_during_compilation | here]]
 +
# {{note|Slicer36NoPythonVs9Express}} No Python support: According to [http://docs.python.org/whatsnew/2.6.html#port-specific-changes-windows python.org documentation] visual studio 2008 is the supported compiler for python 2.6.

Latest revision as of 21:11, 12 August 2011

Home < Slicer3:Build Instructions Windows

Note: this process can take several hours to complete.

Installing Cygwin

Go to the following web page

You will get a pop-up window asking if you want to run or save this file. Click 'Run'. If a security warning pops up asking if you are sure you want to run the software, click 'Run' again.

If you minimize your web browser window, you should now see a window titled 'Cygwin Net Release Setup Program'. Click 'Next.'

Select 'Install from Internet', and click 'Next.'

The defaults are fine for the Choose Installation Directory page, click 'Next'

The default for Select Local Package Directory is also fine, click 'Next'

For 'Select Your Internet Connection', choose 'Direct Connection' and click 'Next'

Any of the download sites are fine to use. Click 'Next'

You will now see a page titled 'Select Packages'. In the upper right hand corner, there is a button labeled 'View'. Click the 'View' button once to change the view to 'Full', and maximize the window so you can see all of the columns.

The package names are on the right. On the left, you'll see that each package is labeled 'Skip', 'Keep', or has a version number. We want to install these packages in addition to the defaults:

  • curl
  • cvs
  • git
  • subversion
  • tcltk
  • unzip
  • zip

For each of these packages, click on 'Skip' so that a version number appears. After you have clicked on all of the above packages, click 'Next'.

At this point, Cygwin will start the download and install.

After the installation, you will see a 'Create Icons' screen. The defaults are fine; click 'Finish'

You should now have an icon on your desktop that looks like a black C with a green arrow. Double click the icon to start Cygwin.

Installing Microsoft Visual Studio Express

Go to the following webpage.

A window may pop up saying that you need to install Microsoft Silverlight. Click 'Enable Silverlight'

Halfway down the page, there is a brown box labeled Microsoft Visual C++ 2008 Express Edition. Click the 'Download' link inside that box.

A pop up window will ask if you want to run or save this file. Click 'Run'

A setup window and progress bar will now appear. After that finishes, you will see a 'Welcome to Setup' page. Click 'Next'

Select 'I have read and accept the license terms' and click 'Next'

Don't select MSDN Express, SQL server, or Microsoft Silverlight Runtime. Click 'Next'

The default Destination Folder is fine. Click 'Next'

You will now see another progress bar, and the compiler will begin installing.

When the Setup Complete window appears, click 'Exit'. You will now have to restart your computer to finish the installation.

Open cygwin terminal window

Double-click on the Cygwin icon on your desktop to open a Cygwin shell.

For Windows Vista and Windows 7: With the default user access control settings Slicer compilation fails. To build Slicer on these operating systems you have to open the cygwin shell with elevated permissions, using one of these methods:

  • Option 1 (recommended, simplest): Run cygwin shell as an administrator: Right-click on the Cygwin icon (or cygwin.bat) and select Run as Administrator. Click on Yes if the User Access Control popup is displayed.
  • Option 2 (recommended, more complex to set up, but then simple to use): Run the build process in a cygwin shell that has Administrator rights. See this page for instructions: http://www.lamnk.com/blog/computer/run-cygwin-on-vista-as-administrator/
  • Option 3 (complex, not recommended): Run cygwin xterm as administrator. Go to *\Cygwin\bin (for new installs; old installs it will be in *\Cygwin\usr\X11R6\bin). Right-click on "xterm" and select "Run as administrator". A wrapper script may be needed to run xterm with correct DISPLAY, see Slicer3:xterm wrapper. Confirm Run-as.
  • Option 3 (unsafe, not recommended): Completely disable UAC. Go to Control Panel->User Accounts->"Turn User Account Control on or off" (see forum posting). Note that disabling UAC makes your computer more vulnerable to malware attacks.
  • Option 4 (just an idea, it is not known to work): Change CMake and/or getbuildtest to use a known-writable TMP and TEMP directory (within the Slicer build tree?).

Building Slicer

Type the following command at the Cygwin terminal window:

svn co http://svn.slicer.org/Slicer3/trunk Slicer3

After the checkout completes, type:

./Slicer3/Scripts/getbuildtest.tcl

Troubleshooting

Problems with Python compilation

Python can only be built on Visual Studio 9 (2008) for windows. Python compilation shall be disabled if Slicer is built with an earlier Visual Studio version (otherwise Python compilation fails and Slicer build is not completed). The disabling is automatically done in Slicer 3.5 versions after January 20, 2010. To compile an earlier Slicer version with a compiler other than Visual Studio 9 the following shall be performed to disable Python usage:

Edit the file

./Slicer3/slicer_variables.tcl

# getbuildtest Option for build using system Python, should be "true" or "false"
set ::USE_SYSTEM_PYTHON "false"
# CMake option for Python, must be "OFF" on "ON", default is "ON"
set ::USE_PYTHON "ON"

# CMake option for numerical Python, only matters if Python is on
set ::USE_NUMPY "ON"
# getbuildtest option for SCIPY - also build support libraries (blas and lapack) needed for scipy
# - should be off except for experimentation (does not work on all plaftorms - requires fortran)
# - should be "true" or "false"
set ::USE_SCIPY "false"

and set USE_PYTHON to "OFF".

Python compilation is disabled by default for Windows 7 systems, because Slicer build has to be restarted several times to successfully complete. If you need Python then modify slicer_variables.tcl and start the build multiple times. Long term solution will be to compile Python with CMake (work in progress).

Problems with svn checkout during build

Sometimes svn or cvs checkout or the CMake configuration process fails. As a workaround, run getbuildtest with the --update option a few times, until all the libraries are completely checked out and built. On Windows 7 all anti-virus and search indexing software are turned off and usually at least one retry is needed.

This hint was contributed by Wolfgang Schramm, see his original post on slicer-devel list

[A problem can be] caused by an incomplete checkout of the VTK (and
ITK, KWWIDGETS,...) libraries. This bug is not reproducible (at least I'm
the only one I knew who had this problem).
I have the following workaround: 

1) Install TortoiseCVS
2) Do a complete slicer build and let it fail.
3) Do a CVS update on EVERY library which is under CVS (SVN checkouts work
fine) - be careful with Batchmake since this is not only one cvs projects
but several.
4) Build as described by the wiki.

Multiple compilers are installed and Slicer chooses a wrong one

If you have multiple Visual Studio compiler versions installed on the same computer and you want to use a different compiler than the one that Slicer automatically detected, then comment out the lines in the slicer_variables file for the VS you don't want to use.


No SLN files created for VTK, ITK, KWWidgets, or other libraries

cvs [checkout aborted]: cannot rename file CVS/Entries.Backup to CVS/Entries: permission denied

These are also problems with cvs checkout. Try disabling the on-demand scan of Windows Security Essentials (or other anti-virus). This solved the problem for me on Windows 7. -Greg Sharp, Nov 24, 2009.

There are many reports on SVN checkout problems when search indexing or anti-virus software is running on Windows 7 (http://social.technet.microsoft.com/Forums/en/w7itprogeneral/thread/df935a52-a0a9-4f67-ac82-bc39e0585148). Disable search indexing on the Slicer build directories and during the compilation temporarily disable real-time anti-virus protection.

Existing files with long names cannot be found during compilation with Visual Studio 8

The maximum path length in Windows is limited (http://www.developmentnow.com/g/55_2006_10_0_0_833954/Length-of-the-full-path-exceeds-the-maximum-path-length-allowed-.htm). If Slicer is checked out into a directory with a long full path name, then the Visual Studio 8 compiler cannot find some files (typically longer file names in project with long names) and gives the fatal error C1083: Cannot open source file error. To avoid this error Slicer shall be installed in a directory with a short path. A full path of 45 characters was used successfully, a path longer than 50 has caused problems.

Visual Studio 2005 crashes during compilation

Visual Studio 2005 may crash while compiling Slicer. It usually occurs if other applications are running. If you experience this problem, then close all applications, restart the compilation and don't use your PC for anything else during Slicer compilation. In the worst case you have to restart the compilation a few times.

Visual Studio 2008 crashes during compilation

If Visual Studio 2008 is installed properly then it doesn't crash during Slicer compilation. Make sure to install the latest Microsoft Visual Studio 2008 Service pack (Service Pack 1, as of February 2010). If you still have problems then uninstall any other Visual Studio versions, remove all traces of previous installations (delete old Microsoft Visual Studio directories from C:\Program Files) and reinstall Visual Studio with the latest service packs.

Build fails on Windows Vista or Windows 7 due to starting build as non-admin user

The getbuildtest.tcl step may fail on Vista with the message 'Fatal error: lnk1104 cannot open file "TempFile"' when CMake attempts to build the compiler test "cmTryCompileExec". This is be due to Vista/7 'User Account Control' blocking access to temp directories.

See the instructions above to start the cygwin shell with elevated permissions.

Package generation fails on Windows 7 due to Windows Search Indexing conflict

Package generation may fail on Windows 7 with the error message "Problem removing toplevel directory" if Windows Search Indexing is enabled. Replace Slicer3-lib/CMake-build with the contents of this zip file: http://www.cmake.org/files/dev/cmake-2.8.1.20100603-g3d1e8-win32-.zip and restart the build to resolve the issue.

CMake configuration step of KWWidgets or other library fails on Windows 7 due to Windows Search Indexing conflict

Replace Slicer3-lib/CMake-build with the contents of this zip file: http://www.cmake.org/files/dev/cmake-2.8.1.20100603-g3d1e8.zip and restart the build to resolve the issue.

Slicer3 Windows development compatibility matrix

Slicer3-3.7 trunk

Compiler / OS Windows XP SP3 Windows 7 (limitations: [1])
Visual Studio 2005 Professional (limitations: [2][3]) may work, not regularly tested may work, not regularly tested
Visual Studio 2008 Professional works, regularly tested [4] may work, not regularly tested
Visual Studio 2008 Express (limitations: [5]) may work, not regularly tested may work, not regularly tested
Visual Studio 2010 probably does not work, not tested probably does not work, not tested

Slicer3-3.6

Compiler / OS Windows XP SP3 Windows 7 (limitations: [6])
Visual Studio 2005 Professional (limitations: [7][8]) may work may work
Visual Studio 2008 Professional Used for official Release Builds works (but note there are a number of limitations for Windows 7)
Visual Studio 2008 Express (limitations: [9]) may work may work
Visual Studio 2010 probably does not work, not tested probably does not work, not tested

Notes

  1. Win7SvnCvsIssues
    Sometimes SVN/CVS checkouts are incomplete see details here
  2. NoPythonVs8
    No Python support: According to python.org documentation visual studio 2008 is the supported compiler for python 2.6.
  3. CompilerCrash
    Visual Studio 2005 may crash while compiling Slicer, see details here
  4. Vs2008XpDashboard
    See details on Slicer3 dashboard: http://www.cdash.org/CDash/index.php?project=Slicer3&filtercount=1&showfilters=1&field1=buildname/string&compare1=61&value1=Win32-vs9
  5. NoPythonVs9Express
    No Python support: According to python.org documentation visual studio 2008 is the supported compiler for python 2.6.
  6. Slicer36Win7SvnCvsIssues
    Sometimes SVN/CVS checkouts are incomplete see details here
  7. Slicer36NoPythonVs8
    No Python support: According to python.org documentation visual studio 2008 is the supported compiler for python 2.6.
  8. Slicer36CompilerCrash
    Visual Studio 2005 may crash while compiling Slicer, see details here
  9. Slicer36NoPythonVs9Express
    No Python support: According to python.org documentation visual studio 2008 is the supported compiler for python 2.6.