[odb-users] macOS Sonoma Include (and Lib?) Issues

Brian E. Coggins becoggins at hotmail.com
Tue Dec 5 21:44:50 EST 2023


Hi friends,

Another macOS upgrade, another set of annoying problems with finding system headers.  Sonoma’s clang++ removed some deprecated C++ stuff, breaking my installed version of boost, upgrading boost in homebrew for some reason forced an irreversible gcc update that prevented my old compilation of odb from finding its dynamic libraries, so now I’m trying to recompile odb…and g++-13 can’t find the system headers (and probably libraries, too, but I haven’t gotten that far).  As many of us know, Apple has been making this harder and harder with each update, for reasons that are impossible for us mortals to understand.

Questions:

1.  Does anybody know of a nice and clean solution for the whole system that would allow g++-13 to find the headers with no special magic?  It would be brilliant if homebrew gcc knew how to invoke xcrun, but my installation doesn’t seem to know how to do this.  Maybe I’m doing something wrong.  Any advice appreciated.

2.  One web post suggested

export SDKROOT="`xcrun --show-sdk-path`”

which does brilliantly solve the problem for that terminal session, and can go in .bashrc to make lots of things smooth.  However, bpkg doesn’t pay attention to this.  I imagine there’s some incantation that could be added to my "bpkg create” call to get the right directories added in?  Can anyone share what that might be?

Thanks,
Brian




More information about the odb-users mailing list