Closed savetheclocktower closed 3 months ago
Context, in case anyone is trying to look this stuff up...
This forum post was somewhat helpful to me when researching this problem: https://discuss.cocos2d-x.org/t/latest-xcode-failing-with-iconv-close/59507/16. Some comments in there explain about there being a changed iconv.h
header with breaking changes introduced in more-recent XCode versions (15+) (which in turn appear to be associated with newer macOS versions, macOS 13+).
There was somewhat extensive discussion on our Discord trying to work this out, a lot of angles were tried and discussed. Starting around here: https://discord.com/channels/992103415163396136/992109539346370661/1255939168866140284
(And some prior discussions, but this is around where the working workaround was figured out. Although it turned out a lot simpler than all that, so most of this isn't super helpful to review, maybe. But all this was worked through already, feels right to document what was learned.)
…to work around incompatible version of
libiconv
bundled with newer versions of XCode.For whatever reason, macOS v13 and greater have a version of
libiconv
with API incompatibilities with whatsuperstring
expects. The fix is to use Homebrew's version oflibiconv
and specify the library path viaLDFLAGS
andCPPFLAGS
(though it's possible we only need the former).It's nearly certain that we'll eventually need this fix for building Intel Mac binaries as well. I think it's just that CirrusCI forced us off of macOS 12 before GitHub did.