# Not all modules are enabled after build

**URL:** <https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644>\
**Category:** Development\
**Created:** [December 29, 2019, 3:23pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644 "2019-12-29T15:23:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [December 29, 2019, 3:23pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/1 "2019-12-29T15:23:26Z")

</div>

**Hi, I have build the 3d slicer following the instructions given in the document. I am getting the following error:**  
CUSTOMBUILD : error : Target (for copy\_if\_different command) “C:/D/D/Slicer-build/lib/Slicer-4.11/cli-modules/Debug” is not a directory. [C:\D\D\Slicer-build\Base\QTCLI\Testing\InstallPyCLITest4.vcxproj]

**This is what I get when I launch the slicer.exe**  
qt.network.ssl: QSslSocket: cannot resolve SSL\_set\_alpn\_protos  
qt.network.ssl: QSslSocket: cannot resolve SSL\_CTX\_set\_alpn\_select\_cb  
qt.network.ssl: QSslSocket: cannot resolve SSL\_get0\_alpn\_selected  
When loading module “DICOM” , the dependency “SubjectHierarchy” failed to be loaded.  
When loading module “DICOM” , the dependency “SubjectHierarchy” failed to be loaded.  
When loading module “DICOMPatcher” , the dependency “DICOM” failed to be loaded.  
When loading module “MarkupsWidgetsSelfTest” , the dependency “Markups” failed to be loaded.  
When loading module “MultiVolumeImporter” , the dependency “MultiVolumeExplorer” failed to be loaded.  
When loading module “NeurosurgicalPlanningTutorialMarkupsSelfTest” , the dependency “Segmentations” failed to be loaded.  
When loading module “PlotsSelfTest” , the dependency “Plots” failed to be loaded.  
When loading module “SegmentEditor” , the dependency “Segmentations” failed to be loaded.  
When loading module “SegmentStatistics” , the dependency “SubjectHierarchy” failed to be loaded.  
When loading module “SubjectHierarchyCorePluginsSelfTest” , the dependency “SubjectHierarchy” failed to be loaded.  
When loading module “SubjectHierarchyGenericSelfTest” , the dependency “SubjectHierarchy” failed to be loaded.  
When loading module “TablesSelfTest” , the dependency “Tables” failed to be loaded.  
SliceAnnotations: Disable features relying on vtkPVScalarBarActor

These are the modules enabled. Please see the snapshot:

 ![3dslicer](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/a/2aad80e0c281a8c91cafc387b7bf7449388a12b7.png)

---

<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:** [December 29, 2019, 7:19pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/2 "2019-12-29T19:19:43Z")

</div>

There seems to be an error during your Slicer build. The build error you copied is probably not the first one but a consequence of previous errors. It would be important to identify the very first error occurred during build.

---

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [December 30, 2019, 12:25pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/3 "2019-12-30T12:25:37Z")

</div>

Thanks for your reply. But there is only one error. There is no cli\_modules folders. Can you tell me which project creates the cli\_modules folder?

---

<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:** [December 30, 2019, 4:39pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/4 "2019-12-30T16:39:29Z")

</div>

I don’t think cli\_modules are created by any projects. CLI modules are built in `(build-dir)\Slicer-build\lib\Slicer-4.11\cli-modules`.

---

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [December 30, 2019, 7:21pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/5 "2019-12-30T19:21:53Z")

</div>

Do you mean that these files should be present when visual studio solution files are generated using cmake-gui? If not then it should get downloaded while building? What could be the issue? Following same steps, I am able to build in an another laptop. The only difference is that one got professional visual studio and other got enterprise(not working here). I have exactly followed the steps given in the documentation link.

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

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/c/3cee28f40388d93b1157389c74ed345bf235bfae.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/6/56abdfd021d616cd20a57b85dccaee53bde45685.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/8/0869deb7d08d635f98c44f5d07268d0d065a6715.png)

---

<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:** [December 30, 2019, 7:39pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/6 "2019-12-30T19:39:18Z")

</div>

