Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:238:in `resolve_dependencies' Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies' Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:124:in `analyze' Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies' Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section' Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1073:in `block in resolve_dependencies' Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:177:in `sources' Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:178:in `block in sources' Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/sources_manager.rb:21:in `find_or_create_source_with_url' Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/sources_manager.rb:36:in `create_source_with_url' System/Library/Frameworks/amework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' It runs normally on my Intel-based Mac, but on my new Apple Silicon-based M1 Mac it fails to install pods. # Catches errors related to the wrong Homebrew directly being picked upĮcho "use abrew or ibrew specifically" >&2Įither abrew (ARM) or ibrew (x86) must be invoked explicitly instead.I have a Flutter project that I'm trying to run on iOS. In an effort to prevent future mixups, I aliased brew to fail: if ] then The solution: explicitly specify the path to readline through RUBY_CONFIGURE_OPTS, making sure to send the ARM version: $ RUBY_CONFIGURE_OPTS=-with-readline-dir="$(abrew -prefix readline)" \ ARM ruby-build was finding x86 readline and failing compilation. Ruby-build was invoking brew to get a path for readline, but not the Homebrew I was trying to build under. However, the prefix-less brew command however referenced whichever happened to win in PATH, which in this case was the x86 install. I put in aliases to invoke each installation unambiguously: alias abrew='/opt/homebrew/bin/brew'Īlias ibrew='arch -x86_64 /usr/local/bin/brew' Homebrew is only semi-functional on ARM right now, and its recommendation for anyone who wanted to try ARM-based recipes was to double-install Homebrew – one for x86 which would be interpreted by Rosetta, and one for ARM (for the applications you could get to compile there). The specific error isn’t suggestive of much, but this line gave me the hint I needed: ruby-build: using readline from homebrew usr/local/opt/readline/include/readline/readline.h:485:14: note: 'rl_username_completion_function' declared hereĮxtern char *rl_username_completion_function PARAMS((const char *, int)) Ĭompiling. # define rl_username_completion_function username_completion_function Readline.c:79:42: note: expanded from macro 'rl_username_completion_function' Readline.c:1904:37: error: use of undeclared identifier 'username_completion_function' did you mean 'rl_username_completion_function'? Results logged to /var/folders/y8/5gh9rgvs6vz67yvp43r3c0780000gn/T/Īnd digging into the build log, the specific failed line: compiling ossl_config.c Installed openssl-1.1.1i to /Users/brandur/.rbenv/versions/3.0.0īUILD FAILED (macOS 11.1 using ruby-build 20201225) The failing command: $ rbenv install 3.0.0 I’m posting it here anyway so that my solution is googleable for anyone else who might run into the same thing. Ruby builds fine on Mac M1s, and it turns out that the problem was specific to my set up. I’m out of practice in handling these because the Homebrew/rbenv combination has worked so reliably for years. I wanted to try out Ruby 3’s new Ractors today, so I tried pulling it down via rbenv, but to my dismay, ran into a build failure.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |