# CMake Configure OpenSSL Error

**URL:** <https://discourse.slicer.org/t/cmake-configure-openssl-error/6506>\
**Category:** Development\
**Created:** [April 15, 2019, 3:43pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506 "2019-04-15T15:43:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcmclean](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@marcmclean](https://discourse.slicer.org/u/marcmclean)\
**Post date:** [April 15, 2019, 3:43pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/1 "2019-04-15T15:43:23Z")

</div>

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.

Any help would be appreciated.

Thank you,  
Marc McLean

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 15, 2019, 4:54pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/2 "2019-04-15T16:54:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![marcmclean](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@marcmclean](https://discourse.slicer.org/u/marcmclean)\
**Post date:** [April 15, 2019, 6:33pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/3 "2019-04-15T18:33:37Z")

</div>

Hello Andras,

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.

Marc

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 15, 2019, 6:48pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/4 "2019-04-15T18:48:32Z")

</div>

Selecting `Visual Studio 15 2017 (with VC++ 2015.3 v14.00(v140) installed)` means that Qt compiled for vs2015 should be used.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 15, 2019, 7:07pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/5 "2019-04-15T19:07:26Z")

</div>

Also, as described in the build instructions, you may need to use Qt-5.10 or older.

I think the easiest is to specify CMake arguments on the command-line, as shown here: [https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build\_Instructions/Configure#Windows](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions/Configure#Windows)

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [April 15, 2019, 10:38pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/6 "2019-04-15T22:38:19Z")

</div>

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](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Common_Prerequisites_2)

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.

---

<div class="post-metadata">

**Author:** ![marcmclean](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@marcmclean](https://discourse.slicer.org/u/marcmclean)\
**Post date:** [April 15, 2019, 10:53pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/7 "2019-04-15T22:53:23Z")

</div>

Looking at the command-line code, the documentation states the following assumes the source is in c:\S4

“C:\Program Files\CMake\bin\cmake.exe” -G “Visual Studio 15 2017 Win64” -T “v140” -DQt5\_DIR:PATH=C:\Qt\5.10.0\msvc2015\_64\lib\cmake\Qt5 C:\D\S4

What is the last argument c:\D\S4? Where is the source c:\S4 specified? Per the cmake documentation, should the last argument be the source?

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 15, 2019, 11:00pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/8 "2019-04-15T23:00:10Z")

</div>

> the documentation states the following assumes the source is in c:\S4

Thanks pointing this out. I also just updated the wiki page to consistently use `C:\D\S4` and `C:\D\S4R`