> [@harajyoti\_das](#):
>
> CUSTOMBUILD : error : Target (for copy\_if\_different command) “C:/D/D/Slicer-build/lib/Slicer-4.11/cli-modules/Debug” is not a directory. [C:\D\D\Slicer-build\Base\QTCLI\Testing\InstallPyCLITest4.vcxproj]

I actually ran into this exact same issue just recently as part of some testing for a PR. I had a clean build building ITK 5.1rc01 and then it ultimately failed at SimpleITK, as I expected, so I cleaned out all SimpleITK build directories and files and rebuilt using a newer SimpleITK version and it succeeded but then I noticed it kept getting stuck at this error in the Slicer build project.

As a workaround I just manually created the “ c:/D/D/Slicer-build/lib/Slicer-4.11/cli-modules/$BUILD\_TYPE” directory and then ran the build process again and it completed the Slicer project successfully.

I’m unsure if the build error was originally because my SimpleITK project had failed in a prior run or something to do with the parallel build process as I specify 12 threads to use. I didn’t look much further into it as manually creating the missing directory fixed my issue.

---

<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:** [December 30, 2019, 8:14pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/7 "2019-12-30T20:14:07Z")

</div>

Partially cleaned out build trees and parallel builds are not guaranteed to work. The nightly dashboard shows that clean builds are successful on Windows and Mac (there is a [build error on Linux due to a recent attempt to add sqlite3 to Python](https://discourse.slicer.org/t/import-sqlite-issue-in-slicelet/5691/20), but that should not affect Windows).

Visual Studio Edition should not matter.

What CMake version do you use?  
Do you have any third-party antivirus software installed?

---

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [December 31, 2019, 3:33am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/8 "2019-12-31T03:33:01Z")

</div>

CMake Version 3.16.2. No third party antivirus software installed.

I again build it and got the same error. Here is the link to the build log.

[https://file.io/yXXICq](https://file.io/yXXICq)

Please check it and let me know if you get any clue.

---

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [December 31, 2019, 3:34am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/9 "2019-12-31T03:34:20Z")

</div>

I will try this tonight my time and let you know. Thanks for your advice.

> As a workaround I just manually created the “ c:/D/D/Slicer-build/lib/Slicer-4.11/cli-modules/$BUILD\_TYPE” directory and then ran the build process again and it completed the Slicer project successfully.

---

<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:** [December 31, 2019, 3:39am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/10 "2019-12-31T03:39:33Z")

</div>

> [@harajyoti\_das](#):
>
> I again build it and got the same error. Here is the link to the build log.
> 
> [Deleted](https://file.io/yXXICq)

The page gives “404 Page not found” error.

> [@harajyoti\_das](#):
>
> CMake Version 3.16.2.

Bugs are quite often introduced in new CMake releases. You might try an earlier version to see if that works (I’ve built Slicer from scratch successfully, using CMake 3.14.3).

---

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [December 31, 2019, 4:13am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/11 "2019-12-31T04:13:19Z")

</div>

check this link.

[https://file.io/v67Kik](https://file.io/v67Kik)

---

<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:** [December 31, 2019, 4:25am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/12 "2019-12-31T04:25:34Z")

</div>

Same issue:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/2/c2785a3c647bde6ba4d4327bf724020a1b4a566e.png)

---

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [December 31, 2019, 5:49am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/13 "2019-12-31T05:49:18Z")

</div>

This should work

> **[build\_output.txt](https://www.dropbox.com/s/1btpsrhh0o6e9zl/build_output.txt?dl=0)**
>
> Shared with Dropbox

---

<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:** [December 31, 2019, 12:02pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/14 "2019-12-31T12:02:35Z")

</div>

@harajyoti_das Did you manually try creating the missing directory as I suggested? Did you do a regular build action of the Slicer project after this or did you do any cleaning actions? The error in your log indicates the directory isn’t present.

---

<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:** [December 31, 2019, 2:51pm UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/15 "2019-12-31T14:51:17Z")

</div>

I’ve checked the log and it seems you have enabled parallel build:

Your failed build logs (note how building of files from project 22 and 11 are interleaved):

```auto
22> archive_write_open_file.c
22> archive_write_open_filename.c
22> archive_write_open_memory.c
11> dcvrod.cc
22> archive_write_add_filter.c
22> Generating Code...
11> dcvrof.cc
22> Compiling...
22> archive_write_add_filter_b64encode.c
22> archive_write_add_filter_by_name.c
11> dcvrol.cc

```

My successful build logs (not that project 11 are not built while building project 22):

```auto
    archive_write_open_file.c
    archive_write_open_filename.c
    archive_write_open_memory.c
    archive_write_add_filter.c
    Generating Code...
    Compiling...
    archive_write_add_filter_b64encode.c
    archive_write_add_filter_by_name.c

```

In parallel builds, build order projects can randomly change (it is only guaranteed that a project build starts after all dependencies are built). This seems to cause an error because a copy is attempted to be copied into a folder that does not exist yet.

Have you intentionally enabled parallel build?  
Could you provide the content of your top-level CMakeCache.txt file?

---

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [January 1, 2020, 10:31am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/16 "2020-01-01T10:31:47Z")

</div>

No, I have not intentionally enabled parallel build.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/4/745004fe966289d54840cddd4e1920df2797de1c.png)

Shall I set this to 1?

Please see the CMakeCache.txt file for your reference.

> **[CMakeCache.txt](https://www.dropbox.com/s/s5wvun1gngnpoo8/CMakeCache.txt?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [January 1, 2020, 10:48am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/17 "2020-01-01T10:48:17Z")

</div>

I created the missing directory and built it but I got lot of linking errors after that. At present I don’t have that build log. Did you rebuild the solution after creating missing folder or just simply build it?

The shared log is of a fresh build.

---

<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:** [January 2, 2020, 12:04am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/18 "2020-01-02T00:04:42Z")

</div>

If the issue is indeed parallel building then restarting the build several times should eventually lead to a successful build.

---

<div class="post-metadata">

**Author:** ![harajyoti\_das](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harajyoti_das/32/5529_2.png) [@harajyoti\_das](https://discourse.slicer.org/u/harajyoti_das)\
**Post date:** [January 2, 2020, 3:16am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/19 "2020-01-02T03:16:00Z")

</div>

Thanks a lot Lassoan, The build is successful now after I disabled the parallel build. I think this should be added in the documentation.

---

<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:** [January 2, 2020, 4:56am UTC](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644/20 "2020-01-02T04:56:16Z")

</div>

Which exact option did you change (where was it, what was the original value and what did you set it to)?

[Next page](https://discourse.slicer.org/t/not-all-modules-are-enabled-after-build/9644.md?page=2)
