<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">macOS 11 brought big changes to how Apple versions its SDKs. They now potentially change each minor update, and as such we had to figure out how to deal with this.<div class=""><br class=""></div><div class="">gcc is built against a specific SDK, and to handle this unpredictably it was recently changed to use the unversioned SDK, instead of a versioned one, where required.</div><div class=""><br class=""></div><div class=""><a href="https://github.com/macports/macports-ports/commit/e8866c5019d60832527850b4e50fdc1de8878716#diff-5aeb3e82f6999f57229a816d2877a6232489c3484ac3e6716cb7e62b5a82696f" class="">https://github.com/macports/macports-ports/commit/e8866c5019d60832527850b4e50fdc1de8878716#diff-5aeb3e82f6999f57229a816d2877a6232489c3484ac3e6716cb7e62b5a82696f</a></div><div class=""><br class=""></div><div class="">Are you on maOS 11 ?</div><div class=""><br class=""></div><div class="">please post the output you get from your failing build, showing the full command line you use, and the full output, and include the -v option to get additional diagnostic output.</div><div class=""><br class=""></div><div class="">Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 7 Feb 2021, at 10:24 pm, Carlo Tambuatco <<a href="mailto:oraclmaster@gmail.com" class="">oraclmaster@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">Well what's odd is I'm only getting this error after upgrading to the latest macports gcc9. Indeed when I use the XCode provided clang version of gcc, it finds all the required libraries. My CPATH environment variable was sufficient to specify the locations of the libraries before the upgrade, so the question is, what changed post-upgrade?</div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 7, 2021, 5:03 PM Chris Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk" class="">jonesc@hep.phy.cam.ac.uk</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
It sounds like your builds are not correctly specifying the SDK gcc is to use. There are a number of ways you can do this, either by pass it via a compiler flag, by running the complication through xcrun, or by setting the SDKROOT variables to the required path.<br class="">
<br class="">
Cheers Chris<br class="">
<br class="">
> On 7 Feb 2021, at 9:25 pm, Carlo Tambuatco <<a href="mailto:oraclmaster@gmail.com" target="_blank" rel="noreferrer" class="">oraclmaster@gmail.com</a>> wrote:<br class="">
> <br class="">
> I don’t know if this is a result of updating to the latest macports gcc9, or the update of XCode, but <br class="">
> all of a sudden when I try to build my C++ program which includes <cstdio> I get this strange <br class="">
> chain reaction of errors.<br class="">
> <br class="">
> In file included from /opt/local/include/gcc9/c++/ext/string_conversions.h:41,<br class="">
>                 from /opt/local/include/gcc9/c++/bits/basic_string.h:6493,<br class="">
>                 from /opt/local/include/gcc9/c++/string:55,<br class="">
>                 from /opt/local/include/gcc9/c++/bits/locale_classes.h:40,<br class="">
>                 from /opt/local/include/gcc9/c++/bits/ios_base.h:41,<br class="">
>                 from /opt/local/include/gcc9/c++/ios:42,<br class="">
>                 from /opt/local/include/gcc9/c++/ostream:38,<br class="">
>                 from /opt/local/include/gcc9/c++/iostream:39,<br class="">
>                 from ../../standard_includes.h:1,<br class="">
>                 from E2.5.2.cpp:1:<br class="">
> /opt/local/include/gcc9/c++/cstdlib:75:15: fatal error: stdlib.h: No such file or directory<br class="">
>   75 | #include_next <stdlib.h><br class="">
> <br class="">
> <br class="">
> From my makefile this seems to be the offending includes statement:<br class="">
> <br class="">
> #include <iostream><br class="">
> #include <cstdio><br class="">
> <br class="">
> <br class="">
> I’ve googled and it seems that it can’t find stdlib.h, even though it is on my CPATH environment variable:<br class="">
> <br class="">
> export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include:/usr/local/include:/opt/local/include:/usr/local/dart-sdk/include:/Library/Frameworks/R.framework/Resources/include<br class="">
> <br class="">
<br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>