Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Problem installing after upgrading to Macos 10.9 Mavericks #583

Closed
jorgemanrubia opened this issue Oct 31, 2013 · 21 comments
Closed

Problem installing after upgrading to Macos 10.9 Mavericks #583

jorgemanrubia opened this issue Oct 31, 2013 · 21 comments

Comments

@jorgemanrubia
Copy link

Hi,

I am obtaining the following error when compiling the native extensions. Installing via gem install capybara-webkit

I have updagraded from lion to Mavericks. Xcode is installed. QT is installed too (via binary packages and brew install: I obtain the same error).

Fetching: capybara-webkit-1.0.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing capybara-webkit:
    ERROR: Failed to build gem native extension.

        /Users/jorge/.rbenv/versions/1.9.3-p327/bin/ruby extconf.rb
cd src/ && /usr/bin/qmake /Users/jorge/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/capybara-webkit-1.0.0/src/webkit_server.pro -spec /usr/local/Qt4.8/mkspecs/macx-g++ -o Makefile.webkit_server
cd src/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server 
g++ -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -I. -F/Library/Frameworks -x c++-header -c stable.h -o webkit_server.gch/c++
gcc -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -I. -F/Library/Frameworks -x objective-c++-header -c stable.h -o webkit_server.gch/objective-c++
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:161,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                 from /usr/local/include/QtGui/qmacdefines_mac.h:113,
                 from /usr/local/include/QtGui/qwindowdefs.h:99,
                 from /Library/Frameworks/QtGui.framework/Versions/4/Headers/qapplication.h:46,
                 from /Library/Frameworks/QtGui.framework/Versions/4/Headers/QApplication:1,
                 from stable.h:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected `}' before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected unqualified-id before ‘=’ token
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:17: error: expected declaration before ‘}’ token
make[1]: *** [webkit_server.gch/objective-c++] Error 1
make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2
Command 'make' failed

make
cd src/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server 
gcc -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -I. -F/Library/Frameworks -x objective-c++-header -c stable.h -o webkit_server.gch/objective-c++
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:161,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                 from /usr/local/include/QtGui/qmacdefines_mac.h:113,
                 from /usr/local/include/QtGui/qwindowdefs.h:99,
                 from /Library/Frameworks/QtGui.framework/Versions/4/Headers/qapplication.h:46,
                 from /Library/Frameworks/QtGui.framework/Versions/4/Headers/QApplication:1,
                 from stable.h:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected `}' before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected unqualified-id before ‘=’ token
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:17: error: expected declaration before ‘}’ token
make[1]: *** [webkit_server.gch/objective-c++] Error 1
make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2


Gem files will remain installed in /Users/jorge/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/capybara-webkit-1.0.0 for inspection.
Results logged to /Users/jorge/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/capybara-webkit-1.0.0/./gem_make.out

Any tip would be appreciated.

Thanks in advance

@jorgemanrubia
Copy link
Author

I could install it after temporary removing the lines it was complaining about from NSUserNotification.h (declaration and usage of NSUserNotificationActivationType). Maybe I need to update XCode/dev tools to the latest ones (I need to have installed 4.X for other reasons as of today). It looks as if it was requiring newer Object C compiler.

@scottwillson
Copy link

After a Mavericks upgrade and a reinstall of Homebrew, I needed to install QT with:
brew install -v https://raw.github.com/cliffrowley/homebrew/patched_qt/Library/Formula/qt.rb --HEAD

See Homebrew/legacy-homebrew#23793 for background.

Then, I could only install Capybara 0.14.2. The 1.0.0 version fails to compile with the above error.

@mweitzel
Copy link

The page
https://raw.github.com/cliffrowley/homebrew/patched_qt/Library/Formula/qt.rb
doesn't exist anymore, which tanks the command.

@scottwillson
Copy link

This should work now:
brew install qt --HEAD

See the Homebrew issue for all the details

@frandroid
Copy link

