CBICA / CaPTk

Cancer Imaging Phenomics Toolkit (CaPTk) is a software platform to perform image analysis and predictive modeling tasks. Documentation: https://cbica.github.io/CaPTk
https://www.cbica.upenn.edu/captk
Other
175 stars 63 forks source link

struggling to build CaPTk #1376

Closed mschachter closed 3 years ago

mschachter commented 3 years ago

Describe the bug I want to be able to build CaPTk from source, but having trouble finding mutually consistent versions of OpenCV, VTK, and ITK that work. I've tried:

With this combo, Module_ITKVtkGlue is not compatible with OpenCV 3.4.12.

I'm on Ubuntu 20 LTS - and I've also tried just using apt to install opencv, ITK, and VTK. In that case when I try to compile CaPTk there is a missing itk file, itkStripTsImageFilter.h, which is not present in the more recent version of ITK but required by CaPTk.

To Reproduce I don't think you should try to reproduce this behavior...

Expected behavior I would like the build page (https://cbica.github.io/CaPTk/tr_buildFromSource.html) to reflect known working versions of OpenCV, ITK, and VTK, instead of saying "Version x.x and above", because that's not working for me. Alternatively just some up-to-date dependency information in a BUILD file or as a comment in this issue would be useful!

Screenshots n/a

CaPTk Version Clone from master branch on github.

Desktop (please complete the following information):

Additional context I can successfully start the CaPTk after downloading the .bin file, but I haven't extensively tried out functionality yet.

sarthakpati commented 3 years ago

Thanks for your interest in CaPTk and I apologize for the issues you are facing. Tagging @AlexanderGetka-cbica who recently tested CaPTk on Ubuntu 20.04.

AlexanderGetka-cbica commented 3 years ago

Hi @mschachter, thank you for the issue report. I will add a line to the documentation that mentions a good known set of versions once we can confirm. The following combination builds correctly on my machine: OpenCV 3.4.7 VTK 8.1 ITK 4.13

Please let us know if this set of versions works for you.

mschachter commented 3 years ago

Thanks! @AlexanderGetka-cbica - what version of Eigen are you building opencv against?

AlexanderGetka-cbica commented 3 years ago

@mschachter I have it built against Eigen 3.3.7.

sarthakpati commented 3 years ago

Hi @mschachter, thank you for the issue report. I will add a line to the documentation that mentions a good known set of versions once we can confirm. The following combination builds correctly on my machine: OpenCV 3.4.7 VTK 8.1 ITK 4.13

Please let us know if this set of versions works for you.

Hey @AlexanderGetka-cbica, what is the GCC version you used? I know that the all the dependencies are pulled using the Superbuild, BTW.

AlexanderGetka-cbica commented 3 years ago

Hey @AlexanderGetka-cbica, what is the GCC version you used? I know that the all the dependencies are pulled using the Superbuild, BTW.

Last GCC used according to my logs was 7.5.0.

mschachter commented 3 years ago

Thanks again for the quick response. I'm not having success with the combinations mentioned by @sarthakpati. There are some caveats to the versions reported:

VTK 8.1: the versions tagged on github are 8.1.x - I'm using 8.1.2, for example. I do not see VTK_USE_QT and VTK_USE_QVTK_QTOPENGL tags in the ccmake advanced config, although these flags were mentioned on the CaPTk build page. ITK 4.13: The most recent tag is 4.13.3, I'm using this version. I don't know what tag 4.13 corresponds to. Maybe 4.13.0? *OpenCV: I'm using 3.4.7, as suggested.

I can't compile ITK 4.13.3 against OpenCV 3.4.7, the Module_ITKVtkGlue code is again not compatible, it uses the C version of OpenCV.

@sarthakpati - if possible could you tell me the sub-sub-versions of VTK and ITK you are using? I can probably figure this out on my own, but don't have a ton of time to do so.

AlexanderGetka-cbica commented 3 years ago

@mschachter The versions I have (from our superbuild) are ITK 4.13.0 and VTK 8.1.0 specifically.

sarthakpati commented 3 years ago

Okay, so could you try this:

mschachter commented 3 years ago

Thanks @sarthakpati - I'm using GCC 9 and building dependencies fails with this error:

In file included from /home/mschachter/code/3p/captk/bin_depends/ITK-source/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_iostream.h:5, from /home/mschachter/code/3p/captk/bin_depends/ITK-source/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_deprecated.cxx:4: /home/mschachter/code/3p/captk/bin_depends/ITK-source/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h:101:4: error: #error "Dunno about this gcc" 101 | # error "Dunno about this gcc" | ^~~~~ make[5]: *** [Modules/ThirdParty/VNL/src/vxl/vcl/CMakeFiles/itkvcl.dir/build.make:63: Modules/ThirdParty/VNL/src/vxl/vcl/CMakeFiles/itkvcl.dir/vcl_deprecated.cxx.o] Error 1

I think CaPTk should upgrade it's dependencies... Not making that statement lightly, because I know what a pain that can be :) Is that something the team needs help with? I can work on it in a branch and submit a PR if I get something working.

sarthakpati commented 3 years ago

I can work on it in a branch and submit a PR if I get something working

It would be amazing if you could submit a PR for this!

I am not very familiar with the error that you mention, do you think you could try with a lower GCC version (I think we have tested with around GCC 6 - perhaps @AlexanderGetka-cbica has tried something newer?).

AlexanderGetka-cbica commented 3 years ago

@sarthakpati I strongly believe it works on GCC 7.5.0 based on my last-used compiler on my Ubuntu workstation, but for versions beyond that I am not sure.

@mschachter This would be an awesome (and highly appreciated) change; thank you for the offer to help out!

mschachter commented 3 years ago

Thanks for the replies - yes it probably has much to do with my GCC version, but it wouldn't make sense for me to downgrade. I'll start looking into upgrading the dependencies (Eigen, OpenCV, VTK, ITK) and will make a new post on feasibility some time in the hopefully near future :)

Closing this bug for now, thanks again!