-
Notifications
You must be signed in to change notification settings - Fork 60
ENH: Add detached vtkIECTransformLogic library to SlicerRT superbuild #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
First thing first. |
It's already the case: https://github.com/EBATINCA/RadiotherapyTransformsIEC (This merge request pulls the repo from there as a Superbuild, as you rightly suggest) |
I've tried to compile without SuperBuild and got some errors:
CMake output:
Compilation output:
Basically SlicerRT can't find non-existent include directory. |
Thanks a lot for checking. I've just fixed the error in the include path. Could you git-pull the IEC repo and retry? |
SuperBuild under Linux compiles and runs without errors. |
You might need to erase the build directory of |
Maybe @gregsharp knows the reason of the Plastimatch build errors when using SuperBuild=off
|
That works! After pull and rebuild, SlicerRT compiles and runs without errors. |
Build works on Windows as well. The problem with finding the DLL is still there though. This is the error at startup. It seems the Beams module cannot locate the IEC dll.
|
Thanks Csaba for checking. I don't have Windows, so it's hard for me to debug, but could you try adding:
or
to see if things improve? I copied that snippet from https://github.com/Slicer/Slicer/blob/main/CMake/SlicerMacroBuildModuleVTKLibrary.cmake#L125 so maybe another option would be to directly copy-paste that full CMake macro instead? |
Neither option helped unfortunately. I printed the directory path and saw that the configuration was missing (DLL was inside a |
Thanks a lot Csaba for checking! Last attempt: does it work if you specify this flag as the hard-coded path where the dlls are found? https://cmake.org/cmake/help/latest/prop_tgt/BUILD_RPATH.html |
Sorry @ferdymercury I'm extremely busy these days, and I have been postponing this because it seems I'd need to look into it in detail and it could take an hour or two. Do you happen to have a more concrete suggestion what to try? Then I can help in a more timely manner. |
No hurries and thanks for the reply. I am sorry not to be a very good helping hand here, as I am no Windows expert. |
I tried this after your latest commit, and the issue is the same as before, some DLLs are not found.
This is now fixed, so if you update Slicer and SlicerRT, and do a clean build, then it will work. We've had some really crazy weeks, but the grants were submitted yesterday. If you have something I can test then happy to do it. |
Hi Csaba, thanks for the reply. |
I did this:
|
You're right! Using that executable it works for me as well. OK then this is just the same "superbuild syndrome" as with other extensions (like SlicerVR, SlicerVMTK, SlicerIGSIO, etc.). I use many extensions at the same time, so I cannot use executables like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR seems good to me! Just three little comments. And please squash the two commits.
Thank you so much for finishing this @ferdymercury ! Sorry for us the whole November has been really crazy (actually from mid-October). Thanks again for your patience and persistence.
@ferdymercury Copying the DLL (SlicerRT_R\bin\Release\vtkIECTransformLogic.dll) on windows to a folder that is included in the additional module directories (such as qt-loadable-modules\Release) fixes the issue, which is acceptable for development. Since this is almost the same structure as for the SlicerIGSIO extension (that some superbuild DLLs are created in Update: These lines are my first suspects. Maybe adding something like this to the bottom of the main CMakeLists.txt file would help |
DrrImageComputation/Logic/vtkSlicerDrrImageComputationLogic.cxx
Outdated
Show resolved
Hide resolved
Thanks for checking! However, to me, the question is more: ¿are the Plastimatch.dll included in that folder "bin" you mention? Because we are following their Superbuild.cmake structure, IGSIO is different in the sense that it directly depends on Slicer from the very beginning. This seems related: https://gitlab.com/plastimatch/plastimatch/-/commit/992b95721d30a4220ee80800f97636556c2700e3 So maybe we could try: |
I think Plastimatch is statically built into the DLLs of different modules. |
It seems that if I use the very same structure as in SlicerIGSIO then the install step is correct. This is the end of the main CMake file after the changes.
I'm doing a clean build too and I'll give an update if there are any issues. Otherwise I think this could be used. |
Amazing, thanks for finding out. The only thing is that we should put this within an "ifdef" clause, something like |
This change is in the main CMake file of SlicerRT, so there is always Slicer. In the meantime the clean build succeeded, and the extension install also worked. Can you add this change to |
Ohh, thanks, I thought you meant in the CMake file of the IEC library. Ok, I will do it. |
ExternalBeamPlanning/Logic/vtkSlicerExternalBeamPlanningModuleLogic.cxx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two extra lines to delete. Please squash the commits and ready to go. Thank you so much!
ExternalBeamPlanning/Logic/vtkSlicerExternalBeamPlanningModuleLogic.cxx
Outdated
Show resolved
Hide resolved
This commit was authored by TrosnyogoSzakoca. I just rebased it to current tip of master branch. -Change existing code to use new library instead of vtkSlicerIECTransformLogic -Delete old vtkSlicerIECTransformLogic -Add new external cmake to superbuild folder -Update CMakeLists -Main problem: dll not found errors during SlicerRT startup FIX: remove debug comment FIX: try to mimick exactly the Plastimatch cmake structure FIX: require package in every submodule, as done with plastimatch FIX: make package was missing the external library vtkIEC Commit by cpinter. Inspired from IGSIO library.
Done! Thanks a lot to you two, you did an amazing job and the outcome is really great. |
Merged! Crossing fingers so that it works on MacOS too, and that there are no other issues either. |
@cpinter
These commits were authored by @TrosnyogoSzakoca. I just tried rebasing it to current tip of master branch trying to fix merge conflicts due to the recent bugfixes by @MichaelColonel (thanks!!).
This should not be merged yet, as according to Mark, there are some problem with finding dlls in Windows (and on my side on Linux it runs well).
Comments/ideas are welcome.
Fixes EBATINCA/RadiotherapyTransformsIEC#19