The motivation for using short paths is explained in the checkout section, see [Documentation/Nightly/Developers/Build Instructions - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#CHECKOUT_slicer_source_files)

---

<div class="post-metadata">

**Author:** ![marcmclean](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@marcmclean](https://discourse.slicer.org/u/marcmclean)\
**Post date:** [April 15, 2019, 11:51pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/9 "2019-04-15T23:51:31Z")

</div>

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/](http://3.16.153.64:6580/Cybele_Test_App/)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 15, 2019, 11:55pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/10 "2019-04-15T23:55:02Z")

</div>

> [@marcmclean](#):
>
> if I specify the v140 toolset, I get the error:  
> CMake Error at CMakeLists.txt:51 (project):  
> No CMAKE\_C\_COMPILER could be found.

Could you confirm that the components `VC++ 2015.3 v14.00 (v140) toolset for desktop` is installed ?

For more details, see [Documentation/Nightly/Developers/Build Instructions - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Experimental.2Fdeprecated_build_environments)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 15, 2019, 11:58pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/11 "2019-04-15T23:58:29Z")

</div>

> [@marcmclean](#):
>
> Is the OpenSSL error related to the v140 toolset?

Yes. We do not have pre-compiled binaries of OpenSSL for this version of Visual Studio.

> I want to compile from source is to test 3DSlicer running in a browser like this simple demo I created

Are you planning to build Slicer with webassembly or emscripten ? Or deploy it using amazon appstream ?

---

<div class="post-metadata">

**Author:** ![marcmclean](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@marcmclean](https://discourse.slicer.org/u/marcmclean)\
**Post date:** [April 16, 2019, 12:31am UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/12 "2019-04-16T00:31:13Z")

</div>

Yes, v140 toolset is installed

 ![v140_install](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/a/9aa8063c73f144189a7481c2b2faeb4d366486d5.jpeg)

---

<div class="post-metadata">

**Author:** ![marcmclean](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@marcmclean](https://discourse.slicer.org/u/marcmclean)\
**Post date:** [April 16, 2019, 12:33am UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/13 "2019-04-16T00:33:31Z")

</div>

I planned on testing it with Cybele Thinfinity VirtualUI: [https://www.cybelesoft.com/thinfinity/virtualui/](https://www.cybelesoft.com/thinfinity/virtualui/)

---

<div class="post-metadata">

**Author:** ![marcmclean](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@marcmclean](https://discourse.slicer.org/u/marcmclean)\
**Post date:** [April 16, 2019, 12:58am UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/14 "2019-04-16T00:58:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 16, 2019, 1:00am UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/15 "2019-04-16T01:00:43Z")

</div>

> [@marcmclean](#):
>
> No CMAKE\_C\_COMPILER could be found.

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.

> [@marcmclean](#):
>
> I planned on testing it with Cybele Thinfinity VirtualUI

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?

---

<div class="post-metadata">

**Author:** ![marcmclean](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@marcmclean](https://discourse.slicer.org/u/marcmclean)\
**Post date:** [April 16, 2019, 1:08am UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/16 "2019-04-16T01:08:09Z")

</div>

> [@lassoan](#):
>
> You might have multiple Visual Studio versions installed

Yes, I have both VS2015 and VS2017 installed. Do you know if that is a problem for CMake?

---

<div class="post-metadata">

**Author:** ![marcmclean](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@marcmclean](https://discourse.slicer.org/u/marcmclean)\
**Post date:** [April 16, 2019, 1:10am UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/17 "2019-04-16T01:10:06Z")

</div>

> [@lassoan](#):
>
> Slicer runs quite nicely in Docker, would that be an option for you?

The end users must be able to access Slicer through a browser. Is that possible using Docker?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 16, 2019, 1:37am UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/18 "2019-04-16T01:37:12Z")

</div>

> [@marcmclean](#):
>
> Yes, I have both VS2015 and VS2017 installed. Do you know if that is a problem for CMake?

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?

> [@marcmclean](#):
>
> The end users must be able to access Slicer through a browser. Is that possible using Docker?

Yes. Slicer runs in your browser with full GUI.

There is [Slicer image with GUI available via web browser](https://hub.docker.com/r/dit4c/dit4c-container-slicer) but it’s quite old; and there are the [regularly updated images](https://discourse.slicer.org/t/slicer-docker-images/508) but I don’t think any of them is configured to show the GUI in the browser.

@jcfr @pieper Is there a docker image of recent version of Slicer that has web-accessible GUI configured?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 16, 2019, 12:59pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/19 "2019-04-16T12:59:06Z")

</div>

> [@lassoan](#):
>
> @jcfr @pieper Is there a docker image of recent version of Slicer that has web-accessible GUI configured?

Yes, this version has 4.10.1:

```auto
docker run -d -p 8080:8080 --name slicer stevepieper/slicer

```

then open your browser to [http://localhost:8080](http://localhost:8080) and click the X11 button (or you can use [the direct link](http://localhost:8080/x11/vnc.html?autoconnect=true&path=x11/websockify)).

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.

> **[GitHub - pieper/SlicerDockers: docker config files for slicer](https://github.com/pieper/SlicerDockers)**
>
> docker config files for slicer. Contribute to pieper/SlicerDockers development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 16, 2019, 4:07pm UTC](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506/20 "2019-04-16T16:07:39Z")

</div>

Thanks a lot, this image works very well!

[Next page](https://discourse.slicer.org/t/cmake-configure-openssl-error/6506.md?page=2)
