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

llhttp-ffi install failing on Mac OS Ventura via asdf/Ruby 3.2.2 #29

Closed
manewitz opened this issue Aug 22, 2023 · 1 comment
Closed

Comments

@manewitz
Copy link

Hello! One of the apps I work on is failing on install via bundle or rubygems on my development machine (M1 MacBook/Ventura 13.5.1) because of the http gem we use which relies on llhttp-ffi. It seemed to happen after upgrading the OS recently with dot release but I can't be sure that's the cause. I checked and re-installed Xcode, reinstalled various homebrew libs , and I've installed Ruby 3.2.2 in different ways with different compiler flags and still getting the same error. I can gem install llhttp and ffi but gem install llhttp-ffi is consistently failing with the following errors: (adding ffi-compiler to the Gemfile wasn't helpful)

> gem install llhttp-ffi
Fetching llhttp-ffi-0.5.0.gem
Fetching ffi-1.15.5.gem
Building native extensions. This could take a while...
Successfully installed ffi-1.15.5
Building native extensions. This could take a while...
ERROR:  Error installing llhttp-ffi:
	ERROR: Failed to build gem native extension.

    current directory: /Users/mikemanewitz/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/llhttp-ffi-0.5.0/ext
/Users/mikemanewitz/.asdf/installs/ruby/3.2.2/bin/ruby -rrubygems /Users/mikemanewitz/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR\=/Users/mikemanewitz/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/extensions/arm64-darwin-22/3.2.0/llhttp-ffi-0.5.0 RUBYLIBDIR\=/Users/mikemanewitz/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/extensions/arm64-darwin-22/3.2.0/llhttp-ffi-0.5.0
rake aborted!
LoadError: cannot load such file -- ffi-compiler/compile_task
<internal:/Users/mikemanewitz/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/Users/mikemanewitz/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /Users/mikemanewitz/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/llhttp-ffi-0.5.0 for inspection.
Results logged to /Users/mikemanewitz/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/extensions/arm64-darwin-22/3.2.0/llhttp-ffi-0.5.0/gem_make.out

asdf info results:

OS:
Darwin _ 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64

SHELL:
zsh 5.9 (x86_64-apple-darwin22.0)

BASH VERSION:
3.2.57(1)-release

ASDF VERSION:
v0.12.0

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/mikemanewitz/.asdf
ASDF_DIR=/opt/homebrew/opt/asdf/libexec
ASDF_CONFIG_FILE=/Users/mikemanewitz/.asdfrc

ASDF INSTALLED PLUGINS:
elixir                       https://github.com/asdf-vm/asdf-elixir.git master a4c42e1
erlang                       https://github.com/asdf-vm/asdf-erlang.git master 6744df7
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 4f8aa3d
ruby                         https://github.com/asdf-vm/asdf-ruby.git master 8cb9721
rust                         https://github.com/code-lever/asdf-rust.git master 95acf4f

Anyone have any ideas on what could be happening? Happy to add any additional context/config info but I'm about to nuke my setup and start over since I've been spinning my wheels for a couple days. Any help is much appreciated. Thank you!

@manewitz
Copy link
Author

I was able to figure it out. I had to install the gem rubygems-tasks which I don't see referred to anywhere. It might be worth explicitly noting this somewhere or adding to the dependencies? I'm on the latest rubygems (3.4.10) if that makes a difference.

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

No branches or pull requests

1 participant