ruby / fiddle

A libffi wrapper for Ruby.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raspberry Pi Cannot Update to 1.1.0

daBee opened this issue · comments

commented

For some reason the Bullseye OS cannot update fiddle from 1.0.0 to 1.1.0 due to missing libraries (RP Zero 2 W, and RP4):

**mkmf.log:**
"pkg-config --exists libffi"
package configuration for libffi is not found

$ sudo apt install libffi7
[Wed Mar 30 07:57:00 rich@sniff ~] sudo apt install libffi7 -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libffi7 is already the newest version (3.3-6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Using bundler 2.3.10 and not finding any entry for fiddle in Gemfile.lock at all.

$ gem search fiddle

*** REMOTE GEMS ***

fiddle (1.1.0)
fiddle_fart (0.0.1)
fiddler (1.0.1)
fiddler-rb (0.1.2)
fiddlesticks (0.2.0)
fiddley (0.0.8)
jekyll-scalafiddle (1.0.1)
sfml-audio-fiddle (0.1.0)
sqlite3-fiddle (1.0.0)
wifiddler (0.0.1)

$  gem update fiddle
Updating installed gems
Updating fiddle
Building native extensions. This could take a while...
ERROR:  Error installing fiddle:
	ERROR: Failed to build gem native extension.

    current directory: /home/rich/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fiddle-1.1.0/ext/fiddle
/home/rich/.rbenv/versions/2.7.1/bin/ruby -I /home/rich/.rbenv/versions/2.7.1/lib/ruby/2.7.0 -r ./siteconf20220330-11386-1jcr95p.rb extconf.rb
checking for --enable-debug-build option... no
checking for ffi.h... no
checking for ffi/ffi.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/home/rich/.rbenv/versions/2.7.1/bin/$(RUBY_BASE_NAME)
	--enable-debug-build
	--disable-debug-build
	--enable-bundled-libffi
	--disable-bundled-libffi
	--with-libffi-dir
	--without-libffi-dir
	--with-libffi-include
	--without-libffi-include=${libffi-dir}/include
	--with-libffi-lib
	--without-libffi-lib=${libffi-dir}/lib
	--with-libffi-config
	--without-libffi-config
	--with-pkg-config
	--without-pkg-config
	--with-ffi-dir
	--without-ffi-dir
	--with-ffi-include
	--without-ffi-include=${ffi-dir}/include
	--with-ffi-lib
	--without-ffi-lib=${ffi-dir}/lib
extconf.rb:87:in `<main>': missing libffi. Please install libffi. (RuntimeError)

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/rich/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/extensions/armv7l-linux-eabihf/2.7.0/fiddle-1.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/rich/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fiddle-1.1.0 for inspection.
Results logged to /home/rich/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/extensions/armv7l-linux-eabihf/2.7.0/fiddle-1.1.0/gem_make.out
Gems updated: fiddle

Could you install libffi-dev package?
https://packages.debian.org/bullseye/libffi-dev

commented

Did the trick. Cheers