{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/809","labels_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/809/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/809/comments","events_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/809/events","html_url":"https://github.com/thoughtbot/capybara-webkit/issues/809","id":92914668,"number":809,"title":"Error compiling on Ubuntu 14.04 and 15.04","user":{"login":"EvanHahn","id":777712,"avatar_url":"https://avatars.githubusercontent.com/u/777712?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHahn","html_url":"https://github.com/EvanHahn","followers_url":"https://api.github.com/users/EvanHahn/followers","following_url":"https://api.github.com/users/EvanHahn/following{/other_user}","gists_url":"https://api.github.com/users/EvanHahn/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHahn/subscriptions","organizations_url":"https://api.github.com/users/EvanHahn/orgs","repos_url":"https://api.github.com/users/EvanHahn/repos","events_url":"https://api.github.com/users/EvanHahn/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHahn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-07-03T17:43:02Z","updated_at":"2015-08-01T18:00:42Z","closed_at":"2015-08-01T18:00:42Z","body":"In short, I have a completely fresh Ubuntu 14.04 Vagrant box. I cannot install `capybara-webkit` due to compiling issues.\r\n\r\n---\r\n\r\nI created a fresh Ubuntu 14.04 Vagrant box. Here's my Vagrantfile:\r\n\r\n```ruby\r\nVAGRANTFILE_API_VERSION = \"2\"\r\n\r\nVagrant.configure(VAGRANTFILE_API_VERSION) do |config|\r\n  config.vm.box = \"ubuntu/trusty64\"\r\nend\r\n```\r\n\r\nHere are all the commands I ran:\r\n\r\n```sh\r\n# Upgrade everything\r\nsudo apt-get update\r\nsudo apt-get upgrade -y\r\n\r\n# Install G++ and QT5\r\nsudo apt-get install g++ qt5-default libqt5webkit5-dev -y\r\n\r\n# Install and start RVM\r\ncommand curl -sSL https://rvm.io/mpapis.asc | gpg --import -\r\n\\curl -sSL https://get.rvm.io | bash -s stable\r\nsource ~/.rvm/scripts/rvm\r\n\r\n# Install Ruby 2.2\r\nrvm install 2.2\r\n\r\n# Check versions and stuff\r\nwhich ruby       # => /home/vagrant/.rvm/rubies/ruby-2.2.1/bin/ruby\r\nruby --version   # => ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]\r\ng++ --version    # => g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4\r\nqmake --version  # => QMake version 3.0 / Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu\r\n```\r\n\r\nThen, when I run this:\r\n\r\n```sh\r\ngem install capybara-webkit -v '0.14.2'\r\n```\r\n\r\nI get this nasty output:\r\n\r\n```\r\nFetching: mini_portile-0.6.2.gem (100%)\r\nSuccessfully installed mini_portile-0.6.2\r\nFetching: nokogiri-1.6.6.2.gem (100%)\r\nBuilding native extensions.  This could take a while...\r\nSuccessfully installed nokogiri-1.6.6.2\r\nFetching: xpath-2.0.0.gem (100%)\r\nSuccessfully installed xpath-2.0.0\r\nFetching: rack-1.6.4.gem (100%)\r\nSuccessfully installed rack-1.6.4\r\nFetching: rack-test-0.6.3.gem (100%)\r\nSuccessfully installed rack-test-0.6.3\r\nFetching: mime-types-2.6.1.gem (100%)\r\nSuccessfully installed mime-types-2.6.1\r\nFetching: capybara-2.4.4.gem (100%)\r\nSuccessfully installed capybara-2.4.4\r\nFetching: capybara-webkit-0.14.2.gem (100%)\r\nBuilding native extensions.  This could take a while...\r\nERROR:  Error installing capybara-webkit:\r\n        ERROR: Failed to build gem native extension.\r\n\r\n    /home/vagrant/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150703-21096-1s2wa4b.rb extconf.rb\r\ncd src/ && ( test -e Makefile.webkit_server || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2/src/webkit_server.pro -spec linux-g++ -o Makefile.webk\r\nit_server ) && make -f Makefile.webkit_server\r\nmake[1]: Entering directory `/home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2/src'\r\ng++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/inclu\r\nde/qt5/QtWebKit -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -o EnableLogging.o EnableLogging.cpp\r\ng++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/inclu\r\nde/qt5/QtWebKit -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -o Authenticate.o Authenticate.cpp\r\nIn file included from Authenticate.cpp:2:0:\r\nWebPage.h:9:24: error: invalid use of incomplete type ‘class QWebPage’\r\n class WebPage : public QWebPage {\r\n                        ^\r\nIn file included from /usr/include/qt5/QtWebKit/QtWebKit:5:0,\r\n                 from WebPage.h:3,\r\n                 from Authenticate.cpp:2:\r\n/usr/include/qt5/QtWebKit/qwebelement.h:157:18: error: forward declaration of ‘class QWebPage’\r\n     friend class QWebPage;\r\n                  ^\r\nIn file included from Authenticate.cpp:2:0:\r\nWebPage.h:25:29: error: ‘Extension’ has not been declared\r\n     virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);\r\n                             ^\r\nWebPage.h:25:56: error: ‘ExtensionOption’ does not name a type\r\n     virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);\r\n                                                        ^\r\nWebPage.h:25:80: error: ISO C++ forbids declaration of ‘option’ with no type [-fpermissive]\r\n     virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);\r\n                                                                                ^\r\nWebPage.h:25:83: error: ‘ExtensionReturn’ has not been declared\r\n     virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);\r\n                                                                                   ^\r\nWebPage.h:32:15: error: expected ‘;’ at end of member declaration\r\n     QWebPage *createWindow(WebWindowType type);\r\n               ^\r\nWebPage.h:32:42: error: expected ‘)’ before ‘type’\r\n     QWebPage *createWindow(WebWindowType type);\r\n                                          ^\r\nWebPage.h:63:36: error: ‘Extension’ has not been declared\r\n     virtual bool supportsExtension(Extension extension) const;\r\n                                    ^\r\nmake[1]: *** [Authenticate.o] Error 1\r\nmake[1]: Leaving directory `/home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2/src'\r\nmake: *** [sub-src-webkit_server-pro-make_first-ordered] Error 2\r\nCommand 'make' failed\r\n\r\nmake \"DESTDIR=\" clean\r\ncd src/ && ( test -e Makefile.webkit_server || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2/src/webkit_server.pro -spec linux-g++ -o Makefile.webk\r\nit_server ) && make -f Makefile.webkit_server clean\r\nmake[1]: Entering directory `/home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2/src'\r\nrm -f qrc_webkit_server.cpp\r\nrm -f moc_EnableLogging.cpp moc_Authenticate.cpp moc_SetConfirmAction.cpp moc_SetPromptAction.cpp moc_SetPromptText.cpp moc_ClearPromptText.cpp moc_JavascriptAlertMessages.cpp moc_JavascriptConfirmMessage\r\ns.cpp moc_JavascriptPromptMessages.cpp moc_IgnoreSslErrors.cpp moc_ResizeWindow.cpp moc_CurrentUrl.cpp moc_ConsoleMessages.cpp moc_WebPage.cpp moc_Server.cpp moc_Connection.cpp moc_Command.cpp moc_SocketC\r\nommand.cpp moc_Visit.cpp moc_Find.cpp moc_Reset.cpp moc_Node.cpp moc_JavascriptInvocation.cpp moc_Evaluate.cpp moc_Execute.cpp moc_FrameFocus.cpp moc_Response.cpp moc_NetworkAccessManager.cpp moc_NetworkC\r\nookieJar.cpp moc_Header.cpp moc_Render.cpp moc_Body.cpp moc_Status.cpp moc_Headers.cpp moc_UnsupportedContentHandler.cpp moc_SetCookie.cpp moc_ClearCookies.cpp moc_GetCookies.cpp moc_CommandParser.cpp moc\r\n_CommandFactory.cpp moc_SetProxy.cpp moc_NullCommand.cpp moc_PageLoadingCommand.cpp moc_SetSkipImageLoading.cpp moc_WebPageManager.cpp moc_WindowFocus.cpp moc_GetWindowHandles.cpp moc_GetWindowHandle.cpp\r\nmoc_GetTimeout.cpp moc_SetTimeout.cpp moc_TimeoutCommand.cpp moc_SetUrlBlacklist.cpp moc_NoOpReply.cpp moc_JsonSerializer.cpp\r\nrm -f EnableLogging.o Authenticate.o SetConfirmAction.o SetPromptAction.o SetPromptText.o ClearPromptText.o JavascriptAlertMessages.o JavascriptConfirmMessages.o JavascriptPromptMessages.o IgnoreSslErrors\r\n.o ResizeWindow.o CurrentUrl.o ConsoleMessages.o main.o WebPage.o Server.o Connection.o Command.o SocketCommand.o Visit.o Find.o Reset.o Node.o JavascriptInvocation.o Evaluate.o Execute.o FrameFocus.o Res\r\nponse.o NetworkAccessManager.o NetworkCookieJar.o Header.o Render.o body.o Status.o Headers.o UnsupportedContentHandler.o SetCookie.o ClearCookies.o GetCookies.o CommandParser.o CommandFactory.o SetProxy.\r\no NullCommand.o PageLoadingCommand.o SetTimeout.o GetTimeout.o SetSkipImageLoading.o WebPageManager.o WindowFocus.o GetWindowHandles.o GetWindowHandle.o TimeoutCommand.o SetUrlBlacklist.o NoOpReply.o Json\r\nSerializer.o qrc_webkit_server.o moc_EnableLogging.o moc_Authenticate.o moc_SetConfirmAction.o moc_SetPromptAction.o moc_SetPromptText.o moc_ClearPromptText.o moc_JavascriptAlertMessages.o moc_JavascriptC\r\nonfirmMessages.o moc_JavascriptPromptMessages.o moc_IgnoreSslErrors.o moc_ResizeWindow.o moc_CurrentUrl.o moc_ConsoleMessages.o moc_WebPage.o moc_Server.o moc_Connection.o moc_Command.o moc_SocketCommand.\r\no moc_Visit.o moc_Find.o moc_Reset.o moc_Node.o moc_JavascriptInvocation.o moc_Evaluate.o moc_Execute.o moc_FrameFocus.o moc_Response.o moc_NetworkAccessManager.o moc_NetworkCookieJar.o moc_Header.o moc_R\r\nender.o moc_Body.o moc_Status.o moc_Headers.o moc_UnsupportedContentHandler.o moc_SetCookie.o moc_ClearCookies.o moc_GetCookies.o moc_CommandParser.o moc_CommandFactory.o moc_SetProxy.o moc_NullCommand.o\r\nmoc_PageLoadingCommand.o moc_SetSkipImageLoading.o moc_WebPageManager.o moc_WindowFocus.o moc_GetWindowHandles.o moc_GetWindowHandle.o moc_GetTimeout.o moc_SetTimeout.o moc_TimeoutCommand.o moc_SetUrlBlac\r\nklist.o moc_NoOpReply.o moc_JsonSerializer.o\r\nrm -f *~ core *.core\r\nmake[1]: Leaving directory `/home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2/src'\r\n\r\nmake \"DESTDIR=\"\r\ncd src/ && ( test -e Makefile.webkit_server || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2/src/webkit_server.pro -spec linux-g++ -o Makefile.webk\r\nit_server ) && make -f Makefile.webkit_server\r\nmake[1]: Entering directory `/home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2/src'\r\ng++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/inclu\r\nde/qt5/QtWebKit -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -o EnableLogging.o EnableLogging.cpp\r\ng++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/inclu\r\nde/qt5/QtWebKit -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -o Authenticate.o Authenticate.cpp\r\nIn file included from Authenticate.cpp:2:0:\r\nWebPage.h:9:24: error: invalid use of incomplete type ‘class QWebPage’\r\n class WebPage : public QWebPage {\r\n                        ^\r\nIn file included from /usr/include/qt5/QtWebKit/QtWebKit:5:0,\r\n                 from WebPage.h:3,\r\n                 from Authenticate.cpp:2:\r\n/usr/include/qt5/QtWebKit/qwebelement.h:157:18: error: forward declaration of ‘class QWebPage’\r\n     friend class QWebPage;\r\n                  ^\r\nIn file included from Authenticate.cpp:2:0:\r\nWebPage.h:25:29: error: ‘Extension’ has not been declared\r\n     virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);\r\n                             ^\r\nWebPage.h:25:56: error: ‘ExtensionOption’ does not name a type\r\n     virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);\r\n                                                        ^\r\nWebPage.h:25:80: error: ISO C++ forbids declaration of ‘option’ with no type [-fpermissive]\r\n     virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);\r\n                                                                                ^\r\nWebPage.h:25:83: error: ‘ExtensionReturn’ has not been declared\r\n     virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);\r\n                                                                                   ^\r\nWebPage.h:32:15: error: expected ‘;’ at end of member declaration\r\n     QWebPage *createWindow(WebWindowType type);\r\n               ^\r\nWebPage.h:32:42: error: expected ‘)’ before ‘type’\r\n     QWebPage *createWindow(WebWindowType type);\r\n                                          ^\r\nWebPage.h:63:36: error: ‘Extension’ has not been declared\r\n     virtual bool supportsExtension(Extension extension) const;\r\n                                    ^\r\nmake[1]: *** [Authenticate.o] Error 1\r\nmake[1]: Leaving directory `/home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2/src'\r\nmake: *** [sub-src-webkit_server-pro-make_first-ordered] Error 2\r\n\r\nmake failed, exit code 2\r\n\r\nGem files will remain installed in /home/vagrant/.rvm/gems/ruby-2.2.1/gems/capybara-webkit-0.14.2 for inspection.\r\nResults logged to /home/vagrant/.rvm/gems/ruby-2.2.1/extensions/x86_64-linux/2.2.0/capybara-webkit-0.14.2/gem_make.out\r\n```\r\n\r\nI think I'm following the instructions exactly...am I missing something? It looks like there's something wrong with QT WebKit, or maybe something involving g++?"},"comment":{"url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/comments/126942548","html_url":"https://github.com/thoughtbot/capybara-webkit/issues/809#issuecomment-126942548","issue_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/809","id":126942548,"user":{"login":"EvanHahn","id":777712,"avatar_url":"https://avatars.githubusercontent.com/u/777712?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHahn","html_url":"https://github.com/EvanHahn","followers_url":"https://api.github.com/users/EvanHahn/followers","following_url":"https://api.github.com/users/EvanHahn/following{/other_user}","gists_url":"https://api.github.com/users/EvanHahn/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHahn/subscriptions","organizations_url":"https://api.github.com/users/EvanHahn/orgs","repos_url":"https://api.github.com/users/EvanHahn/repos","events_url":"https://api.github.com/users/EvanHahn/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHahn/received_events","type":"User","site_admin":false},"created_at":"2015-08-01T18:00:42Z","updated_at":"2015-08-01T18:00:42Z","body":"Sounds good."}}