nodejs / http-parser

http request/response parser for c

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libhttp-parser-ext.bundle, 5): no suitable image found

rgaufman opened this issue · comments

I'm getting the following on Apple Silicon M1 on a brand new app created with rails new TestApp and adding http-parser:

Romans-MacBook-Air.local ➜  TestApp git:(master) ✗ bundle exec rails c
/opt/homebrew/lib/ruby/gems/2.7.0/bundler/gems/ffi-2b44904f8323/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library '/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/arm-darwin/libhttp-parser-ext.bundle': dlopen(/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/arm-darwin/libhttp-parser-ext.bundle, 5): no suitable image found.  Did find:
	/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/arm-darwin/libhttp-parser-ext.bundle: mach-o, but wrong architecture
	/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/arm-darwin/libhttp-parser-ext.bundle: mach-o, but wrong architecture (LoadError)
	from /opt/homebrew/lib/ruby/gems/2.7.0/bundler/gems/ffi-2b44904f8323/lib/ffi/library.rb:99:in `map'
	from /opt/homebrew/lib/ruby/gems/2.7.0/bundler/gems/ffi-2b44904f8323/lib/ffi/library.rb:99:in `ffi_lib'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/lib/http-parser/ext.rb:8:in `<module:HttpParser>'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/lib/http-parser/ext.rb:6:in `<main>'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/lib/http-parser.rb:5:in `<main>'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/http-4.4.1/lib/http/response/parser.rb:3:in `<main>'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/http-4.4.1/lib/http/connection.rb:6:in `<main>'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/http-4.4.1/lib/http/client.rb:9:in `<main>'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/http-4.4.1/lib/http.rb:8:in `<main>'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/bundler/gems/tether-mqtt-10f691bb60a5/lib/tether/mqtt.rb:11:in `<main>'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	from /opt/homebrew/Cellar/ruby/2.7.2/lib/ruby/2.7.0/bundler/runtime.rb:88:in `rescue in block in require'
	from /opt/homebrew/Cellar/ruby/2.7.2/lib/ruby/2.7.0/bundler/runtime.rb:65:in `block in require'
	from /opt/homebrew/Cellar/ruby/2.7.2/lib/ruby/2.7.0/bundler/runtime.rb:58:in `each'
	from /opt/homebrew/Cellar/ruby/2.7.2/lib/ruby/2.7.0/bundler/runtime.rb:58:in `require'
	from /opt/homebrew/Cellar/ruby/2.7.2/lib/ruby/2.7.0/bundler.rb:174:in `require'
	from /Users/hackeron/Development/Tether/TestApp/config/application.rb:7:in `<top (required)>'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:92:in `require'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:92:in `preload'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
	from /opt/homebrew/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
	from /opt/homebrew/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from /opt/homebrew/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from -e:1:in `<main>'

Any ideas?

This is what's in the directory:

Romans-MacBook-Air.local ➜  find /opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext
/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext
/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/http-parser
/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/http-parser/http_parser.h
/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/http-parser/http_parser.c
/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/Rakefile
/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/arm-darwin
/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/arm-darwin/http-parser
/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/arm-darwin/http-parser/http_parser.o
/opt/homebrew/lib/ruby/gems/2.7.0/gems/http-parser-1.2.2/ext/arm-darwin/libhttp-parser-ext.bundle

Hello!

Thanks for reporting this. We don't maintain the rubygems version of the http-parser, and it looks like you are having issues with a pre-built version of this library. Could you consider filing an issue with rubygems instead?

Ah, apologies, filed there!

Also, nodejs/http-parser is dead; long live nodejs/llhttp