<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hello,
<div class=""><br class="">
</div>
<div class="">I am build SimpleITK master with XCode 8.0, R 3.3.1 on OS X 10.11.6 with CMake 3.4.3 by comping with the SimpleITK Superbuild directory.</div>
<div class=""><br class="">
</div>
<div class="">I get the following error:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">Wrapping/R/CMakeFiles/SimpleITK_R.dir/sitkRArray.cxx.o -c /Users/blowekamp/src/SimpleITK/Wrapping/R/sitkRArray.cxx</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">In file included from /Users/blowekamp/src/SimpleITK/Wrapping/R/sitkRArray.cxx:23:</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">In file included from /Users/blowekamp/src/SimpleITK/Code/Common/include/sitkImage.h:21:</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">In file included from /Users/blowekamp/src/SimpleITK/Code/Common/include/sitkCommon.h:21:</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">In file included from /Users/blowekamp/src/SimpleITK/Code/Common/include/sitkMacro.h:24:</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/sstream:174:</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:871:34: error: too many arguments provided to function-like macro invocation</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">                                 ^</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">/Library/Frameworks/R.framework/Headers/Rinternals.h:1222:9: note: macro 'length' defined here</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">#define length(x)               Rf_length(x)</span></div>
</div>
<div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">This patch suggested by Richard fixed it for me:</span></div>
<div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><a href="http://review.source.kitware.com/#/c/21678/" class="">http://review.source.kitware.com/#/c/21678/</a></span></div>
<div class=""><br class="">
</div>
<div class="">This will likely be merged into next at the end of the day.</div>
<div class=""><br class="">
</div>
<div class="">Brad</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Oct 30, 2016, at 5:04 AM, Richard Beare <<a href="mailto:richard.beare@gmail.com" class="">richard.beare@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">I'm seeing different failures on 3.3.1. Stuff to do with redefining length in Rdefines.h. These problems seem to relate to sitkRArray.cxx.
<div class=""><br class="">
</div>
<div class="">It is a bit strange, but the fix for me is to add </div>
<div class="">
<div class="">#include <iostream></div>
</div>
<div class=""><br class="">
</div>
<div class="">before</div>
<div class="">
<div class="">#include <Rdefines.h></div>
</div>
<div class=""><br class="">
</div>
<div class="">in sitkRArray.cxx</div>
<div class=""><br class="">
</div>
<div class="">This successfully builds the R package, but I get lots of link warnings like this:</div>
<div class=""><br class="">
</div>
<div class="">
<p class="gmail-p1"><span class="gmail-s1">ld: warning: direct access in itk::LabelMap<itk::ShapeLabelObject<unsigned long long, 2u> >::Graft(itk::DataObject const*) to global weak symbol typeinfo name for itk::DataObject const* means the weak symbol cannot
 be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.</span></p>
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Sat, Oct 29, 2016 at 7:51 PM, Mathew Guilfoyle <span dir="ltr" class="">
<<a href="mailto:mrguilfoyle@gmail.com" target="_blank" class="">mrguilfoyle@gmail.com</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Richard<br class="">
<br class="">
I've tried using the patched swig you provided several months ago and the latest swig from git option - SimpleITK compiles without error against R 3.2.5 and earlier with either swig and R 3.3.0 fails the same way with either.  The problem previously was not
 failing to build but string-handling errors generated using certain R-SimpleITK functions.  As mentioned there has been a change in certain header files since 3.3.0 which presumably relates to the problem?  Happy to do any further testing you suggest.<br class="">
