Coder Social home page Coder Social logo

llhttp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

llhttp's Issues

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

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!

Trouble installing gem on M1 arm64-darwin20 mac

Hello! I'm having trouble running gem install on an M1 mac.

Has anyone had a similar issue? And, ideally, solved it? :-)

Here's the error

$gem install llhttp-ffi
Building native extensions. This could take a while...
ERROR:  Error installing llhttp-ffi:
        ERROR: Failed to build gem native extension.

    current directory: /Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/gems/llhttp-ffi-0.3.0/ext
/Users/jpb/.asdf/installs/ruby/2.7.3/bin/ruby -I/Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/2.7.0/rubygems -rrubygems /Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/gems/rake-13.0.3/exe/rake RUBYARCHDIR\=/Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/extensions/arm64-darwin-20/2.7.0/llhttp-ffi-0.3.0 RUBYLIBDIR\=/Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/extensions/arm64-darwin-20/2.7.0/llhttp-ffi-0.3.0
rake aborted!
LoadError: dlopen(/Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/gems/ffi-1.15.1/lib/ffi_c.bundle, 9): no suitable image found.  Did find:
        /Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/gems/ffi-1.15.1/lib/ffi_c.bundle: mach-o, but wrong architecture
        /Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/gems/ffi-1.15.1/lib/ffi_c.bundle: mach-o, but wrong architecture - /Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/gems/ffi-1.15.1/lib/ffi_c.bundle


Caused by:
LoadError: cannot load such file -- 2.7/ffi_c


Caused by:
LoadError: cannot load such file -- ffi-compiler/compile_task

(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/gems/llhttp-ffi-0.3.0 for inspection.
Results logged to /Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0/extensions/arm64-darwin-20/2.7.0/llhttp-ffi-0.3.0/gem_make.out

    ~/workspace/rcrdshp    master *2 !5 ?2            

and here's the environment

gem env               
RubyGems Environment:
  - RUBYGEMS VERSION: 3.1.6
  - RUBY VERSION: 2.7.3 (2021-04-05 patchlevel 183) [arm64-darwin20]
  - INSTALLATION DIRECTORY: /Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0
  - USER INSTALLATION DIRECTORY: /Users/jpb/.gem/ruby/2.7.0
  - RUBY EXECUTABLE: /Users/jpb/.asdf/installs/ruby/2.7.3/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /Users/jpb/.asdf/installs/ruby/2.7.3/bin
  - SPEC CACHE DIRECTORY: /Users/jpb/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/jpb/.asdf/installs/ruby/2.7.3/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - arm64-darwin-20
  - GEM PATHS:
     - /Users/jpb/.asdf/installs/ruby/2.7.3/lib/ruby/gems/2.7.0
     - /Users/jpb/.gem/ruby/2.7.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Users/jpb/.asdf/installs/ruby/2.7.3/bin
     - /Users/jpb/.asdf/shims
     - /opt/homebrew/opt/asdf/bin
     - /opt/homebrew/bin
     - /opt/homebrew/sbin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /Library/Apple/usr/bin
     - /opt/homebrew/bin
     - /opt/homebrew/sbin

FFI free call fails inside finalizer

Hi!

While using ruby -d, I noticed the following:

Exception `NoMethodError' at [..]/gems/llhttp-ffi-0.0.1/lib/llhttp/parser.rb:155 - undefined method `llhttp_free' for LLHttp:Module
Did you mean?  rb_llhttp_free

I'm using an old version because of http's dependency pin, but at a glance main doesn't seem relevantly changed, and I think DYM might be right?
https://github.com/metabahn/llhttp/blob/d2899044282fafc513b448c67cba692452683145/ffi/lib/llhttp/parser.rb#L155
https://github.com/metabahn/llhttp/blob/d2899044282fafc513b448c67cba692452683145/ffi/lib/llhttp.rb#L41

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.