I recently switched from Mac to Linux, so I downloaded the stable Linux release (4.8.1). I’m not as familiar with Linux, so I don’t know how to add extensions. With the Mac version I could load the GUI and do it that way, but I’m having trouble getting the SwissSkullStripping tool on the Linux build.
Oh, okay, I was now able to run the GUI and install the SwissSkullStripper extension. I added this to my path, but when I went to run SwissSkullStripper on the command line, I received the following error:
SwissSkullStripper: error while loading shared libraries: libSwissSkullStripperLib.so: cannot open shared object file: No such file or directory
To run a CLI module outside Slicer, you need to use the launcher, which sets up all necessary shared library paths. Something similar to this should work (you might need to specify full or relative path for the module executable):
I am calling CLI module from another scripted module, but without setting that LD_LIBRARY_PATH the CLI module is not loaded (the command line, during Slicer app startup, displays the same error message as in @dlevitas case - error while loading shared libraries )
I have tried to run it with the latest stable and nightly versions but the result is still the same.
FIX: The error message does not show up during Slicer startup but when the CLI module is called.
The error message is following:
/path.../Slicer4101/TestExtension- packaged/7d48c57-linux-amd64-TestExtension-local0-0000-00-00/lib/Slicer-4.10/cli-modules/TestCLIModule: error while loading shared libraries: libTestCLIModuleLib.so: cannot open shared object file: No such file or directory
I am trying to install CLI module which I am implementing myself. It is built using https://github.com/Slicer/SlicerBuildEnvironment exactly slicer/buildenv-qt5-centos7:slicer-4.10 with the following cmake parameters:
(side note, offtopic: I was not sure about how to set Qt5 path properly inside docker container, so I used locally installed Qt5)
I tried to download and install randomly selected extension from extension manager (SwissSkullStripper) and everything works all fine, but I don’t know which type module it is so it maybe does not prove anything.
Compare the zip file that you download from the appstore with the zip file that you generate. Are there any differences in the directory structure, file names, or content of non-binary files?
I am not sure how to download an extension from the extension manager directly - to get the zip file. But checking the module import paths in the application settings it looks it is probably the same as the one I built and packaged.
Note, the module seems to be registered - it is present in slicer.modules.MODULE_NAME and when calling the CLI module cmd output include lines “TestCLIModule standard error:” then the error message I posted earlier, and finally “TestCLIModule completed with errors” afterward.
Anyway, thanks for providing links to custom Slicer package creation. But, it this case, if there is any other working way I would prefer distributing the modules separately.
Open this URL: @KitwareMedical/slicer-extensions-webapp (replacing revision as needed) then click Download. It is very important to know if there are any differences, even very small differences (4.10 vs 4.11) may break things.
I don’t think you can reliably distribute modules separately (to be used with Slicer executable that someone else creates) due to potential ABI incompatibility issues.
Speaking about possible ABI compatibility issues, I thought that it can be overcome using Docker predefined images - if they are the same as used for official builds.