I'm not too sure why, but I can't seem to install any gem that involves building native extensions. Can anyone suggest how to start debugging this issue? Here's the output I get with gem install debugger
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for rb_method_entry_t.called_id in method.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=/Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
/Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:1002:in `block in have_struct_member'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:1001:in `have_struct_member'
from extconf.rb:34:in `block in <main>'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p0/gems/debugger-ruby_core_source-1.2.3/lib/debugger/ruby_core_source.rb:21:in `call'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p0/gems/debugger-ruby_core_source-1.2.3/lib/debugger/ruby_core_source.rb:21:in `create_makefile_with_core'
from extconf.rb:87:in `<main>'
Gem files will remain installed in /Users/Chintan/.rvm/gems/ruby-1.9.3-p0/gems/debugger-1.6.0 for inspection.
Results logged to /Users/Chintan/.rvm/gems/ruby-1.9.3-p0/gems/debugger-1.6.0/ext/ruby_debug/gem_make.out
An error occurred while installing debugger (1.6.0), and Bundler cannot continue.
Also, I recently re-installed homebrew, so that might be the issue? And I've definitely got the XCode Developre Tools installed.
Here's the contents of mkmf.log:
○ cat /Users/Chintan/.rvm/gems/ruby-1.9.3-p0/gems/debugger-1.6.0/ext/ruby_debug/mkmf.log
"/usr/local/bin/gcc-4.2 -o conftest -I/Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/include/ruby-1.9.1/x86_64-darwin12.2.1 -I/Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/include/ruby-1.9.1/ruby/backward -I/Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/include/ruby-1.9.1 -I. -I/Users/Chintan/.rvm/src/ruby-1.9.3-p0 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -I/Users/Chintan/.rvm/usr/include -fno-common -pipe conftest.c -L. -L/Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib -L. -L/Users/Chintan/.rvm/usr/lib -lruby.1.9.1 -lpthread -ldl -lobjc "
/Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:317: warning: Insecure world writable dir /usr/local/heroku/bin in PATH, mode 040777
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
This worked for me:
gem update debugger-ruby_core_source
Related
This question already has answers here:
Installing RubyGems in Windows
(8 answers)
Closed 5 years ago.
I need just to execute one .rb file but it needs a lot of additional libraries. Some of them were installed but I have problems with http-cookie. It says:
$>gem install -http-proxy http://myproxy:8888 http-cookie
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing http-cookie:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20180126-8844-1titamy.rb extconf.rb
checking for -lstdc++... *** 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=C:/Ruby24-x64/bin/$(RUBY_BASE_NAME)
--with-static-libstdc++
--without-static-libstdc++
--with-stdc++lib
--without-stdc++lib
C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:542:in `try_link0'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:557:in `try_link'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:775:in `try_func'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:1002:in `block in have_library'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:945:in `block in checking_for'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:351:in `block (2 levels) in postpone'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:321:in `open'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:351:in `block in postpone'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:321:in `open'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:347:in `postpone'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:944:in `checking_for'
from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:997:in `have_library' from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/unf_ext-0.0.7.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/unf_ex
t-0.0.7.4 for inspection.
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0
/unf_ext-0.0.7.4/gem_make.out
mkmf.log:
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby24-x64/include/ruby-2.4.0/x64-mingw32 -IC:/Ruby24-x64/include/ruby-2.4.0/ruby/backward -IC:/Ruby24-x64/include/ruby-2.4.0 -I. -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -march=x86-64 -mtune=generic -O2 -pipe conftest.c -L. -LC:/Ruby24-x64/lib -L. -pipe -lx64-msvcrt-ruby240 -lgmp -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */
I used Rubygems v2.7.4.
Please help with any advice!
Thanks you in advance!
Install the ruby development-kit for windows
I followed this guide here on installing jekyll: labs.sverrirs.com/jekyll/5-wdm-gem.html
But I can't seem to install wdm. I installed Ruby-devkit, and ruby2.3 64bit. However, when I try to type in gem install wdm, it displays:
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/wdm-0.1.1/mkmf.
log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/wdm-0.
1.1 for inspection.
Results logged to C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0
/wdm-0.1.1/gem_make.out
The mkmf file says this:
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby23-x64/include/ruby-2.3.0/x64-mingw32 -IC:/Ruby23-x64/include/ruby-2.3.0/ruby/backward -IC:/Ruby23-x64/include/ruby-2.3.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23-x64/lib -L. -lx64-msvcrt-ruby230 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */
I have no idea what this means, what to do?
The gem file:
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/wdm-0.1.1/ext/wdm
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20161205-2832-xgt8yg.rb extconf.rb
checking for main() in -lkernel32... *** 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=C:/Ruby23-x64/bin/$(RUBY_BASE_NAME)
--with-kernel32lib
--without-kernel32lib
C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:765:in `try_func'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:997:in `block in have_library'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:992:in `have_library'
from extconf.rb:19:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/wdm-0.1.1/mkmf.log
extconf failed, exit code 1
Could you please paste the content of the mkmf.log file and gem_make.out?
I just tried to install the gem on a Win10 running Ruby 64bit and this does not seem to be an issue.
Edit: OK, the error states, that your devkit is not installed correctly. Did you follow the instructions on ruby's website and install the correct version for your ruby version?
I have a fresh install of fedora. I installed ruby, ruby-devel and gone through jekyll troubleshooting on their website but i still get the same error. I tried installing another gem which is Sass, just to make sure its not a ruby issue and it successfully installed.
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /usr/local/share/gems/gems/ffi-1.9.10/ext/ffi_c
/usr/bin/ruby -r ./siteconf20160620-3296-7ascyu.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}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/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}/lib64
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/usr/share/ruby/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/share/ruby/mkmf.rb:587:in `try_cpp'
from /usr/share/ruby/mkmf.rb:1060:in `block in have_header'
from /usr/share/ruby/mkmf.rb:911:in `block in checking_for'
from /usr/share/ruby/mkmf.rb:351:in `block (2 levels) in postpone'
from /usr/share/ruby/mkmf.rb:321:in `open'
from /usr/share/ruby/mkmf.rb:351:in `block in postpone'
from /usr/share/ruby/mkmf.rb:321:in `open'
from /usr/share/ruby/mkmf.rb:347:in `postpone'
from /usr/share/ruby/mkmf.rb:910:in `checking_for'
from /usr/share/ruby/mkmf.rb:1059:in `have_header'
from extconf.rb:16:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/lib64/gems/ruby/ffi-1.9.10/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/share/gems/gems/ffi-1.9.10 for inspection.
Results logged to /usr/local/lib64/gems/ruby/ffi-1.9.10/gem_make.out
info from mkmf.log:
package configuration for libffi is not found
"gcc -o conftest -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -mtune=generic -fPIC conftest.c -L. -L/usr/lib64 -L. -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector -rdynamic -Wl,-export-dynamic -m64 -lruby -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
PS: I have ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-linux]
and gem 2.6.4 and ruby-devel-2.2.5-48.fc23.x86_64
With CentOS 6 & 7 you can encounter the same issue, even if you have installed ruby && ruby-devel.
To solve this, install gcc & make.
I solved the issue by installing RVM. it automatically installed Ruby 2.3.0 and then i tried gem install jekyll, and it installed successfully.
When trying to install a ruby gem that uses native extensions my installs are failing.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
The log file gives me the following output
"gcc-mp-4.9 -o conftest -I/Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/x86_64-darwin13.4.0 -I/Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1/ruby/backward -I/Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/opt/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fno-common -pipe conftest.c -L. -L/Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib -L/opt/local/lib -L. -L/opt/local/lib -lruby.1.9.1 -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
It appears this is looking for a macports version of gcc instead of using the system gcc, but I don't even have any macports gcc installs on the system.
------ EDIT adding output from gem_make.out file ---------
/Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -r ./siteconf20160428-64282-8h2kw8.rb extconf.rb
checking for main() in -lcups... *** 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
--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=/Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/bin/ruby
--with-cupslib
--without-cupslib
/Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:845:in `block in have_library'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/mkmf.rb:840:in `have_library'
from extconf.rb:3:in `<main>'
extconf failed, exit code 1
It ended up that the gcc setting is sticky in the rbconfig.rb file for the rvm gemset.
I had to go to
~/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin13.4.0/rbconfig.rb
There I had to change
CONFIG["CC"] = "gcc-mp-4.9"
to
CONFIG["CC"] = "gcc"
and also change
CONFIG["configure_args"] = " '--prefix=/Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551' '--with-opt-dir=/opt/local' '--without-tcl' '--without-tk' '--disable-install-doc' '--enable-shared' 'CC=gcc-mp-4.9'"
to
CONFIG["configure_args"] = " '--prefix=/Users/bigtunacan/.rvm/rubies/ruby-1.9.3-p551' '--with-opt-dir=/opt/local' '--without-tcl' '--without-tk' '--disable-install-doc' '--enable-shared' 'CC=gcc'"
I'm trying to install ruby's msgpack on MacOSX Mountain Lion (10.8), using rvm and ruby 2.0-p195.
Here is the error:
~ » gem install msgpack atma#greyjewel
Building native extensions. This could take a while...
ERROR: Error installing msgpack:
ERROR: Failed to build gem native extension.
/Users/atma/.rvm/rubies/ruby-2.0.0-p195/bin/ruby extconf.rb
checking for ruby/st.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
--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=/Users/atma/.rvm/rubies/ruby-2.0.0-p195/bin/ruby
/Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:562:in `try_cpp'
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:1041:in `block in have_header'
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:892:in `block in checking_for'
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:337:in `block (2 levels) in postpone'
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:307:in `open'
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:337:in `block in postpone'
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:307:in `open'
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:333:in `postpone'
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:891:in `checking_for'
from /Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:1040:in `have_header'
from extconf.rb:3:in `<main>'
Gem files will remain installed in /Users/atma/.rvm/gems/ruby-2.0.0-p195/gems/msgpack-0.5.5 for inspection.
Results logged to /Users/atma/.rvm/gems/ruby-2.0.0-p195/gems/msgpack-0.5.5/ext/msgpack/gem_make.out
~ »
I tried specifying ARCHFLAGS=-arch x86_64 using env variables but nothing works for now. I'm out of ideas for now.
Best Regards,
Thanks
ps. Here is the mkfm.log:
"/opt/local/bin/gcc-apple-4.2 -o conftest -I/Users/atma/.rvm/rubies/ruby-2.0.0-p195/include/ruby-2.0.0/x86_64-darwin12.3.0 -I/Users/atma/.rvm/rubies/ruby-2.0.0-p195/include/ruby-2.0.0/ruby/backward -I/Users/atma/.rvm/rubies/ruby-2.0.0-p195/include/ruby-2.0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/opt/local/include -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -fno-common -pipe conftest.c -L. -L/Users/atma/.rvm/rubies/ruby-2.0.0-p195/lib -L/opt/local/lib -L. -fstack-protector -L/usr/local/lib -L/opt/local/lib -lruby.2.0.0 -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */