UCL / PETPVC

Partial Volume Correction in PET
Apache License 2.0
50 stars 14 forks source link

Can't install PETPVC #92

Closed garincle closed 10 months ago

garincle commented 10 months ago

Hello, I did not managed to install PETPVC I am working on a Linux machine running Ubuntu 22.04 and I have got the following error when doing

- make


In file included from /InsightToolkit-4.13.2/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_limits.h:5,
                 from /InsightToolkit-4.13.2/Modules/Core/Common/include/itkNumericTraits.h:51,
                 from /InsightToolkit-4.13.2/Modules/Core/Common/include/itkConceptChecking.h:32,
                 from /InsightToolkit-4.13.2/Modules/Core/Common/include/itkAtomicIntDetail.h:39,
                 from /InsightToolkit-4.a13.2/Modules/Core/Common/include/itkAtomicInt.h:38,
                 from /InsightToolkit-4.13.2/Modules/Core/Common/include/itkTimeStamp.h:33,
                 from /InsightToolkit-4.13.2/Modules/Core/Common/include/itkLightObject.h:23,
                 from /InsightToolkit-4.13.2/Modules/Core/Common/include/itkObject.h:31,
                 from /InsightToolkit-4.13.2/Modules/Core/Common/include/itkDataObject.h:31,
                 from /InsightToolkit-4.13.2/Modules/Core/Common/include/itkProcessObject.h:31,
                 from /InsightToolkit-4.13.2/Modules/Core/Common/include/itkImageSource.h:31,
                 from /InsightToolkit-4.13.2/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.h:21,
                 from /PETPVC/test/CreateTestImage.cxx:36:
/InsightToolkit-4.13.2/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h:101:4: error: #error "Dunno about this gcc"
  101 | #  error "Dunno about this gcc"
      |    ^~~~~
make[2]: *** [test/CMakeFiles/pvc_createTestImage.dir/build.make:76 : test/CMakeFiles/pvc_createTestImage.dir/CreateTestImage.cxx.o] Erreur 1
make[1]: *** [CMakeFiles/Makefile2:144 : test/CMakeFiles/pvc_createTestImage.dir/all] Erreur 2
make: *** [Makefile:166 : all] Erreur 2
KrisThielemans commented 10 months ago

2 options:

garincle commented 10 months ago

tks I did install the new version of ITK but it didn't work either. Do you know how to use an older compiler version? Should I just delete cmake or is there a way to use an older version directly?

KrisThielemans commented 10 months ago

I'd have hoped more recent ITK would work. We test in various configurations (see e.g. https://github.com/UCL/PETPVC/blob/master/azure-pipelines.yml). Can you give error messages please?

Switching compiler versions needs to be done in a new build directory (CMake cannot switch compilers after it has configured once). Best way seems to be to set CXX environment variable, as in

CXX=g++-8 ccmake ...
garincle commented 10 months ago

Hey, it seems that you were right (of course) =); my bashrc was still pointing at an older version of itk! and by updating it, the install worked. Thank you so much for your help.

KrisThielemans commented 10 months ago

Perfect. thanks for trying and letting us know.