Latest master does not build in Debug mode

I started clean builds of c9dc6c8008bfc3978e36b8032f14ccaa895680fc in debug and release on Win10 with VS2013 x64. Release mode builds without error. In debug mode I get below errors. I think I had all settings with default values. Is this a known problem or a recent regression?

54>C:\Dev\Slicer-deb\BRAINSTools\BRAINSFit\BRAINSFit.cxx(25): fatal error C1083: Cannot open include file: 'BRAINSFitCLP.h': No such file or directory [C:\Dev\Slicer-deb\Slicer-build\Modules\Remote\BRAINSTools\BRAINSFit\BRAINSFitLib.vcxproj]
51>LINK : fatal error LNK1104: cannot open file 'python27_d.lib' [C:\Dev\Slicer-deb\SimpleITK-build\SimpleITK-build\Wrapping\Python\SimpleITK_PYTHON.vcxproj] [C:\Dev\Slicer-deb\SimpleITK-build\SimpleITK.vcxproj]

I had issues building Slicer after yesterday’s big build configuration changes. Starting the build from scratch solved the problem, for both Release and Debug, Win10, VS2013 x64, latest master version (ae6f222b1c87ca99215c7bc0e67d2d9c0530f2d0).

I’ve successfully built latest master version in debug mode using VS2013 from scratch on another computer, too.

Thanks for confirming a temporary regression Andras. I will try with ae6f222b1c87ca99215c7bc0e67d2d9c0530f2d0 on my laptop later today.


This is a known issue with SimpleITK and Slicer in debug mode.

When Slicer is compiled in debug mode, it still compiles Python in release mode. There are only a couple libraries which link against Python and the Slicer run time. These are compiles in different modes Debug and Release. SimpleITK lacks the creative code that is in VTK which defines certain preprocessor definitions before including the Python header to mix Release and Debug libraries.

I even have a prototype branch to add the hack to SimpleITK:

If someone is willing continue work on the patch and help with this Slicer specific customization in SimpleITK, that would be wonderful.


That’s right, I keep forgetting about this (I disable SimpleITK in my debug builds by default).

@blowekamp, I can offer fixing specific problems and testing on Windows. Can you set up a Slicer branch that checks out your patched SimpleITK version and contains all the patches for Slicer that you’ve added so far?

Great! Thank you for volunteering to help! :grinning:

Slicer is due of an upgrade to SimpleITK 1.0, too. I’ll base the Python debug patch on that for your testing.

I don’t know if we should try to upgrade Slicer to sitk 1.0 first, then get this debug patch, or do them both at the same time.

We can try doing SimpleITK upgrade and debug-mode patch at once. If we run into major difficulties then we can roll back and try one step at a time.