View Issue Details

IDProjectCategoryView StatusLast Update
0002002Slicer4Core: Building (CMake, Superbuild)public2014-03-06 05:17
Reporterjcfr Assigned ToLchauvin  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0002002: Support for VS2010
Description

From Laurent Chauvin - May 8 2012:

I tried to compile Slicer4 with VS2010 today. Apply Isaiah's patch, and JC's patch to Isaiah's patch (to change name of python_make_step_pythonrun to python_make_step), and disabling DICOM2FullBrainTractography and TractographyFiducialSeeding modules (paths were too long for some files). I also disabled NUMPY, creating some issues. But Slicer4 finally compiled.

However, when I want to start it, it crashes. I enclosed a screenshot of the terminal when starting with verbose mode.

I looked at dependencies too, and some dll's were missing (gpsvc.dll, ieshims.dll and msvcp90d.dll, but it seems they were not really important. However, I still copied them in Slicer directory to solve these dependencies).

I don't know if there a way to get more informations about why it's crashing (like a log or something else).

Thank you.

TagsNo tags attached.

Relationships

parent of 0002121 closedjcfr Python building for Slicer4 64bits with VS2010 
related to 0003158 closedjcfr Building Slicer with numpy-1.4.1 failed using VS2010 

Activities

Lchauvin

Lchauvin

2012-05-14 07:33

developer   ~0004371

I finally succeed to compiled Slicer4 on Windows 7 with VS2010.

Here is the process I followed:

set(python_SOURCE_DIR ${python_build})
configure_file(SuperBuild/python_patch_step_pythonrun.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/python_patch_step_pythonrun.cmake
@ONLY)
set(python_CONFIGURE_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/python_patch_step_pythonrun.cmake)
by this:

set(python_SOURCE_DIR ${python_build})
configure_file(SuperBuild/python_patch_step_win.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/python_patch_step.cmake
@ONLY)
set(python_PATCH_COMMAND_ONE ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/python_patch_step.cmake)

  • Run cmake-gui
  • Turn Slicer_USE_NUMPY off
  • Comment DICOM2FullBrainTractography in Slicer4/Modules/Scripted/Scripts/CMakeLists.txt (path is too long for windows, even if installed in C:)
  • Open Slice4-Superbuild/Slicer.sln
  • Start building. It should work.
Lchauvin

Lchauvin

2012-05-14 07:42

developer   ~0004372

If Python-2.6.6.tgz is downloaded instead of Python-2.6.6-vc2010.tgz, stop compilation and check the Slicer4-Superbuild/CMakeFiles/CMakeCXXPlateform.cmake file, and if you see this line:

SET(MSVC_VERSION ), change it for SET(MSVC_VERSION 1600)

and restart compiling.

Lchauvin

Lchauvin

2012-05-14 07:49

developer   ~0004374

In the tutorial to compile Qt, at step 11, replace option -no-webkit by -webkit

Lchauvin

Lchauvin

2012-05-25 11:21

developer   ~0004617

About the issue 0002121, yes I installed everything and compilation works perfectly for other packages, except Python, which has a wrong LIBPATH path in the linker.

jcfr

jcfr

2012-05-25 11:23

administrator   ~0004618

Last edited: 2012-05-25 11:24

1) Could you update the wiki ?

2) Do these instructions apply for 32 or 64 bit or both ?

Lchauvin

Lchauvin

2012-05-25 11:38

developer   ~0004619

1) I could update the wiki, but my method is not the best one. It's pretty dirty (copying kernel32.lib etc.. in the python directory).
It would be better to find a way to change LIBPATH variable, but I didn't find where.

2) These instructions seems to only apply to 64 bits, I didn't get these issue for 32 bits if I remember.

Lchauvin

Lchauvin

2012-05-25 12:53

developer   ~0004621

