Not all modules are enabled after build

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:

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.

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?

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.

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

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.

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, 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?

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

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

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.

The page gives “404 Page not found” error.

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).

check this link.

https://file.io/v67Kik

Same issue:

This should work

@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.

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):

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):

    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?

No, I have not intentionally enabled parallel build.

Shall I set this to 1?

Please see the CMakeCache.txt file for your reference.

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.

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

1 Like

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

1 Like

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