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

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

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

stanhu
Copy link
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
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.
@alto-ruby
Copy link
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
61 of 63 checks passed
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Sep 22, 2023
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.

None yet

3 participants