Skip to content

Issue with ffi gem dependency #90

@twoesplease

Description

@twoesplease

Lately in my projects that use pi_piper, I'm getting the following in my stack trace when the code tries to initialize a new pin object:

        12: from watch_chat_waits.rb:98:in `light_it_up'
        11: from watch_chat_waits.rb:105:in `pin'
        10: from watch_chat_waits.rb:105:in `new'
         9: from /usr/local/lib/ruby/gems/2.5.0/gems/pi_piper-2.0.0/lib/pi_piper/pin.rb:56:in `initialize'
         8: from /usr/local/lib/ruby/gems/2.5.0/gems/pi_piper-2.0.0/lib/pi_piper/platform.rb:10:in `driver'
         7: from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
         6: from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
         5: from /usr/local/lib/ruby/gems/2.5.0/gems/pi_piper-2.0.0/lib/pi_piper/bcm2835.rb:3:in `<top (required)>'
         4: from /usr/local/lib/ruby/gems/2.5.0/gems/pi_piper-2.0.0/lib/pi_piper/bcm2835.rb:6:in `<module:PiPiper>'
         3: from /usr/local/lib/ruby/gems/2.5.0/gems/pi_piper-2.0.0/lib/pi_piper/bcm2835.rb:8:in `<module:Bcm2835>'
         2: from /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:99:in `ffi_lib'
         1: from /usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:99:in `map'
/usr/local/lib/ruby/gems/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library '/usr/local/lib/ruby/gems/2.5.0/gems/pi_piper-2.0.0/lib/pi_piper/libbcm2835.so': dlopen(/usr/local/lib/ruby/gems/2.5.0/gems/pi_piper-2.0.0/lib/pi_piper/libbcm2835.so, 5): no suitable image found.  Did find: (LoadError)
        /usr/local/lib/ruby/gems/2.5.0/gems/pi_piper-2.0.0/lib/pi_piper/libbcm2835.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00
        /usr/local/lib/ruby/gems/2.5.0/gems/pi_piper-2.0.0/lib/pi_piper/libbcm2835.so: stat() failed with errno=25

"light_it_up" is the method name I'm using to manage the logic for turning the pin on & off. "pin" is the variable I'm using to hold the pin object.

Looks like there may be an issue with the ffi library?

I didn't see any similar issues to this one, and I tried updating the pi_piper and ffi gems with the same result.

Let me know if there's any other info I could share that'd help!

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions