Matt,
Thanks for moving this discussion here! And for submitting those builds to the dashboard.
Yes, it appears that the Apple’s GNU libstdc++ is old and does not properly support C++11, even with the -std=c++11
. Compiling the current ITK, results in compilation errors in the VNL related to std::shared_ptr not being available as your builds show.
By default, when OSX_DEPLOYMENT_TARGET=10.9
libc++ is used, which is required for using c+11. However, libc++ is available with OSX_DEPLOYMENT_TARGET=10.7
. So configuring the current ITKv5 development with the following works:
cmake -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 ~/src/ITK
Resulting in the following executables:
$ otool -L bin/itkTestDriver
bin/itkTestDriver:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
While the Apple system python (2.6,2.7) uses it’s own os version for the min OS X:
lhcp-vm-osx11-1$ /usr/bin/python -c "import distutils.util; print(distutils.util.get_platform())"
macosx-10.11-intel
lhcp-vm-osx11-1$ /usr/bin/python2.6 -c "import distutils.util; print(distutils.util.get_platform())"
macosx-10.11-intel
the python.org distribution is still stuck at 10.6:
lhcp-vm-osx11-1$ /usr/local/bin/python3.5 -c "import distutils.util; print(distutils.util.get_platform())"
macosx-10.6-intel
lhcp-vm-osx11-1$ /usr/local/bin/python3.4 -c "import distutils.util; print(distutils.util.get_platform())"
macosx-10.6-intel
lhcp-vm-osx11-1$ /usr/local/bin/python2.7 -c "import distutils.util; print(distutils.util.get_platform())"
macosx-10.6-intel
I am unaware of a Python PEP for a recommendation on OS X binaries nor what c++ library to use.
The Spinning Wheels Mac Python is old and does not address libc++ issues.