Page MenuHomePhabricator

Mac OSX 10.9 Maverick compatibility
Closed, ResolvedPublic

Description

With 10.9 apple removed gcc. Also the with 10.9 SDK serval toolkits do not compile out of the box. One solution is to use a SDK < 10.9, see T16776.

In the long term we should upgrade ITK, VTK, etc. when these build issues are fixed.

Event Timeline

Just a note.

The MITK master uses a recent version of ITK and VTK, and those issues that I found are already fixed in these versions. There might be others.

We encountered the problems using the 2013.12.0 release that uses an older ITK and VTK version. (We cannot upgrade to the MITK master until we migrate our own code to the new versions of these libraries first. Therefore, I have not tested the compatibility of the current master with Mavericks.)

VTK 6.0 patch for OS X 10.9

VTK can be compiled with the patch attached.

The MITK build fails with this error:

[ 15%] Building CXX object Core/Code/CMakeFiles/MitkCore.dir/Algorithms/mitkCompareImageDataFilter.cpp.o
In file included from /build/src/niftk-b3250-release/MITK-src/Core/Code/Algorithms/mitkCompareImageDataFilter.cpp:19:
In file included from /build/src/niftk-b3250-release/MITK-src/Core/Code/DataManagement/mitkImageAccessByItk.h:21:
In file included from /build/src/niftk-b3250-release/ITK-src/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.h:150:
In file included from /build/src/niftk-b3250-release/ITK-src/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.hxx:23:
/build/src/niftk-b3250-release/ITK-src/Modules/Core/Common/include/itkImageAlgorithm.h:24:12: fatal error: 'type_traits' file not found

include <type_traits>

^

1 error generated.
make[3]: * [Core/Code/CMakeFiles/MitkCore.dir/Algorithms/mitkCompareImageDataFilter.cpp.o] Error 1
make[2]:
* [Core/Code/CMakeFiles/MitkCore.dir/all] Error 2
make[1]: * [Core/Code/CMakeFiles/MitkCore.dir/rule] Error 2
make:
* [MitkCore] Error 2

Hi Miklos,

have you tried removing the ITK directories? I ran into the same error after I switch from libc++ to libstdc++. Maybe this is because of some cached configuration in ITK.

Another note: we just merged VTK 6.1 which builds without any patches. However there are still some MITK issues. But we are working on it. We hope we can provide support for Mac 10.9 with the next release.

You mean you merged VTK 6.1 to the master?
Will it be part of the March release?

VTK will need this patch to be built with XCode 5.1. Even VTK 6.1.

XCode 5.0 is fine.

http://review.source.kitware.com/#/c/14424/

Hi Miklos,

sorry for the late answer. Yes we integrated VTK 6.1 and it will be part of the march release. Right now we are quiet confident to provide 10.9 support with the upcoming release.

I cannot promise that we will also support Xcode 5.1. Right now most of us are using Xcode 5.0.

With the depending bugs being fixed I was able to build MITK with all plugins and apps.

I tested the build with both Makefiles and Xcode. The Xcode build was performed using the libc++ instead of libstdc++.

Only the OpenCV build failed in both cases. However this seems to be fixed in the current version 2.4.8. I filed a new bug for that accordingly (T17588)

So far I did not test the build with SOFA.

Since the build now works even with libc++ I suggest to remove the fix for T16776.

Thanks for all this!

I do not think that the fix for T16776 should be removed. It makes it possible to choose the system framework. The CMAKE_OSX_ARCHITECTURES, CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT variables should be passed down to the external projects so that you can be sure everything is built for the same architecture and uses the same libraries.

I agree with Miklos. Third party developers (eg. UCL) may have any number of different reasons for requiring those parameters. They may have integrated several other libraries that the core MITK platform does not use, and these other libraries may require these flags to be set, or the 10.8 sdk. So, 16776 should not be removed.

Sorry I should have expressed myself more clearly:

Of course I did not mean to remove the possibility to compile against a different Mac OS X SDK. With T16776 we also introduced that on Mac OS X 10.9 system the libstdc++ is used instead of the (for 10.9 default) libc++.

Since the build now seems to work even with libc++ I would like to remove that and let MITK be build against libc++ per default.

User fetzer has pushed new remote branch:

bug-16803-build-errors-on-mac-mavericks

Need core modification due to changes in usUtils.cpp
Wrote change request

[f3ab4b]: Merge branch 'bug-16803-build-errors-on-mac-mavericks'

Merged commits:

2014-03-22 19:47:54 Andreas Fetzer [9de9a5]
Removed obsolete fix for former ITK and VTK versions


2014-03-22 16:34:22 Andreas Fetzer [9ccc3f]
Added include for mkdtemp for mac os x 10.9


2014-03-22 16:33:07 Andreas Fetzer [1bab05]
Fixed warning regarding comparison of unequal types

[3db400]: Merge branch 'bug-16803-build-errors-on-mac-mavericks'

Merged commits:

2014-03-24 15:32:53 Andreas Fetzer [1310c3]
COMP Just use unistd.h for unix systems

Current release is finished. Resetting target milestone

We now have a continuous dartclient for 10.9 with the latest clang compiler. Thus closing the bug