Error while building native extensions

Showing 1-11 of 11 messages
Error while building native extensions Ajedi32 10/29/12 6:20 AM
I'm trying to install the webkit driver for capybara on Windows, and I'm getting the following error:

$ gem install capybara-webkit-0.12.1.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit-0.12.1.gem:
ERROR: Failed to build gem native extension.
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
Gem files will remain installed in c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.12.1 for inspection.
Results logged to c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.12.1/./gem_make.out

And here's what's in the log file:

C:\>cat c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.12.1/./gem_make.out
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb

I've been trying for some time now to figure out what the problem is. The log file isn't very helpful, and the solutions to similar problems that I found were either specific to Unix or and didn't work for me. I'd appreciate any help you can give me.

Note: This question was cross-posted from StackOverflow. (http://stackoverflow.com/q/12936623/1157054)
Re: Error while building native extensions Joe Ferris 10/29/12 6:31 AM
Hey,

I need to look at the build process and see why errors aren't being written to the log. In the mean time, I'd try cloning the project and trying to build from there:

cd capybara-webkit
bundle install
bundle exec rake build

-Joe
Re: Error while building native extensions Ajedi32 10/29/12 7:25 AM
Okay, I tried it that way and it seems to have gotten a lot further than when I simply tried to install the gem with `gem install`. It still didn't work though, here's the error its giving me:

cd src/ && c:/Qt/4.8.3/bin/qmake.exe "c:/Documents and Settings/user/My Documents/Workspace/thoughtbot-capybara-webkit-7289a8e/src/webkit_server.pro" -spec c:/Qt/4.8.3/mkspecs/win32-g++ -o Makefile.webkit_server
'.' is not recognized as an internal or external command,
operable program or batch file.
'.' is not recognized as an internal or external command,
operable program or batch file.
capybara-webkit 0.12.0 built to pkg/capybara-webkit-0.12.0.gem
cd src/ && make -f Makefile.webkit_server 
make[1]: Entering directory `/c/Documents and Settings/user/My Documents/Workspace/thoughtbot-capybara-webkit-7289a8e/src'
make -f Makefile.webkit_server.Release
make[2]: Entering directory `/c/Documents and Settings/user/My Documents/Workspace/thoughtbot-capybara-webkit-7289a8e/src'
bin/rcc.exe -name webkit_server webkit_server.qrc -o release/qrc_webkit_server.cpp
make[2]: bin/rcc.exe: Command not found
make[2]: *** [release/qrc_webkit_server.cpp] Error 127
make[2]: Leaving directory `/c/Documents and Settings/user/My Documents/Workspace/thoughtbot-capybara-webkit-7289a8e/src'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/c/Documents and Settings/user/My Documents/Workspace/thoughtbot-capybara-webkit-7289a8e/src'
make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2
Command 'make' failed

Other potentially relevant information:

C:\>which make
C:\RailsInstaller\DevKit\bin\make.EXE
C:\>which rcc
C:\Qt\4.8.3\bin\rcc.EXE
C:\>which g++
C:\RailsInstaller\DevKit\mingw\bin\g++.EXE

Could the location of rcc be causing problems?
Re: Error while building native extensions Joe Ferris 10/29/12 7:32 AM
Is c:\Qt\4.8.3\bin on your PATH?
Re: Error while building native extensions Ajedi32 10/29/12 7:45 AM
Yes, it is:

C:\>echo %PATH%
C:\PROGRA~1\Serena\vm\win32\bin;C:\PROGRA~1\Serena\vm\common\bin\win32;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\TortoiseSVN\bin;C:\RailsInstaller\Ruby1.9.3\bin;C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\bin;C:\RailsInstaller\DevKit\bin;C:\RailsInstaller\Git\cmd;C:\Program Files\ansi153\x86;C:\bin;C:\RailsInstaller\DevKit\mingw\bin;C:\Qt\4.8.3\bin;C:\Program Files\Nodejs;C:\Documents and Settings\user\Desktop\emacs-23.4\bin;C:\Python27;C:\Python27\Scripts;C:\Program Files\GnuWin32\bin;C:\Program Files\Gow\bin;C:\Program Files\Notepad++;C:\Documents and Settings\user\Application Data\npm\ 
 
Also, it looks like there's more than one 'make' in my PATH:

C:\>which make --all

C:\RailsInstaller\DevKit\bin\make.EXE
C:\Qt\4.8.3\bin\make.BAT
C:\Program Files\Gow\bin\make.EXE
 
Should I be using the one in "C:\Qt\4.8.3\bin\" rather than the one in "C:\RailsInstaller\DevKit\bin\"? Or does that not matter?
Re: Error while building native extensions Joe Ferris 10/29/12 7:48 AM
I'm not sure; I'm not a Windows user. There are some Windows instructions in the Wiki (https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit), but it seems like you've followed them. You may get a better answer if you paste the full output from the build to Stackoverflow.
Re: Error while building native extensions Ajedi32 10/29/12 7:53 AM
Okay, I'll give that a shot; thanks.
Re: Error while building native extensions Ajedi32 10/31/12 2:17 PM
Update: This seems to be a problem with the current version of QT. A workaround has been posted on my StackOverflow question:
Re: Error while building native extensions Joe Ferris 10/31/12 2:21 PM
Thanks. Do you mind updating the Wiki?
Re: Error while building native extensions Ajedi32 11/2/12 6:33 AM
Sure. I'll investigate this a bit further and update the wiki once I'm sure of what's causing it. If the problem is specific to QT version 4.8.3 it would probably be better to just note that on the wiki instead of posting a complicated work-around.
Re: Error while building native extensions Igor Poltorak 11/6/12 6:41 AM
I have the same problem. But  I use QT 4.7.4 and Windiws 7 x64. I'd like yo use capybara-webkit for my hedless test.
After i do bundle install - it said me that all correctly install. After bundle exec rake build it show me this message "Command 'qmake -spec win32-g++' not available". Do you have some sollution?

понедельник, 29 октября 2012 г., 15:20:55 UTC+2 пользователь Ajedi32 написал: