I recently encountered something really strange, and since I saw this problem on three different machines, I think it is caused by the latest versions of Visual Studio.
If we build Slicer (in Debug or Release, occurs with both), although the splash screen shows up, this error appears, and then Slicer exits.
What I suspect is that the issue was introduced with an update of Visual Studio, because everything worked with MSVC compiler version 14.39.33519, but we had the TBB issue with version 14.40.33807.
Does anyone have any idea how to fix this? Thank you very much!
An update: I thought the name of the folder was the same as the MSVC version, which for some reason isnāt. For example the folder C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215 contains MSVC 19.35.32215.0. The versions above correspond to the directory name.
There is some FindVcvars.cmake update stuff needed for VS 17.10 which has MSVC 1940.
It had been updated on the scikit-built side, but Iāve backported the required changes on the Slicer side. I havenāt tried yet if this is all that is needed to fix your issue, but definitely required for MSVC 1940 usage.
I tried different things, but to unblock the work I ended up rebuilding with the v142 toolset. It worked. But I messed up my v143 build tree, so to be able to help solve this issue (I know about at least one other person who had it) I started a new build with the problematic compiler version. Iāll report back on Monday.
I get the same error trying to build with VS 2022. Has anyone been able to figure this out? Iām trying to build my first loadable module for Project week ā should I install a different version of Visual Studio? If so, could you please tell me which one?
My latest clean v143 build also showed missing VTK OpenGL DLL issues, but I went ahead with updating Slicer as @jamesobutler suggested, Iāll see if they disappear. (Yesterday was holiday here so didnāt have access to the computers at the office)
The very latest Slicer (b0ed88351af465159b101fc434802c83fd438522) did not work as is, I had the same TBB DLL errors.
I copied all DLLs from S5R\tbb-install\redist\intel64\vc14 to S5R\Slicer-build\bin\Release and it solves the issue, Slicer starts. Although it took forever the first time (much longer than a normal āfirst time after restartā). I observed this long startup with v142 as well though, but this is a brand new computer so maybe itās that (but definitely not performance issue, this is a really strong computer).
The following likely needs updating to say 1949 as it appears it is never setting tbb_vsdir. It has been an unusual case that 1940 is still Visual Studio 2022.
Quick update: I tried Csabaās dll move and that also worked on my laptop with VS 2022. Slicer builds and runs. I know its only a temporary solution but it allows me to keep moving :-). Thanks!
Sarah
Now that project week is over, Iād like to ask if there is any plan to address this issue? I remember we had a time several years ago when we had to use an older compiler. Iād be fine with that, but please give an update in case you had the chance to discuss it at the PW.
The reason Iām asking is that I typically have many different Slicer builds, and Iām just about to switch to a new machine, and Iād like to avoid rebuilding everything more times than needed. So the question is basically should I wait or help, or proceed with the build using the v142 switch everywhere? Thank you very much!
I think there may be some confusion. What I described in the below link is code that is not in a Slicer PR and not on Slicer main. A local change needs to be applied and tested.
Yes I think that change makes sense considering Visual Studio 2022 having a MSVC version > 1939 was unexpected and I think this place in TBB is the remaining location where this MSVC version stuff could go wrong. A PR would be appreciated! Thanks for your testing.