# Build failure windows

**URL:** https://discourse.slicer.org/t/build-failure-windows/7322
**Category:** Development
**Created:** [June 26, 2019, 6:36pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322 "2019-06-26T18:36:31Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![gregsharp.geo](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@gregsharp.geo](https://discourse.slicer.org/u/gregsharp.geo)
#### Post date: [June 26, 2019, 6:36pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/1 "2019-06-26T18:36:31Z")

</div>

Hi, I get VTK build failure on VS 2017.

```
Error	LNK1181	cannot open input file 'C:\S\tbb-install\lib\intel64\tbb.lib' [C:\S\VTK-build\vtkCommon.vcxproj]	VTK	C:\S\LINK	1	
Error	LNK1181	cannot open input file 'C:\S\VTK-build\lib\Release\vtkOpenGL-8.2.lib' [C:\S\SlicerExecutionModel-build\ModuleDescriptionParser\ModuleDescriptionParser.vcxproj]	SlicerExecutionModel	C:\S\LINK	1	
Error	LNK1181	cannot open input file 'C:\S\VTK-build\lib\Release\vtkChartsCore-8.2.lib' [C:\S\CTK-build\CTK-build\Libs\Visualization\VTK\Core\CTKVisualizationVTKCore.vcxproj] [C:\S\CTK-build\CTK.vcxproj]	CTK	C:\S\LINK	1	

```

Indeed, the tbb is located in a subfolder:

```
$ dir
12/06/2017 08:54 AM <DIR> vc12
12/06/2017 08:54 AM <DIR> vc12_ui
12/06/2017 08:54 AM <DIR> vc14
12/06/2017 08:54 AM <DIR> vc14_uwp

```

Any idea what is going on?

---

<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: [June 27, 2019, 4:56am UTC](https://discourse.slicer.org/t/build-failure-windows/7322/2 "2019-06-27T04:56:35Z")

</div>

The compiler is looking for the file in incorrect location. It is at `c:\S\tbb-install\lib\intel64\vc14`. If you use VS2017 then make sure to [use VS2015 toolset](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions/Configure#Windows).

---

<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: [June 27, 2019, 5:16am UTC](https://discourse.slicer.org/t/build-failure-windows/7322/3 "2019-06-27T05:16:22Z")

</div>

Reading more about Tbb, it seems that we could link the against the same version when using VS2017.  
See [https://github.com/intel/tbb/issues/65#issuecomment-403066264](https://github.com/intel/tbb/issues/65#issuecomment-403066264) and [https://github.com/intel/tbb/blob/2019\_U8/doc/Release\_Notes.txt](https://github.com/intel/tbb/blob/2019_U8/doc/Release_Notes.txt)

---

<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: [June 27, 2019, 5:25am UTC](https://discourse.slicer.org/t/build-failure-windows/7322/4 "2019-06-27T05:25:44Z")

</div>

VS2015 toolset is probably needed anyway: last time I tried a couple of weeks ago ITK or some other libraries failed to build with VS2017 and maybe it is needed for compatibility with Python binaries, too.

---

<div class="post-metadata">

### Author: ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)
#### Post date: [June 27, 2019, 2:29pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/5 "2019-06-27T14:29:51Z")

</div>

By copying the files from the vc14 subfolder into C:\S\tbb-install\lib\intel64, the VTK compile could succeed. But yes, python could be a problem. I will update status on Friday.

---

<div class="post-metadata">

### Author: ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)
#### Post date: [June 27, 2019, 2:38pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/6 "2019-06-27T14:38:47Z")

</div>

Current Qt installer does not provide 5.10.X (it is not shown in either LTS or archive). Presumably 5.9.8 would therefore be recommended?

---

<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: [June 27, 2019, 5:55pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/7 "2019-06-27T17:55:12Z")

</div>

You need to click “Refresh” after enabling “Archive”.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/9/09ddca58eecd7aed287f8892e370eef08f07f322.png)

---

<div class="post-metadata">

### Author: ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)
#### Post date: [June 27, 2019, 6:14pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/8 "2019-06-27T18:14:33Z")

</div>

That is interesting. I don’t get the extra one at the bottom.  
 ![Capture](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/d/dd317a8f44dde63c006ee4526151db9cc6bb38e6.png)

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [June 27, 2019, 6:23pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/9 "2019-06-27T18:23:11Z")

</div>

Andras may get it because it’s already installed. I added the 5.10.0 download link to the [Build instructions page](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Common_Prerequisites_2). This is the download [link](https://download.qt.io/archive/qt/5.10/5.10.0) itself.

---

<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: [June 28, 2019, 10:15am UTC](https://discourse.slicer.org/t/build-failure-windows/7322/10 "2019-06-28T10:15:05Z")

</div>

I also noticed recently that they removed this archived version of Qt from the maintenance tool as well. Evidently it is intentional [https://bugreports.qt.io/browse/QTBUG-76323](https://bugreports.qt.io/browse/QTBUG-76323)

---

<div class="post-metadata">

### Author: ![gregsharp.geo](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@gregsharp.geo](https://discourse.slicer.org/u/gregsharp.geo)
#### Post date: [June 29, 2019, 3:37pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/11 "2019-06-29T15:37:40Z")

</div>

Back to the original topic, the VS2017 build (with VS2017 toolset) seems to work fine. I only had to copy the tbb.lib (for build) and tbb.dll (for launching).

Everything, including python, seems to work fine.

---

<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: [June 30, 2019, 12:59am UTC](https://discourse.slicer.org/t/build-failure-windows/7322/12 "2019-06-30T00:59:31Z")

</div>

Thank you, it’s good to know. Have you tried to install and use Python packages that contain binaries?

---

<div class="post-metadata">

### Author: ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)
#### Post date: [June 30, 2019, 4:33pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/13 "2019-06-30T16:33:17Z")

</div>

You mean like pip install? Or can you give an example?

---

<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: [June 30, 2019, 5:14pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/14 "2019-06-30T17:14:59Z")

</div>

> can you give an example?

```auto
pip install pandas
pip install scipy

```

Then you could run the corresponding tests.

> I only had to copy the tbb.lib (for build) and tbb.dll (for launching).

Makes sense. I will update the build system so that building with VS2017 works as expected.

> Python packages that contain binaries […] VS2017 + toolset v141

Since v140 and v141 are suppose to be binary compatible, I guess we could update the build instructions.

See [abi - Binary compatibility between VS2017 and VS2015 - Stack Overflow](https://stackoverflow.com/a/44314010/1539918) and [Issue 31340: Use VS 2017 compiler for build - Python tracker](https://bugs.python.org/issue31340#msg301253)

---

<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: [June 30, 2019, 5:22pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/15 "2019-06-30T17:22:27Z")

</div>

If we can build Slicer with VS2017 without losing Python binary compatibility then we should switch to VS2017 because then we could upgrade to latest Qt (which contains a couple of useful improvements and fixes).

---

<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: [June 30, 2019, 6:34pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/16 "2019-06-30T18:34:35Z")

</div>

This PR should allow to build using VS2017. See [https://github.com/Slicer/Slicer/pull/1163](https://github.com/Slicer/Slicer/pull/1163)

Could someone test this is effectively the case ?

After confirming it builds, we may also have to revisit which runtime libraries are packages. Indeed, the package will then have dependency on both VS2015 and VS2017 runtime libraries.

See [https://github.com/Slicer/Slicer/blob/7f08682494af41c7941b62cbcd37a91feffe148b/CMake/SlicerCPack.cmake#L158-L159](https://github.com/Slicer/Slicer/blob/7f08682494af41c7941b62cbcd37a91feffe148b/CMake/SlicerCPack.cmake#L158-L159) and [InstallRequiredSystemLibraries](https://cmake.org/cmake/help/latest/module/InstallRequiredSystemLibraries.html)

---

<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: [June 30, 2019, 7:22pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/17 "2019-06-30T19:22:33Z")

</div>

Could Slicer build with VS2019 as well?

The v142 toolset is binary compatible with v141 and v140. [https://devblogs.microsoft.com/cppblog/cpp-binary-compatibility-and-pain-free-upgrades-to-visual-studio-2019/](https://devblogs.microsoft.com/cppblog/cpp-binary-compatibility-and-pain-free-upgrades-to-visual-studio-2019/)

---

<div class="post-metadata">

### Author: ![gregsharp.geo](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@gregsharp.geo](https://discourse.slicer.org/u/gregsharp.geo)
#### Post date: [June 30, 2019, 10:22pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/18 "2019-06-30T22:22:41Z")

</div>

Well, my first test was a bust. I am not a regular python user, so that is surely why.

I tried “pip install pandas” from the command line:

```
>>> pip install pandas
  File "<console>", line 1
    pip install pandas
              ^
SyntaxError: invalid syntax

```

After some web search, I understood the following is the way to install using pip:

```
c:\S\python-install\bin>PythonSlicer -m pip install pandas
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pandas
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pandas/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pandas/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pandas/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pandas/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pandas/
  Could not fetch URL https://pypi.org/simple/pandas/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pandas/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
  Could not find a version that satisfies the requirement pandas (from versions: )
No matching distribution found for pandas
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping

```

Clearly I misunderstood the procedure, and I will keep looking. If it’s obvious to y’all, any hints are welcome!

---

<div class="post-metadata">

### Author: ![gregsharp.geo](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@gregsharp.geo](https://discourse.slicer.org/u/gregsharp.geo)
#### Post date: [June 30, 2019, 10:28pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/19 "2019-06-30T22:28:41Z")

</div>

Do you think it is because I set `Slicer_USE_PYTHONQT_WITH_OPENSSL` as unchecked?

---

<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: [June 30, 2019, 10:39pm UTC](https://discourse.slicer.org/t/build-failure-windows/7322/20 "2019-06-30T22:39:58Z")

</div>

Yes, configuring python without OpenSSL is why the https url did not work.

From the console you can do `slicer.util.pip_install("pandas")`.

> [@Use full power of Python in Slicer](https://discourse.slicer.org/t/use-full-power-of-python-in-slicer/7162):
>
> Until recently, Slicer used a custom Python build that was not binary compatible with third-party Python packages. Now, in latest Slicer Preview release, any Python packages can be installed and used in Slicer (except those that in direct conflict with version of libraries that are bundled with Slicer). Example: do curve fitting using scipy Install scipy by typing in Slicer’s Python console: pip\_install('scipy') Try a simple curve fitting example: import numpy as np from scipy.optimize im…

[Next page](https://discourse.slicer.org/t/build-failure-windows/7322.md?page=2)
