Got the DevKit installed and re-ran the ffi install….got this as an output:
C:Documents and Settings******>gem install ffi
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... yes
checking for ruby_thread_has_gvl_p()... yes
checking for ruby_native_thread_p()... yes
checking for rb_thread_call_with_gvl()... yes
creating extconf.h
creating Makefile
make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_ffi_c'" > ffi_c-i386-mingw32.def
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1
.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H="extcon
f.h" -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -
Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -Wno-declaration-a
fter-statement -o AbstractMemory.o -c AbstractMemory.c
In file included from AbstractMemory.c:28:0:
compat.h:65:20: warning: extra tokens at end of #ifndef directive
compat.h:69:24: warning: extra tokens at end of #ifndef directive
In file included from AbstractMemory.h:29:0,
from AbstractMemory.c:29:
Types.h:68:17: fatal error: ffi.h: No such file or directory
compilation terminated.
make: *** [AbstractMemory.o] Error 1
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.1
0 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.10/ext/ffi_c/gem_m
ake.out
_________________________________________________________________________________
Not sure how to deal with this issue. Kindly help.
tadman
206k23 gold badges233 silver badges260 bronze badges
asked Oct 21, 2011 at 16:42
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
johnnyRose
7,11017 gold badges42 silver badges61 bronze badges
answered May 11, 2017 at 22:23
ElS arekhElS arekh
2212 silver badges3 bronze badges
1
Version 1.0.10 has issues compiling on windows.
You can use the 1.0.9
gem install ffi --version='1.0.9'
answered Oct 26, 2011 at 14:10
tommasoptommasop
18.3k2 gold badges40 silver badges51 bronze badges
3
sudo apt-get install libffi-dev
This worked for me
answered Feb 6, 2018 at 19:06
sahilbathlasahilbathla
5093 silver badges10 bronze badges
1
For me the fix was running in this order. I’m not sure what all was relevant, but it worked:
gem install ffi --version '1.0.9'
The above failed, but then I could successfully run:
gem install bundler
…and subsequently:
gem install ffi
…which got the latest version (1.6.0 at the time of writing this) and installed it successfully.
answered Mar 27, 2013 at 15:23
GrinnGrinn
5,33237 silver badges50 bronze badges
1
Note that installing version 1.0.9 isn’t going to be enough if your bundler keeps trying to go out and grab the latest version. In your gemfile you’ll also want to put:
gem 'ffi', '1.0.9'
This should satisfy the dependency for whatever gem is asking for it and let you get up and running.
answered Dec 5, 2011 at 18:14
DVGDVG
17.3k7 gold badges60 silver badges87 bronze badges
when the above steps are followed, it might results the following message.
$ bundle install
Fetching source index for https://rubygems.org/
You have requested:
ffi = 1.0.9
The bundle currently has ffi locked at 1.0.11.
Try running `bundle update ffi`
In that case, you can run the ‘bundle update ffi’ command and the error will be solved.
answered Feb 21, 2012 at 10:41
maniempiremaniempire
78111 silver badges12 bronze badges
Helped me:
sudo apt install build-essential
Debian 9
Ruby 2.3.3
answered Feb 28, 2020 at 12:37
vovanvovan
1,42512 silver badges21 bronze badges
you need this,
apt-get install ruby2.2-dev
answered Jul 14, 2015 at 21:48
For me, this usually works
gem install ffi -- --disable-system-libffi
answered Oct 23, 2020 at 15:22
1
On MacOS (Catalina), running brew install libtool
first solved the problem for me.
answered Apr 10, 2020 at 15:53
hamx0rhamx0r
3,9111 gold badge31 silver badges41 bronze badges
This worked for me
gem install ffi -- --disable-system-libffi
on Ubuntu 20.04 (WSL)
answered Dec 22, 2020 at 0:42
1
Put DevKit in front of your PATH, and install again from Windows command prompt.
answered Feb 7, 2013 at 0:26
konyakkonyak
10.4k3 gold badges57 silver badges64 bronze badges
I had to install automake
to get it working. Worked on both mac OSX as well as Ubuntu (CI machine).
answered Feb 16, 2018 at 22:32
same error when installing jekyll:
current directory:
/usr/local/Cellar/ruby/2.6.0_1/lib/ruby/gems/2.6.0/gems/ffi-1.9.18/ext/ffi_c
/usr/local/Cellar/ruby/2.6.0_1/bin/ruby -I
/usr/local/Cellar/ruby/2.6.0_1/lib/ruby/2.6.0 -r
./siteconf20190121-23853-1ljy8kj.rb extconf.rb
/usr/local/Cellar/ruby/2.6.0_1/lib/ruby/2.6.0/mkmf.rb:1565: warning: Insecure
world writable dir /usr/local/Cellar in PATH, mode 040777
checking for ffi.h… no
checking for ffi.h in /usr/local/include,/usr/include/ffi… yes
checking for ffi_call() in -lffi… yes
checking for ffi_prep_closure()… yes
checking for ffi_raw_call()… no
checking for shlwapi.h… 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
current directory:
/usr/local/Cellar/ruby/2.6.0_1/lib/ruby/gems/2.6.0/gems/ffi-1.9.18/ext/ffi_c
make «DESTDIR=» clean
current directory:
/usr/local/Cellar/ruby/2.6.0_1/lib/ruby/gems/2.6.0/gems/ffi-1.9.18/ext/ffi_c
make «DESTDIR=»
compiling AbstractMemory.c
AbstractMemory.c:478:20: error: use of unknown builtin
‘__builtin_alloca_with_align’ [-Wimplicit-function-declaration]
VALUE* rargv = ALLOCA_N(VALUE, argc + 1);
^
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:1666:12: note:
expanded from macro ‘ALLOCA_N’
(type*)__builtin_alloca_with_align((sizeof(type)*(n)),
^
AbstractMemory.c:478:20: warning: cast to ‘VALUE ‘ (aka ‘unsigned long ‘) from
smaller integer type ‘int’ [-Wint-to-pointer-cast]
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:1666:5: note:
expanded from macro ‘ALLOCA_N’
(type)__builtin_alloca_with_align((sizeof(type)(n)),
^
AbstractMemory.c:562:17: warning: division by zero is undefined
[-Wdivision-by-zero]
int nargs = rb_scan_args(argc, argv, «22», &offset, &str, &rbIndex,
&rbLength);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2295:9: note:
expanded from macro ‘rb_scan_args’
rb_scan_args0(argc,argvp,fmt,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2479:9: note:
expanded from macro ‘rb_scan_args0’
(rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2362:11: note:
expanded from macro ‘rb_scan_args_verify’
verify = rb_scan_args_verify_count(fmt, varc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see
all)
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2327:6: note:
expanded from macro ‘rb_scan_args_count_hash’
rb_scan_args_count_block(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2322:6: note:
expanded from macro ‘rb_scan_args_count_block’
rb_scan_args_count_end(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2317:13: note:
expanded from macro ‘rb_scan_args_count_end’
((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AbstractMemory.c:562:17: warning: division by zero is undefined
[-Wdivision-by-zero]
int nargs = rb_scan_args(argc, argv, «22», &offset, &str, &rbIndex,
&rbLength);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2295:9: note:
expanded from macro ‘rb_scan_args’
rb_scan_args0(argc,argvp,fmt,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2479:9: note:
expanded from macro ‘rb_scan_args0’
(rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2362:11: note:
expanded from macro ‘rb_scan_args_verify’
verify = rb_scan_args_verify_count(fmt, varc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see
all)
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2327:6: note:
expanded from macro ‘rb_scan_args_count_hash’
rb_scan_args_count_block(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2323:6: note:
expanded from macro ‘rb_scan_args_count_block’
rb_scan_args_count_end(fmt, ofs+1, varc, vari+1))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2317:13: note:
expanded from macro ‘rb_scan_args_count_end’
((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AbstractMemory.c:562:17: warning: division by zero is undefined
[-Wdivision-by-zero]
int nargs = rb_scan_args(argc, argv, «22», &offset, &str, &rbIndex,
&rbLength);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2295:9: note:
expanded from macro ‘rb_scan_args’
rb_scan_args0(argc,argvp,fmt,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2479:9: note:
expanded from macro ‘rb_scan_args0’
(rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2362:11: note:
expanded from macro ‘rb_scan_args_verify’
verify = rb_scan_args_verify_count(fmt, varc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see
all)
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2328:6: note:
expanded from macro ‘rb_scan_args_count_hash’
rb_scan_args_count_block(fmt, ofs+1, varc, vari+1))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2322:6: note:
expanded from macro ‘rb_scan_args_count_block’
rb_scan_args_count_end(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2317:13: note:
expanded from macro ‘rb_scan_args_count_end’
((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AbstractMemory.c:562:17: warning: division by zero is undefined
[-Wdivision-by-zero]
int nargs = rb_scan_args(argc, argv, «22», &offset, &str, &rbIndex,
&rbLength);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2295:9: note:
expanded from macro ‘rb_scan_args’
rb_scan_args0(argc,argvp,fmt,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2479:9: note:
expanded from macro ‘rb_scan_args0’
(rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2362:11: note:
expanded from macro ‘rb_scan_args_verify’
verify = rb_scan_args_verify_count(fmt, varc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see
all)
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2327:6: note:
expanded from macro ‘rb_scan_args_count_hash’
rb_scan_args_count_block(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2322:6: note:
expanded from macro ‘rb_scan_args_count_block’
rb_scan_args_count_end(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2317:13: note:
expanded from macro ‘rb_scan_args_count_end’
((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AbstractMemory.c:562:17: warning: division by zero is undefined
[-Wdivision-by-zero]
int nargs = rb_scan_args(argc, argv, «22», &offset, &str, &rbIndex,
&rbLength);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2295:9: note:
expanded from macro ‘rb_scan_args’
rb_scan_args0(argc,argvp,fmt,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2479:9: note:
expanded from macro ‘rb_scan_args0’
(rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2362:11: note:
expanded from macro ‘rb_scan_args_verify’
verify = rb_scan_args_verify_count(fmt, varc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see
all)
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2327:6: note:
expanded from macro ‘rb_scan_args_count_hash’
rb_scan_args_count_block(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2322:6: note:
expanded from macro ‘rb_scan_args_count_block’
rb_scan_args_count_end(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2317:13: note:
expanded from macro ‘rb_scan_args_count_end’
((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AbstractMemory.c:562:17: warning: division by zero is undefined
[-Wdivision-by-zero]
int nargs = rb_scan_args(argc, argv, «22», &offset, &str, &rbIndex,
&rbLength);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2295:9: note:
expanded from macro ‘rb_scan_args’
rb_scan_args0(argc,argvp,fmt,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2479:9: note:
expanded from macro ‘rb_scan_args0’
(rb_scan_args_verify(fmt, varc), vars), (char )fmt, varc)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2362:11: note:
expanded from macro ‘rb_scan_args_verify’
verify = rb_scan_args_verify_count(fmt, varc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see
all)
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2327:6: note:
expanded from macro ‘rb_scan_args_count_hash’
rb_scan_args_count_block(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2322:6: note:
expanded from macro ‘rb_scan_args_count_block’
rb_scan_args_count_end(fmt, ofs, varc, vari) :
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:2317:13: note:
expanded from macro ‘rb_scan_args_count_end’
((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AbstractMemory.c:615:20: warning: cast to ‘VALUE ‘ (aka ‘unsigned long ‘) from
smaller integer type ‘int’ [-Wint-to-pointer-cast]
VALUE wargv = ALLOCA_N(VALUE, argc + 1);
^
/usr/local/Cellar/ruby/2.6.0_1/include/ruby-2.6.0/ruby/ruby.h:1666:5: note:
expanded from macro ‘ALLOCA_N’
(type)__builtin_alloca_with_align((sizeof(type)(n)),
^
8 warnings and 1 error generated.
make: *** [AbstractMemory.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/usr/local/Cellar/ruby/2.6.0_1/lib/ruby/gems/2.6.0/gems/ffi-1.9.18 for
inspection.
Results logged to
/usr/local/Cellar/ruby/2.6.0_1/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-16/2.6.0/ffi-1.9.18/gem_make.out
An error occurred while installing ffi (1.9.18), and Bundler cannot
continue.
Содержание
- Installing ffi 1.9.21 with native extensions on Ruby 2.4.2, Ubuntu 17.10 failing. #608
- Comments
- Trouble with installing cocoapods
- Accepted Reply
- Replies
- Failed to build gem native extension #133
- Comments
- Footer
Installing ffi 1.9.21 with native extensions on Ruby 2.4.2, Ubuntu 17.10 failing. #608
Error looks like this.
The text was updated successfully, but these errors were encountered:
I am experiencing a similar issue on Ubuntu 16.04lts, when trying to install the latest ffi (1.9.21).
Seems like this issue is due to the ffi latest version, I specified the ffi oldest version in Gemfile gem ‘ffi’, ‘1.9.18’ run bundle install it fixed my issue.
This can be reproduced by:
we have the same problem, pinning 1.9.18 for now
Yes. Installing 1.9.18 work fine.
But in my case I am trying to init a new Jekyll project, so even after installing ffi 1.9.18 when jekyll new project is run it fails trying to install the latest ffi
@vdonchev can you please share your Gemfile.
@affan00 which Gemfile exactly?
the Gemfile is created during the Jekyll new command execution.
This is a known issue — see #607 . You can either downgrade to ffi-1.9.18 or install libffi before ffi gem like so:
I’m having trouble updating from ffi gems, when I deploy to AWS, did anyone have this problem?
I can not downgrade to gem version ‘ffi’, ‘
Thank you very much in advance.
@jhsoare I had the same problems in my server AWS with ubuntu 14.04.5 and just run
sudo apt install libffi-dev
And in my gemfile group production add gem ‘ffi’, ‘1.9.18’ , it work for me
I’m seeing the same problem on Ubuntu 14.04, 1.19.18 installed fine
@tneems It clearly mentioned in your logs that right now it uses ffi gem version 1.9.21 instead of 1.9.18. In order to use the ffi gem version 1.9.18 you have to lock this gem to the specific 1.9.18 version for that you have to add these lines to your Gemfile.
After that, you have to run bundle install in your console and make sure that now ffi gem use 1.9.18 version and after that, you are good to go.
Hi I have specified in my gem file like below
gem ‘ffi’, ‘1.9.18’
but still it’s trying to download latest one when I execute bundle install how to overcome this problem
your help will be greatly appreciated.
Installing ffi 1.9.21 with native extensions
Same issue as #607, dependency on autotools.
Источник
Trouble with installing cocoapods
I am getting the same error over and over again and I do not know why. I tried several ways to fix it, but nothing works.
Something might be wrong with Ruby, but I could not figure out what I should do to fix it.
Accepted Reply
Depending on some aspects this might work for you, if you don’t mind using the «SUDO» command:
sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
Latest CocoaPods 1.10.0 won’t work.
Having same issue with my mac, anyone please help.
I really don’t know how to thank you I spent 4 hours trying to solve this problem Thank you with all my heart
Man thanks. You are a lifesaver.
1) Install homebrew via terminal.
2) After homebrew is successfully installed, type in the terminal ‘$ brew install cocoapods’
Thank you my man, it solved my issues 🙂
Thanks. This worked for me
this works for me.
sudo xcode-select —switch /Applications/Xcode-beta.app/Contents/Developer
explain solution
sudo xcode-select —switch
Depending on some aspects this might work for you, if you don’t mind using the «SUDO» command:
sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
Latest CocoaPods 1.10.0 won’t work.
Having same issue with my mac, anyone please help.
I really don’t know how to thank you I spent 4 hours trying to solve this problem Thank you with all my heart
Man thanks. You are a lifesaver.
Thank you all ! With sudo gem install cocoapods it worked!
Same problem — XCode 12.3 on Mac OS 10.15.6.
Tried the CocoaPod mac app from the CocoaPods about page, which did have an option to install the command line tool, but it was version 1.1.x for some reason.
Brew install did the trick, and installed 1.10.0.
how’d you get it to install 1.10.0, a detailed explanation would be desperately appreciated thank you. Ive been at it for 2/3 days straight on installing the latest version for my project
hai @ Me -Human has your problem been solved?
am having the same problem , using: brew install cocoapod , would install version 1.5 and I need version 1.10 even when I tried brew it installed version 1.5. every time I upgrade , it gives me same error msg:
Источник
Failed to build gem native extension #133
I met a snag as the following:
The version of Ruby installed is ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux-gnu]
Could anyone please tell me why and how to tackle it? Thanks very much.
The text was updated successfully, but these errors were encountered:
Did you also install the development headers? They don’t seem to be present:
Do you mean installing ruby-dev? But the error remains the same after that step.
apt-get install ruby-dev
You need the Ruby 2.1 dev headers. Maybe @envygeeks would know more on how to get them.
sudo apt-get install ruby2.1-dev for 2.1.
There is something wrong with your apt source, Brightbox Ruby does have ruby2.1-dev but you can’t even reach it, which leads me to believe you need to remove the source and readd it.
I get this error when running sudo gem update github-pages . Is this related?
Updating installed gems
Updating github-pages
Building native extensions. This could take a while.
ERROR: Error installing github-pages:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make «DESTDIR=»
make: *** No rule to make target /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin14/ruby/config.h’, needed by autolink.o’. Stop.
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/redcarpet-3.3.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/redcarpet-3.3.2/ext/redcarpet/gem_make.out
Nothing to update
My Ruby version when running ruby -v is reported as:
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
@martinbean Related, yes, but on a different platform.
@parkr Strange. I’m not running El Capitan (still on Mavericks).
Check out the SDK version in that stack trace.
Closing as stale.
if using ruby version 2.2 or greater you need to have ruby2.2-dev
sudo apt-get install ruby2.2-dev
You might take a look
I am having a similar error on RHEL 7. I have also installed ruby-devel and am receving this error:
gem install tiny_tds —source http://rubygems.org
Building native extensions. This could take a while.
ERROR: Error installing tiny_tds:
ERROR: Failed to build gem native extension.
mkmf.rb can’t find header files for ruby at /opt/rh/rh-ruby22/root/usr/share/include/ruby.h
extconf failed, exit code 1
@midacts It looks like you’re using a custom version of Ruby installed to /opt/rh/rh-ruby22/root/usr . Installing ruby-devel won’t install the headers into this location, but into /usr/share/include/ruby.h instead. You will need to install the headers for the binary located at /opt/rh/rh-ruby22/root/usr/bin/ruby .
Hi @parkr Could you elaborate on how to do that? I’m a complete ruby noob, I’m just trying to get the knife-azure gem installed for chef, and am getting this message: current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.7.0.1/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20170220-10621-ejv836.rb extconf.rb
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/include/ruby.h
I tried this command: sudo apt-get install ruby2.3-dev
Then tried to install gem again, got: E: Unable to locate package ruby2.3.0-dev
Any advice appreciated!
I’ve installed git for windows,JRuby,rjgit and gollum serval days ago,and they work well. But gollum doesn’t recognize the form of table.When i install github-markdown by the command of gem install github-markdown,the error comes.
I got error while installing gem install github-pages
windows 10 machine
I don’t know why I’m being pinged here, but switch to Linux on Windows, it’s better.
Hi there, sorry for respawning the thread but I preferred to do so as I think it applies to my issue.
I am trying to install Jekyll locally as per the official instructions. It fails when trying to build/install commonmarker:
Installing commonmarker 0.17.9 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/vincent/.gem/ruby/gems/commonmarker-0.17.9/ext/commonmarker
/usr/bin/ruby -r ./siteconf20180425-8716-wb76yr.rb extconf.rb
Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi —version 1.9.18
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json —version 1.8.6
Ignoring nokogiri-1.7.1 because its extensions are not built. Try: gem pristine nokogiri —version 1.7.1
mkmf.rb can’t find header files for ruby at /usr/share/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /home/vincent/.gem/ruby/gems/commonmarker-0.17.9 for inspection.
Results logged to /home/vincent/.gem/ruby/extensions/x86_64-linux/2.4.0/commonmarker-0.17.9/gem_make.out
An error occurred while installing commonmarker (0.17.9), and Bundler cannot continue.
Make sure that gem install commonmarker -v ‘0.17.9’ succeeds before bundling.
In Gemfile:
github-pages was resolved to 182, which depends on
jekyll-commonmark-ghpages was resolved to 0.1.5, which depends on
jekyll-commonmark was resolved to 1.2.0, which depends on
commonmarker
The issue is that ruby.h is present on my machine (this is Fedora 26), albeit in a different location: /usr/include/ruby.h
I have a workaround in that I just symlink /usr/share/include/ruby.h to that location but I am not sure what is the status of Jekyll support via Github on the various distros. Is that an expected error (I am a newbie for Ruby-related things)?
I had the same above issue but it turned out I did need to install the ruby headers
sudo apt-get install ruby-all-dev
Link to solutions for other distros: StackOverflow Answer
Mine also needed zlib, so:
sudo apt-get install zlib1g-dev
On a Mac, make sure that you have the commandline tools installed
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
A while ago sudo gem update
started throwing the following error:
ERROR: Failed to build gem native extension.
This wasn’t a big deal, as I wasn’t doing any any active ruby development, but it was still a minor annoyance. Missing directories reported in mkmf.log hinted at the cause:
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.Internal.sdk/usr/local/lib'
Searching for fixes resulted in a bunch of dangerous cargo-culted answers suggesting to curl -L https://get.rvm.io | bash -s stable
and to then use rvm
to update to the latest version of ruby. In other words — to trust that the code output from that website wasn’t malicious, and to blindly execute the code.
The actual solution, however, was much simpler (and didn’t require running any unknown code). It turns out that the Xcode Command Line Tools location isn’t always applied when updating Xcode. To check, simply open Xcode, and select Preferences → Locations.
If Command Line Tools is blank, or doesn’t match the currently-installed version of Xcode, then select the correct Xcode version from the dropdown menu:
That’s it. Easy, peasy, done! And the below errors are Google Juice to assist folks that are having similar issues:
Updating installed gems
Updating bigdecimal
Building native extensions. This could take a while...
ERROR: Error installing bigdecimal:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/ext/bigdecimal
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-1luy5zj.rb extconf.rb
checking RUBY_BIGDECIMAL_VERSION... 3.0.0
checking for labs() in stdlib.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:782:in `try_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1069:in `block in have_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1068:in `have_func'
from extconf.rb:31:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/bigdecimal-3.0.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/bigdecimal-3.0.0/gem_make.out
Updating date
Building native extensions. This could take a while...
ERROR: Error installing date:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/date-3.1.1/ext/date
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-u08e31.rb extconf.rb
checking for timezone in time.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:802:in `try_var'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1091:in `block in have_var'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1090:in `have_var'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/date-3.1.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/date-3.1.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/date-3.1.1/gem_make.out
Updating etc
Building native extensions. This could take a while...
ERROR: Error installing etc:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/etc-1.2.0/ext/etc
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-y7maqo.rb extconf.rb
checking for sys/utsname.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header'
from extconf.rb:6:in `block in <main>'
from extconf.rb:5:in `each'
from extconf.rb:5:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/etc-1.2.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/etc-1.2.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/etc-1.2.0/gem_make.out
Updating ffi
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-224jk5.rb extconf.rb
checking for ffi.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--enable-system-libffi
--disable-system-libffi
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header'
from extconf.rb:10:in `system_libffi_usable?'
from extconf.rb:42:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.14.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.14.2/gem_make.out
Updating fiddle
Building native extensions. This could take a while...
ERROR: Error installing fiddle:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/fiddle-1.0.7/ext/fiddle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-wsxvtp.rb extconf.rb
checking for ffi.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--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
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header'
from extconf.rb:17:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/fiddle-1.0.7/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/fiddle-1.0.7 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/fiddle-1.0.7/gem_make.out
Updating irb
ERROR: Error installing irb:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/io-console-0.5.6/ext/io/console
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-mhy66h.rb extconf.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:852:in `macro_defined?'
from extconf.rb:7:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/io-console-0.5.6/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/io-console-0.5.6 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/io-console-0.5.6/gem_make.out
Updating jekyll
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-ipbh9a.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
make: *** No rule to make target `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin20/ruby/config.h', needed by `ruby_http_parser.o'. Stop.
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/http_parser.rb-0.6.0/gem_make.out
Updating json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/json-2.5.1/ext/json/ext/generator
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-t5kci9.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.6.0/gems/json-2.5.1/ext/json/ext/generator
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.6.0/gems/json-2.5.1/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in framework 'ruby' (loaded from '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/json-2.5.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/json-2.5.1/gem_make.out
Updating libxml-ruby
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/libxml-ruby-3.2.1/ext/libxml
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-xhczq.rb extconf.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby: warning: shebang line ending with r may cause problems
checking for libxml/xmlversion.h in /opt/include/libxml2,/opt/local/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2,/usr/local/include... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-xml2-config
--without-xml2-config
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1162:in `block in find_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1161:in `find_header'
from extconf.rb:28:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/libxml-ruby-3.2.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/libxml-ruby-3.2.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/libxml-ruby-3.2.1/gem_make.out
Updating listen
ERROR: Error installing listen:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-btb6k0.rb extconf.rb
checking for ffi.h... /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header'
from extconf.rb:10:in `system_libffi_usable?'
from extconf.rb:42:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.13.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.13.1/gem_make.out
Updating openssl
Building native extensions. This could take a while...
ERROR: Error installing openssl:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/openssl-2.2.0/ext/openssl
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-1yoyjh5.rb extconf.rb
checking for t_open() in -lnsl... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-openssl-dir
--with-openssl-include
--without-openssl-include=${openssl-dir}/include
--with-openssl-lib
--without-openssl-lib=${openssl-dir}/lib
--with-kerberos-dir
--without-kerberos-dir
--with-kerberos-include
--without-kerberos-include=${kerberos-dir}/include
--with-kerberos-lib
--without-kerberos-lib=${kerberos-dir}/lib
--with-debug
--without-debug
--enable-debug
--disable-debug
--with-nsllib
--without-nsllib
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:782:in `try_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1016:in `block in have_library'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1011:in `have_library'
from extconf.rb:30:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/openssl-2.2.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/openssl-2.2.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/openssl-2.2.0/gem_make.out
Updating psych
Building native extensions. This could take a while...
ERROR: Error installing psych:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/psych-3.3.0/ext/psych
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-1si57tx.rb extconf.rb
checking for yaml.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-libyaml-dir
--without-libyaml-dir
--with-libyaml-include
--without-libyaml-include=${libyaml-dir}/include
--with-libyaml-lib
--without-libyaml-lib=${libyaml-dir}/lib
--enable-bundled-libyaml
--disable-bundled-libyaml
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1162:in `block in find_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1161:in `find_header'
from extconf.rb:10:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/psych-3.3.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/psych-3.3.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/psych-3.3.0/gem_make.out
Updating reline
ERROR: Error installing reline:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/io-console-0.5.6/ext/io/console
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-im8ypq.rb extconf.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:852:in `macro_defined?'
from extconf.rb:7:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/io-console-0.5.6/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/io-console-0.5.6 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/io-console-0.5.6/gem_make.out
Updating stringio
Building native extensions. This could take a while...
ERROR: Error installing stringio:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/stringio-3.0.0/ext/stringio
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-wmsbid.rb extconf.rb
checking for rb_io_extract_modeenc() in ruby/io.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:782:in `try_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1069:in `block in have_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1068:in `have_func'
from extconf.rb:3:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/stringio-3.0.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/stringio-3.0.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/stringio-3.0.0/gem_make.out
Updating strscan
Building native extensions. This could take a while...
ERROR: Error installing strscan:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/strscan-3.0.0/ext/strscan
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210103-32419-vptjvg.rb extconf.rb
checking for onig_region_memsize() in ruby.h... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:782:in `try_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1069:in `block in have_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1068:in `have_func'
from extconf.rb:4:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/strscan-3.0.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/strscan-3.0.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/strscan-3.0.0/gem_make.out
Gems updated: bigdecimal date etc ffi fiddle json libxml-ruby openssl psych stringio strscan
September 28th at 12:00am
I’m starting a new ruby project to run my LED Lightboard using this gem from github. After following the instructions to add the dream-cheeky-led gem to the gemfile I ran bundle and found this error:
/Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:456:in `try_do’: The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp’
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:1067:in `block in have_header’
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for’
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone’
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:321:in `open’
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone’
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:321:in `open’
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:347:in `postpone’
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for’
from /Users/rioncarter/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/mkmf.rb:1066:in `have_header’
from extconf.rb:16:in `<main>’
extconf failed, exit code 1
Gem files will remain installed in /Users/rioncarter/.rvm/gems/ruby-2.1.4/gems/ffi-1.9.10 for inspection.
Results logged to /Users/rioncarter/.rvm/gems/ruby-2.1.4/extensions/x86_64-darwin-14/2.1.0-static/ffi-1.9.10/gem_make.out
An error occurred while installing ffi (1.9.10), and Bundler cannot continue.
Make sure that `gem install ffi -v ‘1.9.10’` succeeds before bundling.
I was able to find the specific mkmf.log file by running this search command from my user directory:
find ~/.rvm -name mkmf.log
I found this file:
/Users/username/.rvm/gems/ruby-2.1.4/extensions/x86_64-darwin-14/2.1.0-static/ffi-1.9.10/mkmf.log
Which had this information in it:
Agreeing to the Xcode/iOS license requires admin privileges, please
re-run as root via sudo.
Apparently the solution is to open XCode and accept the license agreement, then try running bundle again.
Before the update, people missing ruby.h needed to install commandline tools; I see it still at
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
But the fpm I installed with ‘gem install fpm’ now fails to run, complaining
-bash: /usr/local/bin/fpm: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
Sweet. Reinstalling fpm fails; the first problem seems to be ffi. ‘sudo gem install ffi’ fails with:
Building native extensions. This could take a while…
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.10.0/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190115-16637-wd53jk.rb extconf.rb
mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h
The commandline tools are definitely installed; ‘xcode-select —install’ says
xcode-select: error: command line tools are already installed, use «Software Update» to install updates
and no updates are available (except itunes).
I guess I’ll try installing xcode 9.2 and its commandline tools (I’ve been using 8.0 and 8.2) and hope that magically brings back a working ruby.h…
This is on all four of my Mac OS 10.12 systems (macbook pro’s and a mac mini).
I am getting the same error over and over again and I do not know why. I tried several ways to fix it, but nothing works.
Code Block sudo gem install cocoapodsBuilding native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20201202-2686-t7m7nb.rb extconf.rb checking for ffi.h... * 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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME) --with-ffi_c-dir --without-ffi_c-dir --with-ffi_c-include --without-ffi_c-include=${ffi_c-dir}/include --with-ffi_c-lib --without-ffi_c-lib=${ffi_c-dir}/lib --enable-system-libffi --disable-system-libffi --with-libffi-config --without-libffi-config --with-pkg-config --without-pkg-config /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header' from extconf.rb:10:in `system_libffi_usable?' from extconf.rb:42:in `<main>' To see why this extension failed to compile, please check the mkmf.log which can be found here: /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.13.1/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1 for inspection. Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.13.1/gem_make.out
Something might be wrong with Ruby, but I could not figure out what I should do to fix it.
Accepted Reply
Depending on some aspects this might work for you, if you don’t mind using the «SUDO» command:
sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
Latest CocoaPods 1.10.0 won’t work.
Replies
I also had this exact same error when trying to install cocoapods on a new machine today. Not sure why? Any help would be awesome
Bump, exact same issue. MacOS 11.0, Ruby 2.6.0. Can’t find any fix anywhere.
Greetings!
Solution :-
1) Install homebrew via terminal.
2) After homebrew is successfully installed, type in the terminal ‘$ brew install cocoapods’
Done.
Hi,
this works for me.
sudo xcode-select —switch /Applications/Xcode-beta.app/Contents/Developer
explain solution
sudo xcode-select —switch <path to xcode>/Contents/Developer
=D
Depending on some aspects this might work for you, if you don’t mind using the «SUDO» command:
sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
Latest CocoaPods 1.10.0 won’t work.
Thank you all ! With sudo gem install cocoapods it worked!
Same problem — XCode 12.3 on Mac OS 10.15.6.
Tried the CocoaPod mac app from the CocoaPods about page, which did have an option to install the command line tool, but it was version 1.1.x for some reason….
Brew install did the trick, and installed 1.10.0.
same issuse and i tried «brew install cocoapod «but it is intsalling version 1.5.2 and for my project to run properly it required version 1.9.0 and above
i even tried «sudo gem intsall cocoapods» and also tried modifying .bash_profile file method, none of them worked.. help me
am having the same problem , using: brew install cocoapod , would install version 1.5 and I need version 1.10
even when I tried brew it installed version 1.5?????
every time I upgrade , it gives me same error msg:
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-21/2.6.0/ffi-1.15.4/mkmf.log
extconf failed, exit code 1
I solved this problem with using brew
You need to:
- install LATEST version of brew (https://treehouse.github.io/installation-guides/mac/homebrew)
- then use «brew uninstall cocoapods»
- install the latest version of cocoapods using «brew install cocoapods» (You must verify installed version with github version https://github.com/CocoaPods/CocoaPods/releases/tag/1.11.2, they must match)
- overwrite link to cocoapods with «brew link —overwrite cocoapods»
- check the version of cocoapods «pod —version»
- done, You have the latest version of cocoapods installed
Good that you showed the solution. I’ve been sitting on this problem for a long time and nothing helps. Your solution is good thanks
[!] Xcode — develop for iOS and macOS
✗ CocoaPods installed but not working.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with
is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see
https://guides.cocoapods.org/using/getting-started.html#installation for
instructions.
try installing cocoa pods using brew
$ brew install cocoapods
after it finishes downloading
$ pod —version
if it shows the version then cocoapods is installed
Got the DevKit installed and re-ran the ffi install….got this as an output:
C:Documents and Settings******>gem install ffi
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... yes
checking for ruby_thread_has_gvl_p()... yes
checking for ruby_native_thread_p()... yes
checking for rb_thread_call_with_gvl()... yes
creating extconf.h
creating Makefile
make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_ffi_c'" > ffi_c-i386-mingw32.def
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1
.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H="extcon
f.h" -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -
Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -Wno-declaration-a
fter-statement -o AbstractMemory.o -c AbstractMemory.c
In file included from AbstractMemory.c:28:0:
compat.h:65:20: warning: extra tokens at end of #ifndef directive
compat.h:69:24: warning: extra tokens at end of #ifndef directive
In file included from AbstractMemory.h:29:0,
from AbstractMemory.c:29:
Types.h:68:17: fatal error: ffi.h: No such file or directory
compilation terminated.
make: *** [AbstractMemory.o] Error 1
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.1
0 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.10/ext/ffi_c/gem_m
ake.out
_________________________________________________________________________________
Not sure how to deal with this issue. Kindly help.
16 Answers
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
Version 1.0.10 has issues compiling on windows.
You can use the 1.0.9
gem install ffi --version='1.0.9'
sudo apt-get install libffi-dev
This worked for me
Note that installing version 1.0.9 isn’t going to be enough if your bundler keeps trying to go out and grab the latest version. In your gemfile you’ll also want to put:
gem 'ffi', '1.0.9'
This should satisfy the dependency for whatever gem is asking for it and let you get up and running.
when the above steps are followed, it might results the following message.
$ bundle install
Fetching source index for https://rubygems.org/
You have requested:
ffi = 1.0.9
The bundle currently has ffi locked at 1.0.11.
Try running `bundle update ffi`
In that case, you can run the ‘bundle update ffi’ command and the error will be solved.
For me the fix was running in this order. I’m not sure what all was relevant, but it worked:
gem install ffi --version '1.0.9'
The above failed, but then I could successfully run:
gem install bundler
…and subsequently:
gem install ffi
…which got the latest version (1.6.0 at the time of writing this) and installed it successfully.
Helped me:
sudo apt install build-essential
Debian 9
Ruby 2.3.3
you need this,
apt-get install ruby2.2-dev
For me, this usually works
gem install ffi -- --disable-system-libffi
This worked for me
gem install ffi -- --disable-system-libffi
on Ubuntu 20.04 (WSL)
Put DevKit in front of your PATH, and install again from Windows command prompt.
I had to install automake
to get it working. Worked on both mac OSX as well as Ubuntu (CI machine).
On MacOS (Catalina), running brew install libtool
first solved the problem for me.
I am a Rubyist of many years. I cannot determine what’s missing to prevent FFI from installing.
Here is the error from the make.out
file (gotta love that name):
make[3]: *** [Makefile:1048: libffi_convenience.la] Error 1
make[3]: Leaving directory '/home/dw/.gem/ruby/2.4.0/gems/ffi-1.9.23/ext/ffi_c/libffi-x86_64-linux'
make[2]: *** [Makefile:1309: all-recursive] Error 1
make[2]: Leaving directory '/home/dw/.gem/ruby/2.4.0/gems/ffi-1.9.23/ext/ffi_c/libffi-x86_64-linux'
make[1]: *** [Makefile:617: all] Error 2
make[1]: Leaving directory '/home/dw/.gem/ruby/2.4.0/gems/ffi-1.9.23/ext/ffi_c/libffi-x86_64-linux'
make: *** [libffi.mk:9: "/home/dw/.gem/ruby/2.4.0/gems/ffi-1.9.23/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a] Error 2
make failed, exit code 2
I checked nixpkgs and saw libffi-3.2.1
and pure-ffi-0.14
were available. I installed both. I still getting the error.
asked Apr 28, 2018 at 12:26
3
The first option is to use bundix. It uses a global override file to inject system dependencies: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/ruby-modules/gem-config/default.nix
Most important gems should be found there including the ffi gem, that you are trying to install.
If you don’t want to/can use bundix, the alternative is a nix-shell that gives you the correct build environment.
For the ffi gem you can also borrow the code from nixpkgs’s gem-config:
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "env";
buildInputs = [
ffi pkgconfig
];
}
Then just run nix-shell
in the project. This step can be also automated using direnv’s nix support.
Installing ffi
via nix-env
does not work because it does not set the NIX_CFLAGS_COMPILE
and NIX_LDFLAGS
variable that is necessary for the ffi gem to find the correct header/libraries during compilation.
answered May 22, 2018 at 14:28
Mic92Mic92
2411 silver badge4 bronze badges
1