<div dir="ltr">A while back I made an update to swig to do with the way the various R header files were included in the swig generated code. The errors prompting that change seemed similar to what you were seeing. Those changes have been merged into the master swig, but probably haven't made it into a release yet. You could try giving the superbuild a go with the "system" swig you've built by hand, or possibly use the "swig from git" option in superbuild. Note that this last option requires an automake installation too - the brew version works OK.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 29, 2016 at 2:36 AM, Mathew Guilfoyle <span dir="ltr"><<a href="mailto:mrguilfoyle@gmail.com" target="_blank">mrguilfoyle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Xcode 8.1 (updated yesterday)<br>
I've checked both R 3.2.5 and R 3.3.1 and they both report LC_VERSION_MIN_MACOSX version=10.9 sdk=10.9 for the main R binary.<br>
<br>
Looking at the differences in the Rdefines.h header file  (mentioned in the error report) between R versions it is documented that this has been changed from R 3.3.0 onwards.  Several of the definitions at the top of the file are now prepended with Rf_ .  I don't pretend to understand the reasons for or implications of this but seems likely to be at least part of the problem?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
> On 28 Oct 2016, at 15:27, Lowekamp, Bradley (NIH/NLM/LHC) [C] <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> Do you know what version of Xcode you are using? What OS X SDK is being used? or CMAKE_OSX_DEPLOYMENT_TARGET? What SDK did R use[1]?<br>
><br>
> This seems like it is some type of incompatibility with versions of Xcode, OS X SDK, libc++ vs libstdc++ or even C++ versions.<br>
><br>
> I am not certain what R compiler flags are passed to the SimpleITK build with the “devtools” method, but some of the above may not match the way the old R was compiled.<br>
><br>
> HTH,<br>
> Brad<br>
><br>
> [1] <a href="http://stackoverflow.com/questions/17461196/determining-os-x-sdk-and-deployment-target-versions-from-framework" rel="noreferrer" target="_blank">http://stackoverflow.com/<wbr>questions/17461196/<wbr>determining-os-x-sdk-and-<wbr>deployment-target-versions-<wbr>from-framework</a><br>
><br>
>> On Oct 28, 2016, at 10:11 AM, Mathew Guilfoyle <<a href="mailto:mrguilfoyle@gmail.com">mrguilfoyle@gmail.com</a>> wrote:<br>
>><br>
>> Hi<br>
>><br>
>> SimpleITK with R wrapping does not build successfully against R 3.3.1 on OS X 10.11.6 ElCapitan<br>
>><br>
>> This fails both using the devtools method from within R, and when trying to build the SuperBuild via Cmake with R wrapping turned on.<br>
>><br>
>> Both methods work fine against the most recent prior R release 3.2.4-revised (subsequently relabelled 3.2.5).<br>
>><br>
>> Not an immediate problem as working with R 3.2.5 is ok.<br>
>><br>
>> The error message I get is:<br>
>><br>
>> In file included from /private/var/folders/qy/<wbr>0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr>/T/RtmpKGZyJo/<wbr>devtools25f45d3de0c1/<wbr>SimpleITK-SimpleITKRInstaller-<wbr>68fadd1/SITK/Build/SimpleITK-<wbr>build/Wrapping/R/SimpleITKR_<wbr>wrap.cxx:757:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/Rdefines.h:<wbr>33:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/R_ext/RS.h:<wbr>27:<br>
>> /Applications/Xcode.app/<wbr>Contents/Developer/Toolchains/<wbr>XcodeDefault.xctoolchain/usr/<wbr>bin/../include/c++/v1/cstring:<wbr>98:46: error: conflicting types for 'strchr'<br>
>> inline _LIBCPP_INLINE_VISIBILITY       char* strchr(      char* __s, int __c) {return ::strchr(__s, __c);}<br>
>>                                            ^<br>
>> /usr/include/string.h:76:7: note: previous declaration is here<br>
>> char    *strchr(const char *, int);<br>
>>        ^<br>
>> In file included from /private/var/folders/qy/<wbr>0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr>/T/RtmpKGZyJo/<wbr>devtools25f45d3de0c1/<wbr>SimpleITK-SimpleITKRInstaller-<wbr>68fadd1/SITK/Build/SimpleITK-<wbr>build/Wrapping/R/SimpleITKR_<wbr>wrap.cxx:757:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/Rdefines.h:<wbr>33:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/R_ext/RS.h:<wbr>27:<br>
>> /Applications/Xcode.app/<wbr>Contents/Developer/Toolchains/<wbr>XcodeDefault.xctoolchain/usr/<wbr>bin/../include/c++/v1/cstring:<wbr>99:46: error: conflicting types for 'strpbrk'<br>
>> inline _LIBCPP_INLINE_VISIBILITY       char* strpbrk(      char* __s1, const char* __s2) {return ::strpbrk(__s1, __s2);}<br>
>>                                            ^<br>
>> /usr/include/string.h:86:7: note: previous declaration is here<br>
>> char    *strpbrk(const char *, const char *);<br>
>>        ^<br>
>> In file included from /private/var/folders/qy/<wbr>0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr>/T/RtmpKGZyJo/<wbr>devtools25f45d3de0c1/<wbr>SimpleITK-SimpleITKRInstaller-<wbr>68fadd1/SITK/Build/SimpleITK-<wbr>build/Wrapping/R/SimpleITKR_<wbr>wrap.cxx:757:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/Rdefines.h:<wbr>33:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/R_ext/RS.h:<wbr>27:<br>
>> /Applications/Xcode.app/<wbr>Contents/Developer/Toolchains/<wbr>XcodeDefault.xctoolchain/usr/<wbr>bin/../include/c++/v1/cstring:<wbr>100:46: error: conflicting types for 'strrchr'<br>
>> inline _LIBCPP_INLINE_VISIBILITY       char* strrchr(      char* __s, int __c) {return ::strrchr(__s, __c);}<br>
>>                                            ^<br>
>> /usr/include/string.h:87:7: note: previous declaration is here<br>
>> char    *strrchr(const char *, int);<br>
>>        ^<br>
>> In file included from /private/var/folders/qy/<wbr>0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr>/T/RtmpKGZyJo/<wbr>devtools25f45d3de0c1/<wbr>SimpleITK-SimpleITKRInstaller-<wbr>68fadd1/SITK/Build/SimpleITK-<wbr>build/Wrapping/R/SimpleITKR_<wbr>wrap.cxx:757:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/Rdefines.h:<wbr>33:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/R_ext/RS.h:<wbr>27:<br>
>> /Applications/Xcode.app/<wbr>Contents/Developer/Toolchains/<wbr>XcodeDefault.xctoolchain/usr/<wbr>bin/../include/c++/v1/cstring:<wbr>101:46: error: conflicting types for 'memchr'<br>
>> inline _LIBCPP_INLINE_VISIBILITY       void* memchr(      void* __s, int __c, size_t __n) {return ::memchr(__s, __c, __n);}<br>
>>                                            ^<br>
>> /usr/include/string.h:70:7: note: previous declaration is here<br>
>> void    *memchr(const void *, int, size_t);<br>
>>        ^<br>
>> In file included from /private/var/folders/qy/<wbr>0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr>/T/RtmpKGZyJo/<wbr>devtools25f45d3de0c1/<wbr>SimpleITK-SimpleITKRInstaller-<wbr>68fadd1/SITK/Build/SimpleITK-<wbr>build/Wrapping/R/SimpleITKR_<wbr>wrap.cxx:757:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/Rdefines.h:<wbr>33:<br>
>> In file included from /Library/Frameworks/R.<wbr>framework/Headers/R_ext/RS.h:<wbr>27:<br>
>> /Applications/Xcode.app/<wbr>Contents/Developer/Toolchains/<wbr>XcodeDefault.xctoolchain/usr/<wbr>bin/../include/c++/v1/cstring:<wbr>102:46: error: conflicting types for 'strstr'<br>
>> inline _LIBCPP_INLINE_VISIBILITY       char* strstr(      char* __s1, const char* __s2) {return ::strstr(__s1, __s2);}<br>
>>                                            ^<br>
>> /usr/include/string.h:89:7: note: previous declaration is here<br>
>> char    *strstr(const char *, const char *);<br>
>>        ^<br>
>> 5 errors generated.<br>
>> make[5]: *** [Wrapping/R/CMakeFiles/<wbr>SimpleITK_R.dir/SimpleITKR_<wbr>wrap.cxx.o] Error 1<br>
>> make[4]: *** [Wrapping/R/CMakeFiles/<wbr>SimpleITK_R.dir/all] Error 2<br>
>> make[3]: *** [all] Error 2<br>
>> make[2]: *** [SimpleITK-prefix/src/<wbr>SimpleITK-stamp/SimpleITK-<wbr>build] Error 2<br>
>> make[1]: *** [CMakeFiles/SimpleITK.dir/all] Error 2<br>
>> make: *** [all] Error 2<br>
>> + exit 1<br>
>> ERROR: configuration failed for package ‘SimpleITK’<br>
>> * removing ‘/Library/Frameworks/R.<wbr>framework/Versions/3.3/<wbr>Resources/library/SimpleITK’<br>
>> Error: Command failed (1)<br>
>> ______________________________<wbr>_______<br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>><br>
>> Kitware offers ITK Training Courses, for more information visit:<br>
>> <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a><br>
>><br>
>> Please keep messages on-topic and check the ITK FAQ at:<br>
>> <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br>
><br>
<br>
______________________________<wbr>_______<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br></div>