-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix modern itk and vtk conformance #143
Conversation
Hi Steve (@pieper), will Hans' changes be complatible with Slicer? |
Hi @tashrifbillah - I think yes, they look minor and Slicer is pretty up to date with the latest VTK and ITK versions inn prep for Slicer5 release. |
Hello @hjmjohnson , did you test as:
|
@tashrifbillah UKF has some tests for building for 8 year old versions of Mac. Slicer now has a minimum requirement of 10.13 or greater for mac. Is it OK to update UKF to also have the same minimum requirements as slicer? PS: I'm running the build test suggested above, but I am 99% sure it will succeed. |
@pieper , can you answer this quickly? Otherwise, I'll have to do my research on it. @hjmjohnson , if you are testing on MAC, I can test your PR on CentOS 7 Linux. @yrathi , do we need support of CentOS 6 anymore? |
@tashrifbillah The mac build is failing due to known problems with the old version of Eigen. If I update Eigen as well, then the build succeeds. |
Thanks @hjmjohnson and @tashrifbillah. We dont need support for CentOS 6. And Yes, we can update UKF to have the minimum requirement as Slicer. |
This now builds on mac 10.15 again. super build packages brought up-to-date with slicer versions of packages. |
I have a series of code maintenance and C++14 performance updates that I would like to apply. Is there support/interest in adopting coding styles and performance improvements as vetted and incorporated in the ITK and VTK communities for UKF? The proposed code transformations have been very safe as applied to many ITK-derived projects so far. |
Your initial PR failed to build in my CentOS 7 ... |
b680bce
to
81d29f1
Compare
@tashrifbillah NOTE: Centos7 has a default compiler install of "GCC 4.8.5" which does not fully support C++11. Centos7 was first released in 2009. We have a large cluster of computers still running and performing well with Centos7, but they have provided alternative compilers to keep up with code bases that require C++11. |
@tashrifbillah Can you let me know what compiler toolchain you were attempting to use on Centos7, and what the error you came across was? |
What GCC did you use? |
@tashrifbillah my cluster has 8.3.0 available. I am trying to find the build errors with 4.8.5 now, I expect this build to fail. I will then attempt a gcc 8.3.0 build. Hans |
I have other GCCs I can try. I just wanted to know what you used. No need to try with CentOS 7 default. |
@tashrifbillah -- We should be sure that UKF builds on both the PNL network and the cluster (without having to use any containers etc.). If it doesn't, then we need to think if this update should be applied or not. |
@tashrifbillah I messed up the VTK clone command in a previous patch fix. The error was not identified until I did a clean build. updated PR coming soon. |
@tashrifbillah NOTE: Minimum compiler version supported by ITK for C++14 is claimed to be gcc 5.1. I've added a file to test known minimum compiler versions. Doing a clean build with gcc8.3.0 ... SUCCEEDED! |
5374fc5
to
ba5fe31
Compare
@tashrifbillah Do you have any concerns with this PR? I would love to get this PR included. Hans |
Sorry Hans, we didn't get time to work on it again yet. I shall get to it soon. |
Hans, what is your cmake version? $ cmake ..
CMake Error at CMakeLists.txt:15 (cmake_minimum_required):
CMake 3.16.3 or higher is required. You are running version 3.14.2
-- Configuring incomplete, errors occurred! I want to understand if you have mandated the above or GCC 7.3.0 I am using has. |
Ping @hjmjohnson |
@tashrifbillah ITK requires cmake version 3.16.3 to compile. |
Testing update:
|
Now that we are done with building, I shall review your proposals on Eigen, Boost, Apple, and Win32 later. |
error "Do not include itkExceptionObject.h directly, include itkMacro.h instead."
[8/14] Building CXX object vtk2mask/CMakeFiles/vtk2maskLib.dir/Converter.cc.o UKF/vtk2mask/Converter.cc: In member function ‘void Converter::WriteOutNrrd(const string&)’: UKF/vtk2mask/Converter.cc:305:31: warning: catching polymorphic type ‘class itk::ExceptionObject’ by value [-Wcatch-value=] 305 | catch( itk::ExceptionObject e ) | ^ UKF/vtk2mask/Converter.cc:322:33: warning: catching polymorphic type ‘class itk::ExceptionObject’ by value [-Wcatch-value=] 322 | catch( itk::ExceptionObject e ) | ^ ninja: build stopped: subcommand failed.
New version of VTK enforces constraint that was previously commented as unsafe usage. The requirement that the returned array is not modified is now enforced by requiring const in the variable declaration. UKF/fibertractdispersion/fiberbundle.cxx: In member function ‘void fiberbundle::ReadFibers(std::string)’: UKF/fibertractdispersion/fiberbundle.cxx:43:43: error: no matching function for call to ‘vtkCellArray::GetNextCell(vtkIdType&, const vtkIdType**)’ 43 | if(curLines->GetNextCell(nPoints, &pts) == 0) | ^ In file included from NAMICExternalProjects-Release-5.8.0/include/vtk-9.1/vtkPolyData.h:68, from UKF/fibertractdispersion/fiberbundle.h:5, from UKF/fibertractdispersion/fiberbundle.cxx:1: NAMICExternalProjects-Release-5.8.0/include/vtk-9.1/vtkCellArray.h:1497:12: note: candidate: ‘int vtkCellArray::GetNextCell(vtkIdType&, const vtkIdType*&)’ 1497 | inline int vtkCellArray::GetNextCell(vtkIdType& npts, vtkIdType const*& pts) VTK_SIZEHINT(pts, npts) | ^~~~~~~~~~~~ NAMICExternalProjects-Release-5.8.0/include/vtk-9.1/vtkCellArray.h:1497:73: note: no known conversion for argument 2 from ‘const vtkIdType**’ {aka ‘const long long int**’} to ‘const vtkIdType*&’ {aka ‘const long long int*&’} 1497 | inline int vtkCellArray::GetNextCell(vtkIdType& npts, vtkIdType const*& pts) VTK_SIZEHINT(pts, npts) | ~~~~~~~~~~~~~~~~~~^~~ NAMICExternalProjects-Release-5.8.0/include/vtk-9.1/vtkCellArray.h:1512:12: note: candidate: ‘int vtkCellArray::GetNextCell(vtkIdList*)’ 1512 | inline int vtkCellArray::GetNextCell(vtkIdList* pts) | ^~~~~~~~~~~~
Only support the same OSX deployments as Slicer.
Simplify the conditional statements for building on mac now that older versions of the MacOSX are not supported.
Retrieving a shallow copy of the ITK git repository is failing.
For compilers that are known to fail to build ITK the failure should occur quickly in the build process.
Bring superbuild packages in line with Slicer. Slicer is in the process of updating its minimum required compiler standard to c++14. This PR updates the external packages to be inline with the Slicer versions of the packages. Update External_Boost to modern version.
ba5fe31
to
1ede1e2
Compare
@tashrifbillah I rebased on the latest master branch. Is there something I can do to help push this set of changes through? |
@tashrifbillah Are there outstanding concerns with this update? |
Sorry we kind of forgot about it. I shall take one final look at it tomorrow and reach out with questions should I have any. Thank you Hans. |
@tashrifbillah Any concerns found? |
@yrathi Are there outstanding concerns with this PR? I'm trying to clear my summer todo list. |
@hjmjohnson -- I dont think @tashrifbillah got a chance to double check things. I will wait for his response. |
@yrathi Can this be merged yet? |
Hans, I see that Jean added more commits. So I need to test this PR again in both places as Yogesh noted. |
To make GCC-7.3.0 discoverable to
Note: CC and CXX settings were discovered later. Maybe PATH and LD_LIBRARY_PATH settings are not required. Just PATH and LD_LIBRARY_PATH settings do not make it discoverable. |
Jean's update results in the following error. It could not be built in our cluster environment:
Hans, note that your updates had built fine at that time. I waited to read your PR line by line but never got a chance. |
In workstation, it fails with a different error:
|
@tashrifbillah I don't know how to interpret your last messages. Are you rejecting these changes? Is the bug related to Jean's changes? None of the recent messages seem to be related to the PR. |
Yes. |
All of the. |
You can undo Jean's changes or have him fix the errors I reported in #143 (comment) and #143 (comment) . |
@tashrifbillah I'm going to close this issue as there does not seem to be interest in these updates. |
Update to include conformance with newer ITK and VTK enforced constraints.
ITK 5.3 and VTK 9.1
These changes should be backward compatible.