Skip to content

Conversation

@flavorjones
Copy link
Collaborator

@flavorjones flavorjones commented Dec 5, 2021

The clang macro __builtin_available uses ___isOSVersionAtLeast, which is defined in the compiler-rt runtime library. The compiler-rt library is not currently provided in the rake-compiler-dock environment, which means this symbol may end up being unresolved.

grpc/grpc#28271 reports that the symbol ___isOSVersionAtLeast is undefined at runtime. This PR attempts to reproduce that error.

Presuming that his test is valid and reproduces the issue, I have a second PR ready to go which adds compiler-rt to the darwin build environments that should make this test pass.

@flavorjones flavorjones force-pushed the flavorjones-repro-compiler-rt-on-darwin branch from 681e4d7 to a443746 Compare December 5, 2021 16:59
@flavorjones flavorjones marked this pull request as draft December 5, 2021 17:01
@flavorjones flavorjones force-pushed the flavorjones-repro-compiler-rt-on-darwin branch from a443746 to e4f45e4 Compare December 5, 2021 18:58
Because the RCD builds are expensive, let's cancel builds in progress
when a new build is kicked off for the PR branch (or when a new commit
lands on master).
@flavorjones flavorjones force-pushed the flavorjones-repro-compiler-rt-on-darwin branch from e4f45e4 to a74e356 Compare December 5, 2021 19:07
@flavorjones flavorjones force-pushed the flavorjones-repro-compiler-rt-on-darwin branch from a74e356 to 1b00fdb Compare December 5, 2021 19:35
@flavorjones
Copy link
Collaborator Author

Success, in that we're seeing the expected failure:

Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 13.0.6
Installing rake 13.0.6
Using bundler 2.2.32
Fetching minitest 5.14.4
Fetching rake-compiler 1.1.1
Fetching rake-compiler-dock 1.1.0
Installing rake-compiler 1.1.1
Installing rake-compiler-dock 1.1.0
Installing minitest 5.14.4
Using rcd_test 1.0.0 from source at `.`
Bundle complete! 5 Gemfile dependencies, 6 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Run options: --seed 46435
dyld: lazy symbol binding failed: Symbol not found: ___isOSVersionAtLeast

  Referenced from: /Users/runner/hostedtoolcache/Ruby/3.0.3/x64/lib/ruby/gems/3.0.0/gems/rcd_test-1.0.0-x86_64-darwin/lib/rcd_test/3.0/rcd_test_ext.bundle
# Running:
  Expected in: flat namespace


.
dyld: Symbol not found: ___isOSVersionAtLeast
  Referenced from: /Users/runner/hostedtoolcache/Ruby/3.0.3/x64/lib/ruby/gems/3.0.0/gems/rcd_test-1.0.0-x86_64-darwin/lib/rcd_test/3.0/rcd_test_ext.bundle
  Expected in: flat namespace

rake aborted!
SignalException: SIGABRT

Tasks: TOP => test
(See full trace by running task with --trace)
Error: Process completed with exit code 1.

I'm going to submit a second PR that has both this test and the proposed fix.

@flavorjones
Copy link
Collaborator Author

Closing, see #60 for fix and followup.

@flavorjones flavorjones closed this Dec 5, 2021
@flavorjones flavorjones deleted the flavorjones-repro-compiler-rt-on-darwin branch January 3, 2022 21:45
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.

1 participant