Re: Failed to build gem native extension, what to do?

352 views
Skip to first unread message

Matt Horan

unread,
Jun 6, 2013, 7:46:19 PM6/6/13
to capybar...@googlegroups.com
How did you install Qt? The recommended way to install Qt on OS X is
either via the distributed packages from qt-project.org or via Homebrew.

On Wed, Jun 05, 2013 at 07:32:31AM -0700, Joe Seeley wrote:
> I'm getting the following dump trying to install the capybara-webkit gem
> 1.0.0 on Mac OSX 10.8.4
>
>
> > Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
> > extension.
> >
> > /usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
> > Project MESSAGE: qtAddLibrary: found framework QtGui in directory
> > /opt/local/Library/Frameworks
> > Project MESSAGE: qtAddLibrary: found framework QtCore in directory
> > /opt/local/Library/Frameworks
> > cd src/ && /opt/local/bin/qmake
> > /usr/local/rvm/gems/ruby-1.9.3-p194@eiacuc/gems/capybara-webkit-1.0.0/src/webkit_server.pro
> > -spec /opt/local/share/qt4/mkspecs/macx-g++ -o Makefile.webkit_server
> > Project MESSAGE: qtAddLibrary: found framework QtWebKit in directory
> > /opt/local/Library/Frameworks
> > Project MESSAGE: qtAddLibrary: found framework QtGui in directory
> > /opt/local/Library/Frameworks
> > Project MESSAGE: qtAddLibrary: found framework QtNetwork in directory
> > /opt/local/Library/Frameworks
> > Project MESSAGE: qtAddLibrary: found framework QtCore in directory
> > /opt/local/Library/Frameworks
> > Project MESSAGE: qtAddLibrary: found framework QtGui in directory
> > /opt/local/Library/Frameworks
> > Project MESSAGE: qtAddLibrary: found framework QtCore in directory
> > /opt/local/Library/Frameworks
> > cd src/ && make -f Makefile.webkit_server
> > /usr/bin/clang++ -pipe -O2 -arch x86_64 -Xarch_x86_64
> > -mmacosx-version-min=10.8 -Wall -W -DQT_NO_DEBUG -DQT_WEBKIT_LIB
> > -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
> > -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I.
> > -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers
> > -I/opt/local/include -F/opt/local/Library/Frameworks -F/opt/local/lib -x
> > c++-header -c stable.h -o webkit_server.gch/c++
> > /usr/bin/clang -pipe -O2 -arch x86_64 -Xarch_x86_64
> > -mmacosx-version-min=10.8 -Wall -W -DQT_NO_DEBUG -DQT_WEBKIT_LIB
> > -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
> > -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I.
> > -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers
> > -I/opt/local/include -F/opt/local/Library/Frameworks -F/opt/local/lib -x
> > objective-c++-header -c stable.h -o webkit_server.gch/objective-c++
> > /usr/bin/clang++ -c -include webkit_server -pipe -O2 -arch x86_64
> > -Xarch_x86_64 -mmacosx-version-min=10.8 -Wall -W -DQT_NO_DEBUG
> > -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
> > -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I.
> > -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers
> > -I/opt/local/include -F/opt/local/Library/Frameworks -F/opt/local/lib -o
> > Version.o Version.cpp
> > error: unable to read PCH file webkit_server.gch: 'Is a directory'
> > make[1]: *** [Version.o] Error 1
> > make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2
> > Command 'make' failed
> >
> > make
> > cd src/ && make -f Makefile.webkit_server
> > /usr/bin/clang++ -c -include webkit_server -pipe -O2 -arch x86_64
> > -Xarch_x86_64 -mmacosx-version-min=10.8 -Wall -W -DQT_NO_DEBUG
> > -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
> > -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I.
> > -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
> > -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers
> > -I/opt/local/include -F/opt/local/Library/Frameworks -F/opt/local/lib -o
> > Version.o Version.cpp
> > error: unable to read PCH file webkit_server.gch: 'Is a directory'
> > make[1]: *** [Version.o] Error 1
> > make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2
> >
> >
> > Gem files will remain installed in
> > /usr/local/rvm/gems/ruby-1.9.3-p194@eiacuc/gems/capybara-webkit-1.0.0 for
> > inspection.
> > Results logged to
> > /usr/local/rvm/gems/ruby-1.9.3-p194@eiacuc/gems/capybara-webkit-1.0.0/./gem_make.out
> >
> > An error occurred while installing capybara-webkit (1.0.0), and Bundler
> > cannot continue.
> > Make sure that `gem install capybara-webkit -v '1.0.0'` succeeds before
> > bundling.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "capybara-webkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to capybara-webk...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Matt Horan ma...@matthoran.com http://matthoran.com/

Joe Seeley

unread,
Jun 17, 2013, 9:01:06 AM6/17/13
to capybar...@googlegroups.com
I have since resolved this issue.

I had installed Qt using the distributed packages from qt-project.org; it turned out however there was an old version installed via macports that was still active; that was taking priority over the distributed package.  After I uninstalled the macports package everything was fine.
Reply all
Reply to author
Forward
0 new messages