Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with extconf.rb when running "bundle install" #320

Closed
shawnthroop opened this issue Dec 11, 2011 · 20 comments

Comments

@shawnthroop
Copy link

commented Dec 11, 2011

I'm trying to get Octopress running on my github and I've just installed ruby 1.9.2p290 with/via rbenv. I've been following the instructions from the docs and when I get to the part where I run bundle install, I get this error in Terminal:

Shawns-MacBook-Pro:octopress shawnthroop$ bundle install
Fetching source index for http://rubygems.org/
Using rake (0.9.2) 
Using RedCloth (4.2.8) 
Using posix-spawn (0.3.6) 
Using albino (1.3.3) 
Using blankslate (2.1.2.4) 
Using chunky_png (1.2.1) 
Using fast-stemmer (1.0.0) 
Using classifier (1.3.3) 
Using fssm (0.2.7) 
Using sass (3.1.5) 
Using compass (0.11.5) 
Using directory_watcher (1.4.0) 
Using ffi (1.0.9) 
Using haml (3.1.2) 
Using kramdown (0.13.3) 
Using liquid (2.2.2) 
Using syntax (1.0.0) 
Using maruku (0.6.0) 
Using jekyll (0.11.0) 
Using rubypython (0.5.1) 
Using pygments.rb (0.1.3) 
Using rack (1.3.2) 
Installing rb-fsevent (0.4.3.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/shawnthroop/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb 
creating Makefile
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -mdynamic-no-pic -std=gnu99 -Os -pipe -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wuninitialized -Wunknown-pragmas -Wshadow -Wfour-char-constants -Wsign-compare -Wnewline-eof -Wconversion -Wshorten-64-to-32 -Wglobal-constructors -pedantic' /usr/bin/clang -isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -mdynamic-no-pic -std=gnu99 -dead_strip -framework CoreServices -o '/Users/shawnthroop/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rb-fsevent-0.4.3.1/bin/fsevent_watch' fsevent/fsevent_watch.c
fsevent/fsevent_watch.c:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
extconf.rb:59:in `<main>': Compilation of fsevent_watch failed (see README) (RuntimeError)


Gem files will remain installed in /Users/shawnthroop/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rb-fsevent-0.4.3.1 for inspection.
Results logged to /Users/shawnthroop/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rb-fsevent-0.4.3.1/ext/gem_make.out
An error occured while installing rb-fsevent (0.4.3.1), and Bundler cannot continue.
Make sure that `gem install rb-fsevent -v '0.4.3.1'` succeeds before bundling.

I've gotten this far, one command away from the install. Any suggestions?

@imathis

This comment has been minimized.

Copy link
Owner

commented Dec 11, 2011

Xcode doesn't ship with GCC 4.2 anymore and if this is a clean install (not an upgrade from Snow Leopard) you may need to install GCC-10.7-v2 if you haven't already. The source is hosted on Github here and you can download it here

@shawnthroop

This comment has been minimized.

Copy link
Author

commented Dec 11, 2011

I am working from a fresh install. I have installed GCC-10.7-v2 earlier because I had trouble compiling. I thought maybe I messed it up earlier and this was just breadcrumbs to an earlier mistake. I started from scratch and still came up with the same error.

Is installing Xcode a suitable plan of action? Any other suggestions?

@imathis

This comment has been minimized.

Copy link
Owner

commented Dec 12, 2011

I've not tried this without Xcode. It may be required for some libraries on the Mac. I honestly don't know, but if you don't have it yet, it's probably a good idea to install it.

@shawnthroop

This comment has been minimized.

Copy link
Author

commented Dec 12, 2011

started a new repository, redid everything again, installed Xcode, used RVM instead of rbenv and it worked. Being new to this I'm not sure what solved the problem.

Thanks for the advice though, much appreciated.

@DCarper

This comment has been minimized.

Copy link

commented Dec 21, 2011

I'm getting this now too. Think it's more of an rb-fsevent problem than an Octopress problem though.

thibaudgg/rb-fsevent#20

@strand

This comment has been minimized.

Copy link

commented Mar 7, 2012

If you follow @DCarper's link @simonszu links to another page where @clippit contributes the command: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ which does the trick.

@rkJun

This comment has been minimized.

Copy link

commented Mar 12, 2012

Wow, Thank you, @strand, it works!

@mattgraham

This comment has been minimized.

Copy link

commented Mar 23, 2012

Totally saved a lot of frustrating searching. Thanks.

@ghost

This comment has been minimized.

Copy link

commented Apr 7, 2012

Thanks a lot @strand. Works for me

@stevehill1981

This comment has been minimized.

Copy link

commented Apr 11, 2012

Also works for me. Thanks!

@kristofer

This comment has been minimized.

Copy link

commented Apr 11, 2012

what the hell does that magic incantation actually do? (worked for me)

@stevehill1981

This comment has been minimized.

Copy link

commented Apr 11, 2012

As far as I've been able to find out, it tells the Xcode toolset which
folder to get the tools from :)

On 11 April 2012 15:16, Kristofer
reply@reply.github.com
wrote:

what the hell does that magic incantation actually do? (worked for me)


Reply to this email directly or view it on GitHub:
#320 (comment)

@prads

This comment has been minimized.

Copy link

commented Apr 17, 2012

Thanks @strand ! It worked for me.

@Giiome

This comment has been minimized.

Copy link

commented Apr 19, 2012

works for me too ! ! !
Thanks ! !

@nickfloyd

This comment has been minimized.

Copy link

commented May 14, 2012

+1 for @strand !

@nzdravevski

This comment has been minimized.

Copy link

commented May 22, 2012

worked for me as well. thanks @strand

@victorico

This comment has been minimized.

Copy link

commented Jun 1, 2012

@strand you are a god! I actually encountered this issue in the "Advanced" section of Chapter 3 of the Rails Tutorial.

@beakr

This comment has been minimized.

Copy link

commented Jun 1, 2012

There was already an issue closed related to this problem: #575

@strand's solution is great!

@strand

This comment has been minimized.

Copy link

commented Jun 1, 2012

@bleed4glory I am but a mere mortal who has walked the path and read the documentation.

@thomasloh

This comment has been minimized.

Copy link

commented Jul 8, 2012

awesome works like a charm! thanks @strand !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.