When generating Slicer solution files, I get the following error:
CMake Error at SuperBuild/External_OpenSSL.cmake:241 (message):
There is no pre-compiled version of OpenSSL 1.0.1h available for
this version of visual studio [1916]. You could either:
(1) disable SSL support configuring with option Slicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=OFF
or
(2) configure Slicer providing your own version of OpenSSL that matches the version
of OpenSSL also used to compile Qt library.
The options to specify are OPENSSL_INCLUDE_DIR, LIB_EAY_DEBUG, LIB_EAY_RELEASE,
SSL_EAY_DEBUG and SSL_EAY_RELEASE.
Call Stack (most recent call first):
CMake/ExternalProjectDependency.cmake:842 (include)
SuperBuild/External_curl.cmake:15 (ExternalProject_Include_Dependencies)
CMake/ExternalProjectDependency.cmake:842 (include)
CMake/ExternalProjectDependency.cmake:916 (ExternalProject_Include_Dependencies)
SuperBuild.cmake:458 (ExternalProject_Include_Dependencies)
CMakeLists.txt:670 (include)
I’m using:
Current Generator: Visual Studio 15 2017
Qt 5.12.2 msvc2017_64
I’ve never compiled Slicer from source before so maybe my configuration is not correct. Also, if I specify “v140” as the optional toolset, I get another set of errors but I have the VC++ 2015.3 v14.00(v140) toolset for desktop installed.
Officially supported compiler is VS2015 (this is what Python3.6 uses, so we cannot upgrade if we want to remain binary compatible). VS2015 toolset with VS2017 works (that’s what most of developers use). Make sure you use a 64-bit generator. If you have problems then post the error message that you get.
I’m sorry I don’t understand what you’re suggesting I should change.
I’m using:
Current Generator: Visual Studio 15 2017 (with VC++ 2015.3 v14.00(v140) installed)
Qt 5.12.2 msvc2017_64
Is that not correct?
A youtube video showing how to compile 3DSlicer would be very helpful.
I think the Windows build instructions should probably be clarified to indicate the VS2015 toolset is required.
Currently it states the following below which seems to suggest building with VS2015(the toolset) is just an option and not a requirement.
For building with VS2015, Qt version 5.10.x or older is required. source
Could someone update the wiki with an edit? I think you could just remove the “For building with VS2015” part of that sentence and make it clearer to understand.
Using cmake from the command prompt or gui and using Qt 5.9.7 msvc2015_64 or Qt 5.12.2 msvc2015_64 and specifying the generator as Visual Studio 15 2017:
if I specify the v140 toolset, I get the error:
CMake Error at CMakeLists.txt:51 (project):
No CMAKE_C_COMPILER could be found.
if I don’t specify the v140 toolset, I get the error:
CMake Error at SuperBuild/External_OpenSSL.cmake:241 (message):
There is no pre-compiled version of OpenSSL 1.0.1h available for
this version of visual studio [1916].
What should I try next?
Is the OpenSSL error related to the v140 toolset?
The reason I want to compile from source is to test 3DSlicer running in a browser like this simple demo I created in C#: http://3.16.153.64:6580/Cybele_Test_App/
Do you know of anyone using Slicer on Amazon Appstream? I would not need to re-compile but the cost could be higher than using Cybele depending on the amount on time used.
With Cybele you have to re-compile including their libraries, but the cost is $69 USD per concurrent user, one time charge.
You might have multiple Visual Studio versions installed, installed in non-default location, or for some reason the installation may be corrupted.
Try restarting your computer, launch Visual Studio, start CMake from Visual Studio command prompt.
You may also try building a project using the v140 toolset: create a new project in desktop x64 project in Visual Studio, without CMake; right-click on the project (not the solution), choose Properties / General / Platform Toolset: “Visual Studio 2015 (v140)” - you may get a more meaningful error message if something is off.
I had a quick look at Thinfinity VIrtualUI and it does not seem that it could run a Qt-based application. Slicer runs quite nicely in Docker, would that be an option for you?
This is most likely not a CMake error (the error indicates that CMake fails to build a simple test project with v140 toolset). If you install Visual Studio versions out of order (VS2017 first then VS2015) then it may corrupt the installation and uninstalling both and reinstalling in VS2015, VS2017 order might fix it. Were you be able to build a project with v140 without CMake as I described above?
I’ve been using this approach for a while and I find the performance to be good. I’ve tested it on AWS, Google Cloud and other systems that support docker and it very reliable.
In the README there’s also info on how to use this for batch jobs. I plan to use this quite a bit for some batch analysis jobs, for example using SlicerDMRI.