Skip to content
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

conflict in Nifti library when building with ITK>=5.3 #892

Open
KrisThielemans opened this issue Mar 20, 2024 · 1 comment
Open

conflict in Nifti library when building with ITK>=5.3 #892

KrisThielemans opened this issue Mar 20, 2024 · 1 comment
Milestone

Comments

@KrisThielemans
Copy link
Member

Building with system ITK (installed via conda, currently ITK 5.3), NiftyReg and ITK both use the nifti library and are not careful about conflicts, leading to

In file included from /home/kris/devel/install/include/nifti1_io.h:18,
                 from /home/kris/devel/install/include/_reg_maths.h:22,
                 from /home/kris/devel/install/include/_reg_tools.h:20,
                 from /home/kris/devel/buildConda/sources/SIRF/src/Registration/cReg/include/sirf/Reg/NiftiImageData.h:40,
                 from /home/kris/devel/buildConda/sources/SIRF/src/Registration/cReg/include/sirf/Reg/NiftiImageData3D.h:32,
                 from /home/kris/devel/buildConda/sources/SIRF/src/Synergistic/cSyn/utilities.cpp:34:
/home/kris/devel/install/include/nifti1.h:144:11: error: redefinition of 'struct nifti_1_header'
  144 |    struct nifti_1_header
      |           ^~~~~~~~~~~~~~
In file included from /home/kris/miniconda3/envs/cilsirfbuild/include/ITK-5.3/nifti1_io.h:18,
                 from /home/kris/devel/buildConda/sources/SIRF/src/Registration/cReg/include/sirf/Reg/NiftiImageData.h:32:
/home/kris/miniconda3/envs/cilsirfbuild/include/ITK-5.3/nifti1.h:148:8: note: previous definition of 'struct nifti_1_header'
  148 | struct nifti_1_header { /* NIFTI-1 usage         */  /* ANALYZE 7.5 field(s) */
      |        ^~~~~~~~~~~~~~

I'm not sure though why ITK is in the include path here.

@KrisThielemans KrisThielemans changed the title conflict in Nifti library when building with installed ITK conflict in Nifti library when building with installed ITK>=5.3 Sep 30, 2024
@KrisThielemans
Copy link
Member Author

KrisThielemans commented Oct 1, 2024

More investigation shows that

Some more info in KCL-BMEIS/niftyreg#117.

We currently are limited to ITK<=5.2 therefore, until either NiftyReg updates, InsightSoftwareConsortium/ITK#1450 gets fixed, or UCL/STIR#1518 gets merged (and we require it). Luckily, the latter seems simple...

@KrisThielemans KrisThielemans changed the title conflict in Nifti library when building with installed ITK>=5.3 conflict in Nifti library when building with ITK>=5.3 Oct 1, 2024
@KrisThielemans KrisThielemans added this to the v4.0 milestone Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant