<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Sorry to land in the middle this discussion with some dumb questions...</div><div class=""><br class=""></div><div class=""><div class=""> I'm on macOS 10.12.4 (Sierra)/Xcode 8.3.2, but was reviewing <a href="https://trac.macports.org/wiki/LibcxxOnOlderSystems" class="">LibcxxOnOlderSystems</a></div><div class="">after having to add `configure.cxxflags-append -std=c++11’ in gnuplot Portfile for variant qt5.</div></div><div class=""><br class=""></div><div class="">Is my understanding correct that, on Sierra, Apple clang++ isn’t using c++11 by default?</div><div class="">Is there, or should there be, a LibcxxOnNewerSystems page that advises making</div><div class="">`-std=c++11' the default?</div><div class=""><br class=""></div><div class="">From cxx11-1.x.tcl, it would seem that there are hurdles to this on newer systems?</div><div class="">And yet, to link against qt5, it’s required?</div><div class=""><br class=""></div><div class="">Again, looking at qt5-1.0.tcl, I don’t see `-std=c++11’ used at. So is what I’m doing working</div><div class="">for the wrong reason, perhaps?</div><div class=""><br class=""></div><div class="">Lots more head-scratching along these lines… Any pointers would be appreciated!</div><div class="">-AM</div><div class=""><br class=""></div><br class=""><blockquote type="cite" class="">On Apr 19, 2017, at 9:13 AM, Mojca Miklavec <<a href="mailto:mojca@macports.org" class="">mojca@macports.org</a>> wrote:<br class=""><br class="">Posting this to the developer list, it probably got too off-topic for<br class="">the user list.<br class=""><br class="">On 19 April 2017 at 02:29, Ken Cunningham wrote:<br class=""><blockquote type="cite" class=""><br class="">After coming across this issue one too many times for my own liking, and<br class="">changing several dozen ports as you have done, I finally just patched clang<br class="">to make it default to add -stdlib=lilbc++ by default on all systems, which<br class="">solves this issue once and forever.<br class=""><br class="">I do find this helps a lot with the stdlib hiccups on older systems, and i<br class="">plan to continue to use it, but I understand concerns about changing default<br class="">behaviour of compilers. Jeremy has previously indicated privately to me<br class="">that he wasn't too keen on the idea due to possible unexpected consequences<br class="">of changing default behaviour, and this is a respectable point coming from<br class="">the honcho himself.<br class=""><br class="">As a counter argument, changing one compiler default to what is the current<br class="">expected behaviour seems a lot easier than updating an uncertain number out<br class="">of 21,000 ports, some of which (WxWidgets, for example) turn out to be<br class="">rather messy to fix properly.<br class=""></blockquote><br class="">Something else just crossed my mind (though this is something for the<br class="">developer mailing list rather than for the user list).<br class=""><br class="">I just had some back-and-forth conversation about problems related to<br class="">config.guess [1] (link is not too relevant). They sent me this link<br class="">which might be more relevant: [2], arguing that one should probably<br class="">use:<br class=""> CC="clang -arch i386"<br class="">rather than<br class=""> CC=clang<br class=""> CFLAGS="-arch i386"<br class=""> LDFLAGS="-arch i386"<br class=""><br class="">And some conversation with xwWidgets developers [3] which also<br class="">suggested me to use:<br class=""> CXX="clang -stdlib=libc++"<br class="">rather than fighting with:<br class=""> CXXFLAGS="-stdlib=libc++"<br class=""> LDFLAGS="-stdlib=libc++"<br class=""><br class="">The thing is that a lot of these failures happen when developers don't<br class="">put too much attention into consistently respecting all flags. Some<br class="">don't respect the compiler, but that's easier to spot, easier to argue<br class="">about and much easier to test on any given 10.12 box. Testing for<br class="">correct stdlib flags is left to weirdos still running the ancient<br class="">boxes and includes a lot of effort in making sure that upstream fixes<br class="">the problems. But no matter how much effort goes into this, there will<br class="">still be a huge number of packages forgetting to add all the CXXFLAGS<br class="">to their autoconf setup or to their manually crafted makefiles.<br class=""><br class="">Changing this would be a very very very serious change, one that might<br class="">break a number of packages, but maybe MacPorts should actually set<br class=""> CXX="{compiler} -stdlib={stdlib}"<br class="">in the environmental variables. Then it would most likely work better<br class="">in many ports that currently fail.<br class=""><br class="">(We might be able to afford making this change just for<br class="">libc++-pre-10.9 setups. Still, it might get tricky.)<br class=""><br class="">Mojca<br class=""><br class=""><br class="">[1] <a href="http://lists.gnu.org/archive/html/config-patches/2017-04/msg00012.html" class="">http://lists.gnu.org/archive/html/config-patches/2017-04/msg00012.html</a><br class=""><a href="http://lists.gnu.org/archive/html/config-patches/2017-04/msg00003.html" class="">http://lists.gnu.org/archive/html/config-patches/2017-04/msg00003.html</a><br class=""><br class="">[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html<br class=""><br class="">[3] https://groups.google.com/d/msg/wx-dev/fIYBMsEKIqo/TtfiEOimCAAJ<br class=""></blockquote><br class=""></body></html>