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 issue is reproduced with the test at #59:

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.

This PR includes that test, along with a proposed fix which is to add compiler-rt to the darwin build environments.

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
Copy link
Collaborator Author

@flavorjones
Copy link
Collaborator Author

@larskanis I think this change might warrant a 1.1.1 release, WDYT?

@larskanis larskanis merged commit b746c58 into rake-compiler:master Dec 25, 2021
@flavorjones flavorjones deleted the flavorjones-provide-compiler-rt-on-darwin branch January 3, 2022 21:44
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