Good morning, I would first like to congratulate the excellent app that you guys help maintain.
I am having a problem on rails that does not let me complete the implementation of the bundle.
Sorry I do not know how to format text of code.
the following error occurs:
//
$ gem install ffi -v '1.9.14'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/ext/ffi_c
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20160929-29204-1ii08zk.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/ffi-1.9.14/mkmf.log
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/ext/ffi_c
make "DESTDIR=" clean
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/ext/ffi_c
make "DESTDIR="
Configuring libffi
/data/data/com.termux/files/usr/bin/sh: 4: /usr/bin/env: not found
make: *** [libffi.mk:7: "/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/ext/ffi_c/libffi-arm-linux-androideabi"/.libs/libffi_convenience.a] Error 127
make failed, exit code 2
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/ffi-1.9.14/gem_make.out
$ apt-cache show clang | grep Version
Version: 3.9.0
//
The gem install ffi fails due to the gem trying to build a bundled copy of libffi, which does not work due to assumptions that /usr/bin/env exists and too old libffi copy.
However, you can build the ffi gem against the system libffi - install the packages:
apt install clang make ruby-dev libffi-dev
After that the ffi gem should build:
gem install ffi
worked perfectly, I could make the installation the gem, but now has the problem in two other gems:
Installing sqlite3 1.3.11 with native extensions
and
Installing rb-inotify 0.9.7
Gem :: Ext :: BuildError: ERROR: Failed to build gem native extension.
follows the whole code, I am now starting on schedule, so we still do not understand these minutiae and problems related problems.
sorry if I'm being boring
//
current directory:
/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11/ext/sqlite3
/data/data/com.termux/files/usr/bin/ruby -r
./siteconf20160929-15705-j9kt9q.rb extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
and check your shared library search path (the
location where your sqlite3 shared library is located).
* 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=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME)
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which
can be found here:
/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/sqlite3-1.3.11/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11 for
inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/sqlite3-1.3.11/gem_make.out
An error occurred while installing sqlite3 (1.3.11), and Bundler
cannot continue.
Make sure that gem install sqlite3 -v '1.3.11' succeeds before
bundling.//
Just an afterthought, the sqlite3 gem appears on the project Gemfile, but does not appear when I run the gem command list, and the bundle can not install it
Run apt install libsqlite-dev before installing the sqlite3 gem!
bundle config build.nokogiri --use-system-libraries
bundle install
Error please help me
Take a look at this: https://gist.github.com/paresharma/ec628a7fa5524a0ed18b227387d1b43a
Most helpful comment
The
gem install ffifails due to the gem trying to build a bundled copy of libffi, which does not work due to assumptions that/usr/bin/envexists and too old libffi copy.However, you can build the ffi gem against the system libffi - install the packages:
After that the ffi gem should build: