Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

PhantomJS 1.9 does not build on OS X 10.10 (Yosemite) #12622

Closed
preston opened this issue Oct 2, 2014 · 12 comments
Closed

PhantomJS 1.9 does not build on OS X 10.10 (Yosemite) #12622

preston opened this issue Oct 2, 2014 · 12 comments

Comments

@preston
Copy link

preston commented Oct 2, 2014

brew install phantomjs
...on the current GM candidate 10.10 (OSX Yosemite) yields a big fat...

Already downloaded: /Library/Caches/Homebrew/phantomjs-1.9.7.zip
==> Downloading https://github.com/ariya/phantomjs/commit/fe6a96.diff
Already downloaded: /Library/Caches/Homebrew/phantomjs--patch-d3efd38e0f3f0da08530d0bf603ea72ebdf06b78.diff
==> Patching
patching file src/qt/src/gui/kernel/qt_cocoa_helpers_mac_p.h
==> ./build.sh --confirm --jobs 8 --qt-config -openssl-linked
g++ -headerpad_max_install_names -sectcreate __TEXT __info_plist Info.plist -arch x86_64 -Xarch_x86_64 -mmacosx-    version-min=10.5 -o ../bin/phantomjs MachIPC.o phantom.o callback.o webpage.o webserver.o main.o csconverter.o     utils.o networkaccessmanager.o cookiejar.o filesystem.o system.o env.o terminal.o encoding.o config.o childprocess    .o repl.o gif_err.o gifalloc.o egif_lib.o gif_hash.o quantize.o gifwriter.o mongoose.o linenoise.o utf8.o     qcommandline.o minidump_file_writer.o convert_UTF.o md5.o string_conversion.o crash_generation_client.o     exception_handler.o minidump_generator.o dynamic_images.o breakpad_nlist_64.o bootstrap_compat.o file_id.o     macho_id.o macho_utilities.o macho_walker.o string_utilities.o moc_phantom.o moc_callback.o moc_webpage.o     moc_webserver.o moc_networkaccessmanager.o moc_cookiejar.o moc_filesystem.o moc_system.o moc_env.o moc_config.o     moc_childprocess.o moc_repl.o moc_qcommandline.o qrc_phantomjs.o qrc_ghostdriver.o qrc_WebKit.o     qrc_InspectorBackendStub.o    -L/private/tmp/phantomjs-yQIdEu/phantomjs-1.9.7/src/qt/lib -L/private/tmp/phantomjs-    yQIdEu/phantomjs-1.9.7/src/qt/plugins/codecs -lqcncodecs -L/private/tmp/phantomjs-yQIdEu/phantomjs-1.9.    7/src/qt/lib -framework ApplicationServices -framework CoreFoundation -framework Security -lqjpcodecs -lqkrcodecs     -lqtwcodecs -lQtWebKit -framework Carbon -framework AppKit -framework SystemConfiguration -framework CoreServices     -lQtGui -lQtNetwork -lssl -lcrypto -lQtCore -lz -lm 
ld: library not found for -lQtWebKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../bin/phantomjs] Error 1
make: *** [sub-src-phantomjs-pro-make_default-ordered] Error 2    
@sikachu
Copy link

sikachu commented Oct 5, 2014

According to #10648 seems like the maintainer won't fix the compilation on Phantomjs 1.x on Yosemite. It seems like the only way for now is to grab prebuilt library and just put it somewhere in your PATH.

@preston
Copy link
Author

preston commented Oct 7, 2014

Wow, that sucks. 😦

@ariya
Copy link
Owner

ariya commented Oct 7, 2014

@preston I'm sorry this situation does not please you at all.

A workaround exists: download the binary from http://phantomjs.org/download.html and unpack it.

@ariya
Copy link
Owner

ariya commented Oct 8, 2014

Closing this as WONTFIX (see also #10648 (comment)):

PhantomJS 1.x will not build on Yosemite. I don't think we'll ever fix this (focusing on 2.x only for now).

@ariya ariya closed this as completed Oct 8, 2014
@ariya ariya changed the title Will not build on OSX Yosemite. :( PhantomJS 1.9 does not build on OS X 10.10 (Yosemite) Oct 19, 2014
@ariya
Copy link
Owner

ariya commented Oct 19, 2014

@ariya
Copy link
Owner

ariya commented Oct 19, 2014

Even after I adopted the fixes mentioned in the above upstream bugs, it still failed to compile:

In file included from dialogs/qcolordialog_mac.mm:42:
In file included from dialogs/qcolordialog_p.h:57:
In file included from ../../include/QtGui/private/qdialog_p.h:1:
In file included from ../../include/QtGui/private/../../../src/gui/dialogs/qdialog_p.h:56:
In file included from ../../include/QtGui/private/qwidget_p.h:1:
In file included from ../../include/QtGui/private/../../../src/gui/kernel/qwidget_p.h:56:
In file included from ../../include/QtGui/qwidget.h:1:
In file included from ../../include/QtGui/../../src/gui/kernel/qwidget.h:46:
In file included from ../../include/QtGui/qwindowdefs.h:1:
In file included from ../../include/QtGui/../../src/gui/kernel/qwindowdefs.h:99:
In file included from ../../include/QtGui/qmacdefines_mac.h:1:
In file included from ../../include/QtGui/../../src/gui/kernel/qmacdefines_mac.h:113:
In file included from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:7:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSRange.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:12:1: error: 'objc_returns_inner_pointer' attribute only applies to methods
@property (readonly) const char *objCType NS_RETURNS_INNER_POINTER;
^                                         ~~~~~~~~~~~~~~~~~~~~~~~~

This is using:

g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

@MikeMcQuaid I am curious to know if you found a similar issue (and fix) when building Qt 4 on Homebrew with Yosemite?

@MikeMcQuaid
Copy link
Contributor

@ariya
Copy link
Owner

ariya commented Oct 19, 2014

@MikeMcQuaid I saw that, it looks similar to https://qt.gitorious.org/qt/qt/commit/997d6261. I've tried to apply either and my setup still complained with the above error.

@ariya
Copy link
Owner

ariya commented Oct 23, 2014

This is fixed in 1.9 branch and will be part of the forthcoming 1.9.8 release (#12670).

@vassilevsky
Copy link
Contributor

Awesome!

It's so satisfying to unpin phantomjs in Homebrew and upgrade it now :D

@jkcable
Copy link

jkcable commented Feb 5, 2015

Where is the binary for 1.9.8 or how can I get it?

https://code.google.com/p/phantomjs/downloads/list only has 1.9.2.

This link doesn't have any links to previous binaries http://phantomjs.org/download.html.

@cykhoo
Copy link

cykhoo commented Mar 20, 2015

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

7 participants