[Windows] Debug SimpleITK build failed

Hello all,

My debug build of Slicer fails on SimpleITK looking for python36_d.lib, is this a known issue?

I’ve scanned 3D slicer Windows 10 Build Fail (only SimpleITK project) and that doesn’t seem to be related.

Qt 5.15.0, CMake 3.17.3, VS2019, v140 toolkit

[Edit: Deleted directories as I ran out of disk space, will get Git hash shortly]

Adam

That seems most like what was discussed in https://github.com/Slicer/Slicer/issues/4898#issuecomment-623453879 and I don’t believe it was ever fully resolved.

Yes, it looks like the same issue. It would be better to continue the discussion in the issue tracker to keep all related information in one place.

1 Like

Hi Andras,

After further exploration, I tried reverting this change (Edit: I reverted only the change to External_SimpleITK.cmake):

and re-doing a clean build. It succeeded. Somehow having the variable be empty doesn’t trigger the #pragma in the python headers to include the debug .lib

My steps:

  1. Checkout latest (f665904 at the time)
  2. CMake and superbuild! Fail with “cannot find python36_d.lib”
  3. Delete SimpleITK, SimpleITK-build, etc… (all folders relating to SimpleITK)
  4. CMake superbuild again, recreate fresh SimpleITK and SimpleITK prefix dirs
  5. Build SimpleITK-download from superbuild project
  6. Build SimpleITK from superbuild project, success

Any thoughts? Could setting the debug lib variable somehow cause the preprocessor defines to change?

Nope! Just did another clean build and it worked. Yay…

Have you every solve this problem? I met the exactly same problem with you under the same environment setting.

I noticed that there might be several solutions mentioned above, which one could solve the problem?

I was wondering why can’t we just change the linked python lib to the release version of python for simpleITK in CMakeLists.txt to solve the bugs forever?

The problem is fixed now (in this commit). Update to the latest master version and rebuild Slicer from scratch (delete the entire build folder).