Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to Homebrew version of libiconv #1039

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

savetheclocktower
Copy link
Contributor

…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 what superstring expects. The fix is to use Homebrew's version of libiconv and specify the library path via LDFLAGS and CPPFLAGS (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.

…to work around incompatible version of `libiconv` bundled with newer versions of XCode.
Copy link
Member

@DeeDeeG DeeDeeG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit!

Also: Worked in Cirrus on a test run. That's good enough for me! (https://cirrus-ci.com/task/5617783243800576)

Thanks again for working through all this! We can presumably port this type of solution to everywhere we need to get superstring (and by extension Pulsar itself) compiled in CI on macOS 13+ where the changed headers are present.

@DeeDeeG
Copy link
Member

DeeDeeG commented Jun 28, 2024

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.)

@savetheclocktower savetheclocktower merged commit 4b1edf4 into master Jun 28, 2024
102 checks passed
@savetheclocktower savetheclocktower deleted the fix-apple-silicon-builds branch June 28, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants