Skip to content

[ruby] Fix linking errors on x86-darwin#34134

Merged
alto-ruby merged 1 commit intogrpc:masterfrom
stanhu:sh-x86-darwin-build-errors
Sep 22, 2023
Merged

[ruby] Fix linking errors on x86-darwin#34134
alto-ruby merged 1 commit intogrpc:masterfrom
stanhu:sh-x86-darwin-build-errors

Conversation

@stanhu
Copy link
Copy Markdown
Contributor

@stanhu stanhu commented Aug 22, 2023

#33538 added -weak_framework CoreFoundation in DLDFLAGS for only arm64-darwin builds, but the issue reported in #33483 can also happen on x86-darwin builds. This can happen if:

  1. The Ruby interpreter is compiled without -Wl,-undefined,dynamic_lookup.
  2. This happens if the Ruby interpreter is built with XCode 14.0 to 14.2 (https://bugs.ruby-lang.org/issues/19005).

Simplify the logic and always include -weak_framework CoreFoundation for macOS builds.

@stanhu stanhu changed the title ruby: Fix linking errors on x86-darwin [ruby] Fix linking errors on x86-darwin Aug 22, 2023
@stanhu stanhu force-pushed the sh-x86-darwin-build-errors branch from 47605ba to 660bed6 Compare August 22, 2023 23:09
grpc#33538 added `-weak_framework
CoreFoundation` in `DLDFLAGS` for only `arm64-darwin` builds, but the
issue reported in grpc#33483 can also
happen on `x86-darwin` builds. This can happen if:

1. The Ruby interpreter is compiled without `-Wl,-undefined,dynamic_lookup`.
2. This happens if the Ruby interpreter is built with XCode 14.0 to
14.2 (https://bugs.ruby-lang.org/issues/19005).

Simplify the logic and always include `-weak_framework CoreFoundation`
for macOS builds.
@stanhu stanhu force-pushed the sh-x86-darwin-build-errors branch from 660bed6 to ebf8cbe Compare August 22, 2023 23:19
@alto-ruby
Copy link
Copy Markdown
Contributor

@apolcyn I think this PR makes sense and I have approved it, can you also take a look?

@alto-ruby alto-ruby self-requested a review August 29, 2023 00:24
@alto-ruby alto-ruby added the release notes: yes Indicates if PR needs to be in release notes label Sep 22, 2023
@alto-ruby alto-ruby merged commit b3467cd into grpc:master Sep 22, 2023
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Sep 22, 2023
@ti-chi-bot ti-chi-bot bot mentioned this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

imported Specifies if the PR has been imported to the internal repository lang/ruby release notes: yes Indicates if PR needs to be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants