Since Apple released Beta Versions of the upcoming macOS to the public. We can have a first test run, to see what to expect when building MITK on macOS 10.13.
Description
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | nolden | T23268 Build errors with clang 3.8.1 (Debian 9.1 "Stretch") | ||
Resolved | kislinsk | T23248 Prepare MITK for macOS 10.13 HighSierra support | ||
Restricted Maniphest Task | ||||
Resolved | kislinsk | T22929 Atomic operations API used in CppMicroServices are deprecated in macOS Sierra 10.12.5 |
Event Timeline
Setup Machine with latest macOS 10.13 beta (Build 17A344b).
macOS 10.13 comes with this specs:
clang: clang-900.0.34.1 LLVM: Apple LLVM version 9.0.0 Target: x86_64-apple-darwin17.0.0 XCode: 9 Beta
Error building ITK:
ep/src/ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/linalg/lsqrBase.cxx:565:14: error: ordered comparison between pointer and zero ('std::ostream *' (aka 'basic_ostream<char> *') and 'int') if (nout > 0)
Possible fix
if (nout > (void*)0)
additional patch in ITK-4.11.0.patch
diff --git a/CMakeExternals/ITK-4.11.0.patch b/CMakeExternals/ITK-4.11.0.patch index 9a285c0..0bf2df5 100644 --- a/CMakeExternals/ITK-4.11.0.patch +++ b/CMakeExternals/ITK-4.11.0.patch @@ -20,3 +20,17 @@ index bf2d27d..e321215 100644 endif() itk_module_impl() + +diff --git a/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/linalg/lsqrBase.cxx b/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/linalg/lsqrBase.cxx +index 1f5f9bf..8c62db4 100644 +--- a/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/linalg/lsqrBase.cxx ++++ b/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/linalg/lsqrBase.cxx +@@ -562,7 +562,7 @@ Solve( unsigned int m, unsigned int n, const double * b, double * x ) + // See if it is time to print something. + //---------------------------------------------------------------- + bool prnt = false; +- if (nout > 0) ++ if (nout > (void*)0) + { + if (n <= 40) prnt = true; + if (this->itn <= 10) prnt = true; \ No newline at end of file
patch:
updated ITK-4.11.0.patch file:
An ordered comparison between a pointer and zero is very suspicious. Does it change the intended logic when replacing this with a comparison to nullptr, e.g. if (nout != nullptr)? Is it already fixed in ITK 4.12? If not, consider to contribute.
Jenkins jobs for this branch are setup for macOS 10.13 XCode8 and XCode9 Beta
see http://193.174.63.171 (accessible only within DKFZ infrastructure)
There are some warnings about depricated calls in CppMicroServices and QmitkRenderWindowMenu
QmitkRenderWindowMenu.h usThreads_p.h
details see here:
http://193.174.63.171/job/MITK_macOS_xcode_continous/matrixBuild=macOS_13_Beta_XC9/19/warnings9Result/
compiler complains about missing overwrite marks:
http://193.174.63.171/job/MITK_macOS_xcode_continous/18/matrixBuild=macOS_13_Beta_XC9/warnings9Result/
@kislinsk @nolden: there are quite some warnings thrown from clang. An overview of warning types see Section "Details" -> Reiter Categories using this link
http://sidt-hpc3/job/MITK_macOS_xcode_continous/24/warnings9Result/
Could also be a community task to identify urgent warnings categories and fix them?
An ordered comparison between a pointer and zero is very suspicious. Does it change the intended logic when replacing this with a comparison to nullptr, e.g. if (nout != nullptr)? Is it already fixed in ITK 4.12? If not, consider to contribute.
Yes, seems fixed. Checked source of ITK 4.12.1. they replaced this line with:
if ( this->nout )