Skip to content

Synergistic IO dependency fix#1194

Open
KrisThielemans wants to merge 5 commits intoSyneRBI:masterfrom
KrisThielemans:synergistic_IO_fix
Open

Synergistic IO dependency fix#1194
KrisThielemans wants to merge 5 commits intoSyneRBI:masterfrom
KrisThielemans:synergistic_IO_fix

Conversation

@KrisThielemans
Copy link
Copy Markdown
Member

@KrisThielemans KrisThielemans commented May 11, 2023

Currently sits on top of #1166, sorry. but I'll rebase once that's merged to master. i first wanted to see if this would work. It's really only the last commit at the moment)

The synergistic library/executables/tests have now been
adapted for DISABLE_Gadgetron etc.

The work-around in common/utilities.* has therefore been removed.

a job with DISABLE_Gadgetron has been added to GHA

Fixes SyneRBI#622
@KrisThielemans
Copy link
Copy Markdown
Member Author

now rebased on top of master

@KrisThielemans
Copy link
Copy Markdown
Member Author

KrisThielemans commented May 30, 2023

When using STIR release, we get when building pystir https://github.com/SyneRBI/SIRF/actions/runs/5073309434/jobs/9112163305?pr=1194#step:8:14957

[ 30%] Building CXX object src/common/CMakeFiles/_pysirf.dir/home/runner/install/share/stir/src/buildblock_registries.cxx.o
/home/runner/install/share/stir/src/buildblock_registries.cxx:23:10: fatal error: stir/SeparableCartesianMetzImageFilter.h: No such file or directory
   23 | #include "stir/SeparableCartesianMetzImageFilter.h"

while with STIR master

ImportError: /home/runner/install/python/sirf/_pysirf.so: undefined symbol: _ZTIN4stir8ExamDataE

which might just be the constructor is the typeinfo structure:

$ c++filt _ZTIN4stir8ExamDataE
typeinfo for stir::ExamData

- removed some superflous include statements
- removed some predeclarations and explicitly include iutilities.h
- add more conditionals to see if certain things can be built
- split csirf library into 2: csirf is now the C++ library, while
cinterface-sirf contains the C wrappers.
This is probably more logical, but also avoids a circular dependency on
ImageDataWrapper (which sits in csyn, but depends on creg etc).
ImageDataWrapper is currently not using in csirf, but only in cinterface-sirf
(i.e. Python/MATLAB)
- remove the option DISABLE_Synergistic when building Python/MATLAB stuff as
disabling it would lead to linking errors (as they need ImageDataWrapper)
@KrisThielemans
Copy link
Copy Markdown
Member Author

KrisThielemans commented Jun 1, 2023

The above problem is fixed now.

However, I still have a Python problem such as

ImportError: /home/sirfuser/devel/install/python/sirf/_pyreg.so: undefined symbol: deleteTextPrinter

@evgueni-ovtchinnikov deleteTextPrinter is declared in cReg.h, but it is not implemented in cReg*cpp. Is it using the implementation in cstir_tw.cpp? If so, creg depends on cstir, which I then should make explicit in the CMake file.

@evgueni-ovtchinnikov
Copy link
Copy Markdown
Contributor

Is it using the implementation in cstir_tw.cpp?

Apparently it is - when I do "Go To Definition" on the prototype in cReg.h, Visual Studio shows me the one in cstir_tw.cpp.

cinterface-Reg depends on STIR for TextWriter

Also fix some MATLAB things related to TextWriter (untested)
@KrisThielemans KrisThielemans added this to the 3.5 milestone Jun 1, 2023
@KrisThielemans KrisThielemans marked this pull request as ready for review June 1, 2023 22:33
@KrisThielemans
Copy link
Copy Markdown
Member Author

@evgueni-ovtchinnikov this is pretty much finished now. I've tried to give descriptive log messages, so maybe that helps in the review. Most important change is that csirf is now split into csirf (C++ lib) and cinterface-sirf (for Python/MATLAB), and same for cReg. I did this for 2 reasons:

  • it's cleaner
  • it also avoids the circular dependency of csirf (actually p/msirf) needing cSyn (for ImageDataWrapper), which needs csirf.

There are a few things that we could still do here:

  • do the same split cinterface-stir and cinterface-gadgetron
  • move iutilities.* (containing C functions for DataHandle) to common (and add it to cinterface-sirf I guess). This is more logical now that we have common. We can then remove the iutilities library (also in Python), but I suppose we'd have to keep it as an empty library until 4.0.
  • rename csirf (again) to common. It is the more logical choice.

These things would be nice, but we could also do them later. Would be cleanest to do the first bullet though (and it's very simple, so I can still do that).

@KrisThielemans KrisThielemans changed the title Synergistic IO fix Synergistic IO dependency fix Jun 1, 2023
@evgueni-ovtchinnikov
Copy link
Copy Markdown
Contributor

Main comment: I very much welcome suggested changes (thought about them myself, but never attempted for lack of understanding of CMake intricacies), but they look too dramatic to me for 3.5 - should this not go to 4.0?

I need more time to study your PR, for now just one minor comment that cannot wait: frankly, I find cinterface-sirf rather ugly. I would rather use csirf for C interface library and cppsirf for C++ library.

@KrisThielemans KrisThielemans modified the milestones: 3.5, v4.0 Jun 8, 2023
@KrisThielemans KrisThielemans self-assigned this Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compilation failure with DISABLE_GADGETRON=ON due to syn_utilities

3 participants