Skip to content

llhttp cannot be imported as of Ruby 3.4

Description:

After the rebuild for Ruby 3.4, importing llhttp fails with an error:

irb(main):001> require "llhttp"
/usr/lib/ruby/gems/3.4.0/gems/ffi-compiler-1.0.1/lib/ffi-compiler/loader.rb:21:in 'FFI::Compiler::Loader.find': cannot find 'llhttp-ext' library (LoadError)
	from /usr/lib/ruby/gems/3.4.0/gems/llhttp-ffi-0.5.1/lib/llhttp.rb:13:in '<module:LLHttp>'
	from /usr/lib/ruby/gems/3.4.0/gems/llhttp-ffi-0.5.1/lib/llhttp.rb:6:in '<top (required)>'
	from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:141:in 'Kernel#require'
	from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:141:in 'Kernel#require'
	from (irb):1:in '<main>'
	from <internal:kernel>:168:in 'Kernel#loop'
	from /usr/lib/ruby/gems/3.4.0/gems/irb-1.14.3/exe/irb:9:in '<top (required)>'
	from /usr/bin/irb:25:in 'Kernel#load'
	from /usr/bin/irb:25:in '<main>'
<internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require': cannot load such file -- llhttp (LoadError)
	from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
	from (irb):1:in '<main>'
	from /usr/lib/ruby/3.4.0/irb/workspace.rb:101:in 'Kernel#eval'
	from /usr/lib/ruby/3.4.0/irb/workspace.rb:101:in 'IRB::WorkSpace#evaluate'
	from /usr/lib/ruby/3.4.0/irb/context.rb:631:in 'IRB::Context#evaluate_expression'
	from /usr/lib/ruby/3.4.0/irb/context.rb:599:in 'IRB::Context#evaluate'
	from /usr/lib/ruby/3.4.0/irb.rb:1053:in 'block (2 levels) in IRB::Irb#eval_input'
	from /usr/lib/ruby/3.4.0/irb.rb:1365:in 'IRB::Irb#signal_status'
	from /usr/lib/ruby/3.4.0/irb.rb:1045:in 'block in IRB::Irb#eval_input'
	from /usr/lib/ruby/3.4.0/irb.rb:1124:in 'block in IRB::Irb#each_top_level_statement'
	from <internal:kernel>:168:in 'Kernel#loop'
	from /usr/lib/ruby/3.4.0/irb.rb:1121:in 'IRB::Irb#each_top_level_statement'
	from /usr/lib/ruby/3.4.0/irb.rb:1044:in 'IRB::Irb#eval_input'
	from /usr/lib/ruby/3.4.0/irb.rb:1025:in 'block in IRB::Irb#run'
	from /usr/lib/ruby/3.4.0/irb.rb:1024:in 'Kernel#catch'
	from /usr/lib/ruby/3.4.0/irb.rb:1024:in 'IRB::Irb#run'

Additional info:

  • package version(s): ruby-llhttp-ffi 0.5.1-2
  • config and/or log files: n/a
  • link to upstream bug report, if any: n/a

Steps to reproduce:

  1. Start irb
  2. require "lhttp"
  3. See error above
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information