Actually, I used modifications I made to compile with VS2010 on 32 bits (ie first note 0004371, or wiki).
I copied the Slicer4 (sources) directory, run cmake, modified python (cf bug report 0002121).

I also had to compile qt 4.7.4 on 64 bits, using 64 bits terminal of WindowsSDK, because not available directly from VS2010 (as I read in some tutorials. Maybe only Professional version).

If it works, I can update wiki for 64 bits, but that would be great to have a fix for Python LIBPATH issue, my method is the "dirty way".

jcfr

jcfr

2012-05-25 13:42

administrator   ~0004626

Good point.

1) My comment regarding to the wiki update referred to using the flag "-webkit" instead of "-no-webkit". See http://www.slicer.org/slicerWiki/index.php/Documentation/4.1/Developers/Build_Instructions/Prerequisites/Qt#Windows_4

2) Compiling Qt on VS2010 works out of the box and has to be done using the VisualStudio 64bit console. When you mention "using 64 bits terminal of WindowsSDK", is what you mean ?

3) Regarding the "LIBPATH" issue, could you confirm that the platform is correct when building 64 bit. You could for example had a message statement here: https://github.com/ihnorton/Slicer/blob/24ff66f98192ec39db8214f08ef2450890f489aa/SuperBuild/External_python_win.cmake#L81

Lchauvin

Lchauvin

2012-05-25 14:48

developer   ~0004627

1) I can update the wiki, but I didn't really follow these lines.
I didn't use set QMAKESPEC and to configure, I used same options as for Linux.
Should I still update it ?

2) Actually I didn't found the 64 bits console in Visual Studio, so I used windows SDK console (Start -> All Programs -> WindowsSDK -> 64 Console (I forgot the name) ). I think this is the console VS2010 should use when you want a 64 bits terminal, but I couldn't directly access it from VS2010.

3) For the LIBPATH, yes, I can confirm this is the good platform. It was printed in VS2010 when compiling, when LIBPATH was trying to find libraries in amd64 directory (which was empty).
What I did is just copied libraries where python was looking for it, but I think the clean solution is to change the path where python is looking for it.