That was not sufficient for me. :(

@scottwillson
Copy link

Bummer … how far did you get? I'm no expert but I've fumbled with this some trying to get a repeatable build for Mavericks.

@mweitzel
Copy link

Thanks again @scottwillson, that did end up working for me. I was having serious and bazar problems yesterday, remote-compression timing out, stuff that was way beyond my control. But I tried again this morning and it ran through cleanly.

@frandroid where are you erring out? If you already have any form of qt downloaded (which brew will mention as you attempt to install) make sure you it.

@scottwillson
Copy link

In case anyone (like you, Misha!) arrive here. Latest Homebrew can install QT4 with just this now:
brew install qt

@misham
Copy link

misham commented Dec 9, 2013

Thanks @scottwillson Qt installs fine, having issues with capybara-webkit building. Tried 1.0.0 and 1.1.0. Output from bundle install

In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:161,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                 from /usr/local/Cellar/qt/4.8.5/include/QtGui/qmacdefines_mac.h:113,
                 from /usr/local/Cellar/qt/4.8.5/include/QtGui/qwindowdefs.h:99,
                 from /usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers/qapplication.h:46,
                 from /usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers/QApplication:1,
                 from stable.h:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected `}' before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected unqualified-id before ‘=’ token
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:17: error: expected declaration before ‘}’ token

Given the includes it seems to be an issue with Qt still. Will dig deeper into Qt later.

@scottwillson
Copy link

Shoot. Should have mentioned that we've had to stay on capybara-webkit 0.14.2 because 1.0+ doesn't compile out of the box. There may be an easy fix, but some of our tests also break on 1.0 so we haven't looked into it.

On Dec 9, 2013, at 2:48 PM, Misha Manulis notifications@github.com wrote:

Thanks @scottwillson Qt installs fine, having issues with capybara-webkit building. Tried 1.0.0 and 1.1.0. Output from bundle install

In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:161,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from /usr/local/Cellar/qt/4.8.5/include/QtGui/qmacdefines_mac.h:113,
from /usr/local/Cellar/qt/4.8.5/include/QtGui/qwindowdefs.h:99,
from /usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers/qapplication.h:46,
from /usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers/QApplication:1,
from stable.h:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected `}' before ‘attribute
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:16: error: expected unqualified-id before ‘=’ token
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:17: error: expected declaration before ‘}’ token
Given the includes it seems to be an issue with Qt still. Will dig deeper into Qt later.


Reply to this email directly or view it on GitHub.

@misham
Copy link

misham commented Dec 9, 2013

confirmed 0.14.2 works

@betelgeuse
Copy link
Contributor

One good idea in general in situations like these (unsure if it would have helped in this exact situation) is running brew doctor. For me it has been helpful whenever doing bigger upgrades in finding potential sources of problems.

@daviscabral
Copy link

I was able to install the last stable version after doing this:

$ brew uninstall apple-gcc42
$ brew uninstall qt
$ brew cleanup
$ brew install https://raw.github.com/Homebrew/homebrew/d94981b90a6a35a8b33a2758129bf231961425af/Library/Formula/qt.rb
$ gem install capybara-webkit

I hope it helps someone here.

@jferris
Copy link
Member

jferris commented Jan 7, 2014

@daviscabral if you just brew update and brew install qt, do you run into errors? I just updated to Mavericks myself and didn't need to install a particular version of the formula.

@jferris
Copy link
Member

jferris commented Jan 7, 2014

I'm going to close this issue as the instructions on the wiki are working for the latest version of capybara webkit.

@jferris jferris closed this as completed Jan 7, 2014
@daviscabral
Copy link

@jferris: I tried twice, but I'll try it again in the weekend with the latest qt now that I've removed the apple-gcc42 (that was the problem IMO). If it works I'll update it here.

@killpack
Copy link

@daviscabral: Thanks! Your solution did the trick for me.

@jormon
Copy link

jormon commented Jan 31, 2014

brew uninstall apple-gcc42
brew install https://raw.github.com/Homebrew/homebrew/d94981b90a6a35a8b33a2758129bf231961425af/Library/Formula/qt.rb

also seemed to be the magic for me.

@lfender6445
Copy link

On maverics, a simple xcode update worked for me.

@mariusbutuc
Copy link

Thanks @betelgeuse & @lfender6445: brew doctor pointed out that my Xcode (4.6.3) was quite outdated when compared to 5.1.1.

With an up to date Xcode, everything goes smooth.

@benjaminwood
Copy link

Thanks @jormon, that worked for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests