Failed to build gem native extension #77

Closed
ebrett opened this Issue Jun 10, 2011 · 12 comments

Projects

None yet
@ebrett

Having an issue with installing this gem in a new Rails instance (3.0.7) with the error below. Mac OSX 10.6.7 - Getting the same error using ree. Any suggestions?

[11:47][brett@quislet:~/Work/capybara-webkit]$ bundle
Fetching source index for http://rubygems.org/
Installing rake (0.9.2)
Installing abstract (1.0.0)
Installing activesupport (3.0.7)
Installing builder (2.1.2)
Installing i18n (0.5.0)
Installing activemodel (3.0.7)
Installing erubis (2.6.6)
Installing rack (1.2.3)
Installing rack-mount (0.6.14)
Installing rack-test (0.5.7)
Installing tzinfo (0.3.27)
Installing actionpack (3.0.7)
Installing mime-types (1.16)
Installing polyglot (0.3.1)
Installing treetop (1.4.9)
Installing mail (2.2.19)
Installing actionmailer (3.0.7)
Installing arel (2.0.10)
Installing activerecord (3.0.7)
Installing activeresource (3.0.7)
Using bundler (1.0.12)
Installing celerity (0.8.9)
Installing culerity (0.2.15)
Installing nokogiri (1.4.4) with native extensions
Installing ffi (1.0.9) with native extensions
Installing childprocess (0.1.9)
Installing json_pure (1.5.1)
Installing rubyzip (0.9.4)
Installing selenium-webdriver (0.2.1)
Installing xpath (0.1.4)
Installing capybara (0.4.1.2)
Installing capybara-webkit (0.4.1) with native extensions /Users/brett/Developer/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/Users/brett/Developer/.rvm/rubies/ruby-1.8.7-p248/bin/ruby extconf.rb
/Users/brett/Developer/bin/qmake
cd src/ && /Users/brett/Developer/bin/qmake /Users/brett/Work/capybara-webkit/gems/gems/capybara-webkit-0.4.1/src/webkit_server.pro -spec /Users/brett/Developer/Cellar/qt/4.7.2/mkspecs/macx-g++ -o Makefile.webkit_server
/bin/sh: line 0: cd: src/: No such file or directory
make: *** [sub-src-webkit_server-pro-qmake_all] Error 1

make
cd src/ && /Users/brett/Developer/bin/qmake /Users/brett/Work/capybara-webkit/gems/gems/capybara-webkit-0.4.1/src/webkit_server.pro -spec /Users/brett/Developer/Cellar/qt/4.7.2/mkspecs/macx-g++ -o Makefile.webkit_server
/bin/sh: line 0: cd: src/: No such file or directory
make: *** [src/Makefile.webkit_server] Error 1

Gem files will remain installed in /Users/brett/Work/capybara-webkit/gems/gems/capybara-webkit-0.4.1 for inspection.
Results logged to /Users/brett/Work/capybara-webkit/gems/gems/capybara-webkit-0.4.1/gem_make.out
from /Users/brett/Developer/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in each'
from /Users/brett/Developer/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in
build_extensions'
from /Users/brett/Developer/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in install'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/source.rb:96:in
install'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/installer.rb:55:in run'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in
each'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in each'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/installer.rb:44:in
run'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/installer.rb:8:in install'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/cli.rb:225:in
install'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/vendor/thor/task.rb:22:in send'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/vendor/thor/task.rb:22:in
run'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/vendor/thor/invocation.rb:118:in invoke_task'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/vendor/thor.rb:246:in
dispatch'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/lib/bundler/vendor/thor/base.rb:389:in start'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/gems/bundler-1.0.12/bin/bundle:13
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/bin/bundle:19:in
load'
from /Users/brett/Developer/.rvm/gems/ruby-1.8.7-p248/bin/bundle:19
[11:49][brett@quislet:~/Work/capybara-webkit]$

@leehambley

Any suggestions?

Do you in fact have the QT development headers installed, see the readme, or install with homebrew (not recommended)?

@ebrett

Thanks for the suggestion, I do have QT installed via homebrew. Three other developers on my team have a similar setup (i.e. using homebrew) and can build the extension, but I can uninstall and give that version a go.

@bsingr

same here..

Building native extensions.  This could take a while...
ERROR:  Error installing capybara-webkit:
    ERROR: Failed to build gem native extension.

/Users/dpree/.rvm/rubies/ruby-1.8.7-p330/bin/ruby extconf.rb
/usr/bin/qmake
cd src/ && /usr/bin/qmake /Users/dpree/.rvm/gems/ruby-1.8.7-p330/gems/capybara-webkit-0.5.0/src/webkit_server.pro -spec         /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server
/bin/sh: line 0: cd: src/: No such file or directory
make: *** [sub-src-webkit_server-pro-qmake_all] Error 1

make
cd src/ && /usr/bin/qmake /Users/dpree/.rvm/gems/ruby-1.8.7-p330/gems/capybara-webkit-0.5.0/src/webkit_server.pro -spec     /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server
/bin/sh: line 0: cd: src/: No such file or directory
make: *** [src/Makefile.webkit_server] Error 1


Gem files will remain installed in /Users/dpree/.rvm/gems/ruby-1.8.7-p330/gems/capybara-webkit-0.5.0 for inspection.
Results logged to /Users/dpree/.rvm/gems/ruby-1.8.7-p330/gems/capybara-webkit-0.5.0/gem_make.out
@rwilcox

See issue #56 (#56), which I believe is the same problem (and might have your solution)

@daveheitzman

Thanks for the help.

on ubuntu this worked for me:
sudo apt-get install libqtwebkit-dev

@DArrigoni

Had this same issue. 'libqtwebkit-dev' didn't exist and I had to install 'libqt4-dev'. Seems to work now.

@manur

Thanks @daveheitzman and @DArrigoni. libqt4-dev has what I needed on Ubuntu 11.10.

@halogenandtoast

Closing this. Please continue posting any build issues related to 0.11.0 and future releases.

@dankozlowski

Just to clarify for anyone still looking: QT recommends the following command for installing on Ubuntu systems:

sudo apt-get install libqt4-dev libqtwebkit-dev

@jferris
thoughtbot, inc. member
@mpautasso

Thanks @daveheitzman. libqt4-dev has what I needed on my Ubuntu.

@kchandan

Sorry if I am asking the same question.

I installed qt and qt-devel both on my centos system but still getting the same error

Installing capybara-webkit (0.11.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/ruby/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb 

sh: qmake: command not found

Gem files will remain installed in /home/ruby/.rvm/gems/ruby-1.9.2-p320/gems/capybara-webkit-0.11.0 for inspection.
Results logged to /home/ruby/.rvm/gems/ruby-1.9.2-p320/gems/capybara-webkit-0.11.0/./gem_make.out
An error occured while installing capybara-webkit (0.11.0), and Bundler cannot continue.
Make sure that gem install capybara-webkit -v '0.11.0' succeeds before bundling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment