{"id":7367,"date":"2014-06-07T02:36:47","date_gmt":"2014-06-07T02:36:47","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/cant-install-ffi-1-9-0-via-rvm-bundle-install-osx-10-8-4-collection-of-common-programming-errors\/"},"modified":"2014-06-07T02:36:47","modified_gmt":"2014-06-07T02:36:47","slug":"cant-install-ffi-1-9-0-via-rvm-bundle-install-osx-10-8-4-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/cant-install-ffi-1-9-0-via-rvm-bundle-install-osx-10-8-4-collection-of-common-programming-errors\/","title":{"rendered":"Can&#39;t install ffi 1.9.0 via rvm bundle install &#8211; OSX 10.8.4-Collection of common programming errors"},"content":{"rendered":"<p>Using OSX 10.8.4 on Macbook Pro with homebrew, xcode (with command line tools) and libffi.<\/p>\n<p>I have installed rvm and ruby-1.9.3-p448 and have a gemset called omega.ecoop. There is a gemfile which lists gems that are required for this project. However, I can&#8217;t get them installed, after running bundle check:<\/p>\n<pre><code>Bundler can't satisfy your Gemfile's dependencies.\n<\/code><\/pre>\n<p>This is correct as they are not installed. So I use:<\/p>\n<pre><code>bundle install\n<\/code><\/pre>\n<p>which produces the following:<\/p>\n<pre><code>Sams-MacBook-Pro:ecoop Sam$ bundle install\nFetching gem metadata from https:\/\/rubygems.org\/..........\nFetching gem metadata from https:\/\/rubygems.org\/..\nResolving dependencies...\nUsing addressable (2.3.5) \nUsing chunky_png (1.2.8) \nUsing fssm (0.2.10) \nUsing sass (3.2.10) \nUsing compass (0.12.2) \nUsing breakpoint (2.0.6) \nUsing coderay (1.0.9) \nUsing compass-blend-modes (0.0.2) \nUsing color-schemer (0.2.5) \nUsing compass-normalize (1.4.3) \nUsing compass-rgbapng (0.2.1) \nUsing compass-validator (3.0.1) \nUsing css_parser (1.3.5) \nUsing eventmachine (1.0.3) \nUsing http_parser.rb (0.5.3) \nUsing em-websocket (0.5.0) \nInstalling ffi (1.9.0) \n<\/code><\/pre>\n<p>All going well, until:<\/p>\n<pre><code>Installing ffi (1.9.0) \nGem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.\n\n    \/Users\/Sam\/.rvm\/rubies\/ruby-1.9.3-p448\/bin\/ruby extconf.rb \nchecking for ffi.h... no\nchecking for ffi.h in \/usr\/local\/include,\/usr\/include\/ffi... no\nchecking for rb_thread_blocking_region()... yes\nchecking for rb_thread_call_with_gvl()... yes\nchecking for rb_thread_call_without_gvl()... yes\nchecking for ffi_prep_cif_var()... no\ncreating extconf.h\ncreating Makefile\n\nmake\nmkdir -p \"\/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.9.0\/ext\/ffi_c\"\/libffi-x86_64; (if [ ! -f \"\/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.9.0\/ext\/ffi_c\"\/libffi-x86_64\/Makefile ]; then echo \"Configuring libffi for x86_64\"; cd \"\/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.9.0\/ext\/ffi_c\"\/libffi-x86_64 &amp;&amp; env CC=\" gcc-4.6\" CFLAGS=\"-arch x86_64 \" LDFLAGS=\"-arch x86_64\" \"\/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.9.0\/ext\/ffi_c\/libffi\"\/configure --disable-static --with-pic=yes --disable-dependency-tracking --host=x86_64-apple-darwin &gt; \/dev\/null; fi); env MACOSX_DEPLOYMENT_TARGET=10.4 make -C \"\/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.9.0\/ext\/ffi_c\"\/libffi-x86_64\nConfiguring libffi for x86_64\nconfigure: WARNING: if you wanted to set the --build type, don't use --host.\n    If a cross compiler is detected then cross compile mode will be used\nconfigure: error: in `\/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.9.0\/ext\/ffi_c\/libffi-x86_64':\nconfigure: error: C compiler cannot create executables\nSee `config.log' for more details\nmake[1]: *** No targets specified and no makefile found.  Stop.\nmake: *** [\"\/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.9.0\/ext\/ffi_c\"\/libffi-x86_64\/.libs\/libffi_convenience.a] Error 2\n\n\nGem files will remain installed in \/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.9.0 for inspection.\nResults logged to \/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.9.0\/ext\/ffi_c\/gem_make.out\n\nAn error occurred while installing ffi (1.9.0), and Bundler cannot continue.\nMake sure that `gem install ffi -v '1.9.0'` succeeds before bundling.\n<\/code><\/pre>\n<p>This command does not work either (gem install ffi -v &#8216;1.9.0&#8217;), I get the same error. I tried:<\/p>\n<pre><code>sudo ln -s \/usr\/bin\/gcc \/usr\/bin\/gcc-4.2\n<\/code><\/pre>\n<p>I have read:<\/p>\n<p>can&#8217;t setup ruby environment &#8211; installing fii gem error<\/p>\n<p>Bundle update fails on ffi<\/p>\n<p>Bundle update fails on ffi<\/p>\n<p>Error installing ffi<\/p>\n<p>gem install ffi -v &#8216;1.1.5&#8217; osx 10.8<\/p>\n<p>Still no luck though. I followed this guide to set up RVM:<\/p>\n<p>http:\/\/portertech.ca\/2010\/03\/26\/homebrew&#8211;rvm&#8211;awesome\/<\/p>\n<p>If this helps, ffi-1.0.11 installs without hitch, fff-1.9.0 will not install (http:\/\/rubygems.org\/gems\/ffi\/versions).<\/p>\n<pre><code>\/Users\/Sam\/.rvm\/gems\/ruby-1.9.3-p448@omega.ecoop\/gems\/ffi-1.0.11 (no problem)\n<\/code><\/pre>\n<p>I wanted to use command line only (rather than jewelrybox GUI) to learn some new skills along the way but fairly stuck here. Any help would be appreciated, thanks.<\/p>\n<p><strong>EDIT<\/strong><\/p>\n<p>So I tried a different approach, I thought maybe it was the version of ruby that was not compatible:<\/p>\n<pre><code>rvm install 2.0.0\n<\/code><\/pre>\n<p>then create gemset this time using ruby 2.0.0<\/p>\n<pre><code>rvm use 2.0.0@omega.ecoop --create\n<\/code><\/pre>\n<p>Check it&#8217;s there and selected as the current gemset (ready to install some gems)<\/p>\n<pre><code>rvm gemset list\n\ngemsets for ruby-2.0.0-p247 (found in \/Users\/Sam\/.rvm\/gems\/ruby-2.0.0-p247)\n(default)\nglobal\n=&gt; omega.ecoop\n<\/code><\/pre>\n<p>Yep all good. Try and install<\/p>\n<pre><code>bundle install\n\nSams-MacBook-Pro:ecoop Sam$ bundle install\nFetching gem metadata from https:\/\/rubygems.org\/..........\nFetching gem metadata from https:\/\/rubygems.org\/..\nResolving dependencies...\nInstalling addressable (2.3.5) \nInstalling chunky_png (1.2.8) \nInstalling fssm (0.2.10) \nInstalling sass (3.2.10) \nInstalling compass (0.12.2) \nInstalling breakpoint (2.0.6) \nInstalling coderay (1.0.9) \nInstalling compass-blend-modes (0.0.2) \nInstalling color-schemer (0.2.5) \nInstalling compass-normalize (1.4.3) \nInstalling compass-rgbapng (0.2.1) \nInstalling compass-validator (3.0.1) \nInstalling css_parser (1.3.5) \nInstalling eventmachine (1.0.3) \nInstalling http_parser.rb (0.5.3) \nInstalling em-websocket (0.5.0) \nInstalling ffi (1.9.0)\nInstalling formatador (0.2.4) \nInstalling rb-fsevent (0.9.3) \nInstalling rb-inotify (0.9.1) \nInstalling rb-kqueue (0.2.0) \nInstalling listen (1.3.0) \nInstalling lumberjack (1.0.4) \nInstalling method_source (0.8.2) \nInstalling slop (3.4.6) \nInstalling pry (0.9.12.2) \nInstalling thor (0.18.1) \nInstalling guard (1.8.2) \nInstalling guard-compass (0.0.8) \nInstalling multi_json (1.7.9) \nInstalling guard-livereload (1.4.0) \nInstalling guard-shell (0.5.1) \nInstalling oily_png (1.1.0) \nInstalling rb-fchange (0.0.6) \nInstalling sass-globbing (1.1.0) \nInstalling sassy-strings (1.0.0) \nInstalling singularitygs (1.1.2) \nInstalling susy (1.0.9) \nInstalling toolkit (1.3.7) \nInstalling yajl-ruby (1.1.0) \nUsing bundler (1.3.5) \nYour bundle is complete!\n<\/code><\/pre>\n<p>No problems with &#8216;Installing ffi (1.9.0)&#8217; this time. Then I removed ruby 1.9.3 as I only use it for compass\/sass\/susy at the moment and if 2.0.0 works, so be it.<\/p>\n<pre><code>Sams-MacBook-Pro:~ Sam$ ruby -v\nruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]\nSams-MacBook-Pro:~ Sam$ cd drupal\/ecoop\/sites\/default\/themes\/ecoop\/\nruby-1.9.3-p448 is not installed.\n\nTo install do: 'rvm install ruby-1.9.3-p448' &gt; Compass is watching for changes. Press Ctrl-C to Stop.\n<\/code><\/pre>\n<p>Works fine for my project now. Not sure of any consequences of using a newer version of ruby but lost enough time already, need to do some designing. Obviously this wont help someone who needs 1.9.3 so that original query of why ffi wouldn&#8217;t install is yet to be addressed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using OSX 10.8.4 on Macbook Pro with homebrew, xcode (with command line tools) and libffi. I have installed rvm and ruby-1.9.3-p448 and have a gemset called omega.ecoop. There is a gemfile which lists gems that are required for this project. However, I can&#8217;t get them installed, after running bundle check: Bundler can&#8217;t satisfy your Gemfile&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7367","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7367"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7367\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}