On 2019-9-24 15:31 , Mihir Luthra wrote: > Hi, > > After the xcode update, there have been many question on stackoverflow > regarding gcc and g++ linking fails. Any ideas on what can be done? > > https://stackoverflow.com/questions/58072318/cannot-link-any-c-program-with-gcc-on-mac-mojave > > https://stackoverflow.com/questions/58073301/linker-error-when-trying-to-use-lzma-in-boostiostreams-from-macports > > https://stackoverflow.com/questions/58071057/macports-g-fails-to-find-headers-after-recent-xcode-update > > Mihir
Does passing -isysroot`xcrun --show-sdk-path` to the compiler not work? While that should make it find headers again, I don't know how many bugs it will uncover. I'm not sure how we would make this work out of the box for everyone, since AIUI, gcc needs to apply different fixups to the system headers depending on the SDK version and does so at build time. So Apple taking away not only the SDK corresponding to the current OS version but also /usr/include is quite problematic. We can ship a gcc supporting the 10.14 SDK or the 10.15 SDK, but not both. Rebuilding gcc from source would also work. - Josh