If you find where it's set, you can replace it by: ${WindowsSDK}Lib\x64
The WindowsSDK (or WindowsSDKs I'm not sure), is an environment variable defined by WindowsSDK when installed and pointing to the WindowsSDKs directory.

Lchauvin

Lchauvin

2012-05-29 06:00

developer   ~0004673

The Slicer4 x64 compilation worked, on Win7 64, VS2010 Express, with Qt 4.7.4 64bits.

The procedure is almost the same as I described for 32 bits, except VS2010 command prompt x64 (or Windows SDK 7.1 command prompt if VS2010 prompt not available). Check when prompt starts that 64 bits is detected.
Follow Qt compilation tutorial (http://thomasstockx.blogspot.com/2011/03/qt-472-in-visual-studio-2010.html).

Start compilation. If Python fail because of kernel32.lib, go in Slicer4-Superbuild->python-prefix->src->python-stamp and edit extract-python.cmake.

Add this line 'if(NOT EXISTS "${directory}")' before '# Prepare a space for extracting'
and 'endif()' before 'message(STATUS "extracting... done")'

then, copy all files from "C:/Program Files/Microsoft SDKs/Windows/v7.1/Lib/x64"
into "Slicer4-Superbuild/python-build/PCBuild/amd64"

and restart compilation.

jcfr

jcfr

2012-06-01 12:48

administrator   ~0004753

Laurent,
Do you confirm that Slicer can be build using VS2010 without manual patching ?
This could be verified looking at the track "Nightly-Packages (VS2010)" on Slicer dashboard. See http://slicer.cdash.org/index.php?project=Slicer4

Lchauvin

Lchauvin

2012-06-01 12:57

developer   ~0004754

It requires patches. Isaiah's patch (for python) , your patch, and it's not straight forward (some rules should be respected, like a small path, etc...).
LIBPATH should be changed for python too, some libraries copied in the directory (could be avoid if LIBPATH is changed). I don't know if this issue also happen on 32 bits.

But I think by changing this minor things, it can be easier to compile (Windows compilation is rarely something easy) and it should work.

The 64 bits version is a bit different, because requiring to compile Qt 64bits and Windows SDK (for 64bits compilers).

But it can be done.

jcfr

jcfr

2012-06-25 13:37

administrator   ~0004926

From Laurent - June 25 2012:

I also modified it because some files couldn't be found.

I think these files were related to the patch. That's probably why it failed.
As my Slicer is in release and python too, I think the modification shouldn't create crashes.

Tomorrow (if I have time) I will try to look at Isaiah's patch, and try to make it fully compatible with current version of python, with debug or release mode of slicer. If it works, that could be good to commit these modifications, because for now it's pretty tricky to compile Slicer on VS2010, especially because of Python. That could be great to have a more straight forward process.

I'm gonna have a look at it, maybe tomorrow.

Thank you.

jcfr

jcfr

2013-04-16 09:10

administrator   ~0008406

Last edited: 2013-04-16 09:11

Fixed by commits r21863, r21867, r21869, r21879 and r21891

For details:
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21863
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21867
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21869
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21879
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21891

jcfr

jcfr

2014-03-06 05:15

administrator   ~0011064

Closing resolved issues that have not been updated in more than 3 months

Issue History

Date Modified Username Field Change
2012-05-08 15:29 jcfr New Issue
2012-05-08 15:29 jcfr Status new => assigned
2012-05-08 15:29 jcfr Assigned To => jcfr
2012-05-08 15:30 jcfr Assigned To jcfr =>
2012-05-08 15:31 jcfr Assigned To => Lchauvin
2012-05-14 07:33 Lchauvin Note Added: 0004371
2012-05-14 07:42 Lchauvin Note Added: 0004372
2012-05-14 07:49 Lchauvin Note Added: 0004374
2012-05-15 11:45 jcfr Target Version => Slicer 4.2.0 AHM Summer 2012
2012-05-25 11:08 jcfr Relationship added parent of 0002121
2012-05-25 11:21 Lchauvin Note Added: 0004617
2012-05-25 11:23 jcfr Note Added: 0004618
2012-05-25 11:24 jcfr Note Edited: 0004618
2012-05-25 11:38 Lchauvin Note Added: 0004619
2012-05-25 12:53 Lchauvin Note Added: 0004621
2012-05-25 13:42 jcfr Note Added: 0004626
2012-05-25 14:48 Lchauvin Note Added: 0004627
2012-05-29 06:00 Lchauvin Note Added: 0004673
2012-06-01 12:36 Lchauvin Status assigned => resolved
2012-06-01 12:48 jcfr Note Added: 0004753
2012-06-01 12:57 Lchauvin Note Added: 0004754
2012-06-01 12:57 Lchauvin Status resolved => feedback
2012-06-01 12:57 Lchauvin Resolution open => reopened
2012-06-25 13:37 jcfr Note Added: 0004926
2012-06-25 13:46 jcfr Status feedback => assigned
2012-08-20 10:05 jcfr Target Version Slicer 4.2.0 - Feature freeze Sept 1st 2012 => Slicer 4.2.5
2012-08-21 09:39 jcfr Target Version Slicer 4.2.5 => Slicer 4.3.0
2013-04-16 09:10 jcfr Note Added: 0008406
2013-04-16 09:10 jcfr Status assigned => resolved
2013-04-16 09:10 jcfr Fixed in Version => Slicer 4.3.0
2013-04-16 09:10 jcfr Resolution reopened => fixed
2013-04-16 09:11 jcfr Note Edited: 0008406
2013-06-11 14:56 jcfr Relationship added related to 0003158
2014-03-06 05:15 jcfr Note Added: 0011064
2014-03-06 05:17 jcfr Status resolved => closed