Page MenuHomePhabricator

Prepare MITK for macOS 10.13 HighSierra support
Closed, ResolvedPublic

Description

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.

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

Installed

  • Qt 5.9.1
  • CMake 3.9.1
  • ninja 1.7.1

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)

reicht changed the visibility from "Custom Policy" to "Public (No Login Required)".Aug 18 2017, 8:00 AM
reicht created subtask Restricted Maniphest Task.Aug 19 2017, 8:37 PM

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?

reicht closed subtask Restricted Maniphest Task as Resolved.Aug 30 2017, 2:12 PM

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 )

Deleted branch T23248-BuildFixes4macOS1013.

Deleted branch T23248-test-with-latest-master.