<div class="HOEnZb">
<div class="h5"><br class="">
<br class="">
> On 28 Oct 2016, at 22:31, Richard Beare <<a href="mailto:richard.beare@gmail.com" class="">richard.beare@gmail.com</a>> wrote:<br class="">
><br class="">
> 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.<br class="">
><br class="">
> On Sat, Oct 29, 2016 at 2:36 AM, Mathew Guilfoyle <<a href="mailto:mrguilfoyle@gmail.com" class="">mrguilfoyle@gmail.com</a>> wrote:<br class="">
> Xcode 8.1 (updated yesterday)<br class="">
> 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 class="">
><br class="">
> 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 class="">
><br class="">
><br class="">
><br class="">
> > On 28 Oct 2016, at 15:27, Lowekamp, Bradley (NIH/NLM/LHC) [C] <<a href="mailto:blowekamp@mail.nih.gov" class="">blowekamp@mail.nih.gov</a>> wrote:<br class="">
> ><br class="">
> > Hello,<br class="">
> ><br class="">
> > 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 class="">
> ><br class="">
> > This seems like it is some type of incompatibility with versions of Xcode, OS X SDK, libc++ vs libstdc++ or even C++ versions.<br class="">
> ><br class="">
> > 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 class="">
> ><br class="">
> > HTH,<br class="">
> > Brad<br class="">
> ><br class="">
> > [1] <a href="http://stackoverflow.com/questions/17461196/determining-os-x-sdk-and-deployment-target-versions-from-framework" rel="noreferrer" target="_blank" class="">
http://stackoverflow.com/<wbr class="">questions/17461196/<wbr class="">determining-os-x-sdk-and-<wbr class="">deployment-target-versions-<wbr class="">from-framework</a><br class="">
> ><br class="">
> >> On Oct 28, 2016, at 10:11 AM, Mathew Guilfoyle <<a href="mailto:mrguilfoyle@gmail.com" class="">mrguilfoyle@gmail.com</a>> wrote:<br class="">
> >><br class="">
> >> Hi<br class="">
> >><br class="">
> >> SimpleITK with R wrapping does not build successfully against R 3.3.1 on OS X 10.11.6 ElCapitan<br class="">
> >><br class="">
> >> 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 class="">
> >><br class="">
> >> Both methods work fine against the most recent prior R release 3.2.4-revised (subsequently relabelled 3.2.5).<br class="">
> >><br class="">
> >> Not an immediate problem as working with R 3.2.5 is ok.<br class="">
> >><br class="">
> >> The error message I get is:<br class="">
> >><br class="">
> >> In file included from /private/var/folders/qy/<wbr class="">0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr class="">/T/RtmpKGZyJo/<wbr class="">devtools25f45d3de0c1/<wbr class="">SimpleITK-SimpleITKRInstaller-<wbr class="">68fadd1/SITK/Build/SimpleITK-<wbr class="">build/Wrapping/R/SimpleITKR_<wbr class="">wrap.cxx:757:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/Rdefines.h:<wbr class="">33:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/R_ext/RS.h:<wbr class="">27:<br class="">
> >> /Applications/Xcode.app/<wbr class="">Contents/Developer/Toolchains/<wbr class="">XcodeDefault.xctoolchain/usr/<wbr class="">bin/../include/c++/v1/cstring:<wbr class="">98:46: error: conflicting types for 'strchr'<br class="">
> >> inline _LIBCPP_INLINE_VISIBILITY       char* strchr(      char* __s, int __c) {return ::strchr(__s, __c);}<br class="">
> >>                                            ^<br class="">
> >> /usr/include/string.h:76:7: note: previous declaration is here<br class="">
> >> char    *strchr(const char *, int);<br class="">
> >>        ^<br class="">
> >> In file included from /private/var/folders/qy/<wbr class="">0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr class="">/T/RtmpKGZyJo/<wbr class="">devtools25f45d3de0c1/<wbr class="">SimpleITK-SimpleITKRInstaller-<wbr class="">68fadd1/SITK/Build/SimpleITK-<wbr class="">build/Wrapping/R/SimpleITKR_<wbr class="">wrap.cxx:757:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/Rdefines.h:<wbr class="">33:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/R_ext/RS.h:<wbr class="">27:<br class="">
> >> /Applications/Xcode.app/<wbr class="">Contents/Developer/Toolchains/<wbr class="">XcodeDefault.xctoolchain/usr/<wbr class="">bin/../include/c++/v1/cstring:<wbr class="">99:46: error: conflicting types for 'strpbrk'<br class="">
> >> inline _LIBCPP_INLINE_VISIBILITY       char* strpbrk(      char* __s1, const char* __s2) {return ::strpbrk(__s1, __s2);}<br class="">
> >>                                            ^<br class="">
> >> /usr/include/string.h:86:7: note: previous declaration is here<br class="">
> >> char    *strpbrk(const char *, const char *);<br class="">
> >>        ^<br class="">
> >> In file included from /private/var/folders/qy/<wbr class="">0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr class="">/T/RtmpKGZyJo/<wbr class="">devtools25f45d3de0c1/<wbr class="">SimpleITK-SimpleITKRInstaller-<wbr class="">68fadd1/SITK/Build/SimpleITK-<wbr class="">build/Wrapping/R/SimpleITKR_<wbr class="">wrap.cxx:757:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/Rdefines.h:<wbr class="">33:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/R_ext/RS.h:<wbr class="">27:<br class="">
> >> /Applications/Xcode.app/<wbr class="">Contents/Developer/Toolchains/<wbr class="">XcodeDefault.xctoolchain/usr/<wbr class="">bin/../include/c++/v1/cstring:<wbr class="">100:46: error: conflicting types for 'strrchr'<br class="">
> >> inline _LIBCPP_INLINE_VISIBILITY       char* strrchr(      char* __s, int __c) {return ::strrchr(__s, __c);}<br class="">
> >>                                            ^<br class="">
> >> /usr/include/string.h:87:7: note: previous declaration is here<br class="">
> >> char    *strrchr(const char *, int);<br class="">
> >>        ^<br class="">
> >> In file included from /private/var/folders/qy/<wbr class="">0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr class="">/T/RtmpKGZyJo/<wbr class="">devtools25f45d3de0c1/<wbr class="">SimpleITK-SimpleITKRInstaller-<wbr class="">68fadd1/SITK/Build/SimpleITK-<wbr class="">build/Wrapping/R/SimpleITKR_<wbr class="">wrap.cxx:757:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/Rdefines.h:<wbr class="">33:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/R_ext/RS.h:<wbr class="">27:<br class="">
> >> /Applications/Xcode.app/<wbr class="">Contents/Developer/Toolchains/<wbr class="">XcodeDefault.xctoolchain/usr/<wbr class="">bin/../include/c++/v1/cstring:<wbr class="">101:46: error: conflicting types for 'memchr'<br class="">
> >> inline _LIBCPP_INLINE_VISIBILITY       void* memchr(      void* __s, int __c, size_t __n) {return ::memchr(__s, __c, __n);}<br class="">
> >>                                            ^<br class="">
> >> /usr/include/string.h:70:7: note: previous declaration is here<br class="">
> >> void    *memchr(const void *, int, size_t);<br class="">
> >>        ^<br class="">
> >> In file included from /private/var/folders/qy/<wbr class="">0txzmt9n7mvcfrp4g2w14h8m0000gn<wbr class="">/T/RtmpKGZyJo/<wbr class="">devtools25f45d3de0c1/<wbr class="">SimpleITK-SimpleITKRInstaller-<wbr class="">68fadd1/SITK/Build/SimpleITK-<wbr class="">build/Wrapping/R/SimpleITKR_<wbr class="">wrap.cxx:757:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/Rdefines.h:<wbr class="">33:<br class="">
> >> In file included from /Library/Frameworks/R.<wbr class="">framework/Headers/R_ext/RS.h:<wbr class="">27:<br class="">
> >> /Applications/Xcode.app/<wbr class="">Contents/Developer/Toolchains/<wbr class="">XcodeDefault.xctoolchain/usr/<wbr class="">bin/../include/c++/v1/cstring:<wbr class="">102:46: error: conflicting types for 'strstr'<br class="">
> >> inline _LIBCPP_INLINE_VISIBILITY       char* strstr(      char* __s1, const char* __s2) {return ::strstr(__s1, __s2);}<br class="">
> >>                                            ^<br class="">
> >> /usr/include/string.h:89:7: note: previous declaration is here<br class="">
> >> char    *strstr(const char *, const char *);<br class="">
> >>        ^<br class="">
> >> 5 errors generated.<br class="">
> >> make[5]: *** [Wrapping/R/CMakeFiles/<wbr class="">SimpleITK_R.dir/SimpleITKR_<wbr class="">wrap.cxx.o] Error 1<br class="">
> >> make[4]: *** [Wrapping/R/CMakeFiles/<wbr class="">SimpleITK_R.dir/all] Error 2<br class="">
> >> make[3]: *** [all] Error 2<br class="">
> >> make[2]: *** [SimpleITK-prefix/src/<wbr class="">SimpleITK-stamp/SimpleITK-<wbr class="">build] Error 2<br class="">
> >> make[1]: *** [CMakeFiles/SimpleITK.dir/all] Error 2<br class="">
> >> make: *** [all] Error 2<br class="">
> >> + exit 1<br class="">
> >> ERROR: configuration failed for package ‘SimpleITK’<br class="">
> >> * removing ‘/Library/Frameworks/R.<wbr class="">framework/Versions/3.3/<wbr class="">Resources/library/SimpleITK’<br class="">
> >> Error: Command failed (1)<br class="">
> >> ______________________________<wbr class="">_______<br class="">
> >> Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">
www.kitware.com</a><br class="">
> >><br class="">
> >> Visit other Kitware open-source projects at<br class="">
> >> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">
http://www.kitware.com/<wbr class="">opensource/opensource.html</a><br class="">
> >><br class="">
> >> Kitware offers ITK Training Courses, for more information visit:<br class="">
> >> <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank" class="">
http://www.kitware.com/<wbr class="">products/protraining.php</a><br class="">
> >><br class="">
> >> Please keep messages on-topic and check the ITK FAQ at:<br class="">
> >> <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank" class="">
http://www.itk.org/Wiki/ITK_<wbr class="">FAQ</a><br class="">
> >><br class="">
> >> Follow this link to subscribe/unsubscribe:<br class="">
> >> <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank" class="">
http://public.kitware.com/<wbr class="">mailman/listinfo/insight-users</a><br class="">
> ><br class="">
><br class="">
> ______________________________<wbr class="">_______<br class="">
> Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">
www.kitware.com</a><br class="">
><br class="">
> Visit other Kitware open-source projects at<br class="">
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">
http://www.kitware.com/<wbr class="">opensource/opensource.html</a><br class="">
><br class="">
> Kitware offers ITK Training Courses, for more information visit:<br class="">
> <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank" class="">
http://www.kitware.com/<wbr class="">products/protraining.php</a><br class="">
><br class="">
> Please keep messages on-topic and check the ITK FAQ at:<br class="">
> <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank" class="">
http://www.itk.org/Wiki/ITK_<wbr class="">FAQ</a><br class="">
><br class="">
> Follow this link to subscribe/unsubscribe:<br class="">
> <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank" class="">
http://public.kitware.com/<wbr class="">mailman/listinfo/insight-users</a><br class="">
><br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
_____________________________________<br class="">
Powered by <a href="http://www.kitware.com" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at<br class="">
<a href="http://www.kitware.com/opensource/opensource.html" class="">http://www.kitware.com/opensource/opensource.html</a><br class="">
<br class="">
Kitware offers ITK Training Courses, for more information visit:<br class="">
http://www.kitware.com/products/protraining.php<br class="">
<br class="">
Please keep messages on-topic and check the ITK FAQ at:<br class="">
http://www.itk.org/Wiki/ITK_FAQ<br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
http://public.kitware.com/mailman/listinfo/insight-users<br class="">
_______________________________________________<br class="">
Community mailing list<br class="">
Community@itk.org<br class="">
http://public.kitware.com/mailman/listinfo/community<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>