I have an error with my loadable module. I’ve built the Slicer stable version (revision 26489) and I’ve built my module against it without errors. The module works as intended when I launch the built Slicer version. However, if I try to launch module with the binary Slicer release (downloaded from the website, the 4.8.0 version - same as the built revision) the Slicer crashes before opening and I get the following error:
“terminate called after throwing an instance of ‘H5::DataSpaceIException’”
Has anyone encountered such an error and do you know how to fix it? I’m using Slicer on Linux.
Generally speaking, mixing self-built binaries with slicer.org packaged versions is not supported (for any OS). The linux factory runs a relatively old OS and compiler suite in order to maximize system library compatibility, which means there can easily be ABI mismatches if you build with newer default compilers. You can see the factory version information here.
Given the error message, the specific problem might be mixing different HDF5 libraries in the same process, which is unlikely to work due to e.g. mismatched allocators (and other possible problems).
If your extension is open-source then you can submit it to the Slicer extension index and Slicer factory machines will build it for you on all platforms and make available for download through the extension manager.
If it’s a proprietary module, then you have to distribute your custom extension along with your custom-built Slicer. You can include your extension in the Slicer package (so that you have a single installer) and can set custom application name, settings, etc. (see full set of customization options here).
I think that’s a good idea and I will submit it to Slicer extension index.
A different question on that regard - my module depends on Segment Comparison Module from Slicer RT extension. I can change the cmake files so that it builds on my machine, but I don’t know how to do it properly so it can also be build anywhere. Do you have maybe an example that I could follow?
Extension dependencies can be set in the main CMakeLists file, for example
The factory machines do the building properly, and when someone installs your extension (in Extension Manager) that depends on another, dependent extensions are automatically installed too.
Expecting people to manually build everything is not reasonable anyway, so if your module is not in an extension yet, then it’s time to make one.
If for some reason you don’t want to do that, you can create packages yourself by building the “package” project. It generates a zip file that you can install from Extension Manager using a menu option under the wrench icon next to the search bar.