Homebrew-core: phantomjs fails to build on macOS 10.14 Mojave

Created on 25 Sep 2018  路  8Comments  路  Source: Homebrew/homebrew-core

Gist logs: https://gist.github.com/3ddea9363f70a1b837f1f2f1dd3c2a57

$ brew install phantomjs
==> Cloning https://github.com/ariya/phantomjs.git
Updating /Users/thomasfuchs/Library/Caches/Homebrew/phantomjs--git
==> Checking out tag 2.1.1
HEAD is now at d9cda3d Set version to "2.1.1"
HEAD is now at d9cda3d Set version to "2.1.1"
Entering 'src/qt/3rdparty'
Entering 'src/qt/qtbase'
Entering 'src/qt/qtwebkit'
/Users/thomasfuchs/Library/Caches/Homebrew/phantomjs--git/src/qt/3rdparty
/Users/thomasfuchs/Library/Caches/Homebrew/phantomjs--git/src/qt/qtbase
/Users/thomasfuchs/Library/Caches/Homebrew/phantomjs--git/src/qt/qtwebkit
==> Downloading https://github.com/ariya/phantomjs/commit/6090f5457d2051ab374264efa18f655fa3e15e79.diff?full_index=1
Already downloaded: /Users/thomasfuchs/Library/Caches/Homebrew/downloads/f4d34107ef7864110decccad7d7e6b5acac1de266806b7bb6de30699a9371fe7--6090f5457d2051ab374264efa18f655fa3e15e79.diff
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/33dbb45f82/phantomjs/QTBUG-62266.diff
Already downloaded: /Users/thomasfuchs/Library/Caches/Homebrew/downloads/35e89d69bf2bcbfcac911e3eefd0896e0e9a140efeafb0446bb2a59043af0528--QTBUG-62266.diff
==> Patching
==> Applying 6090f5457d2051ab374264efa18f655fa3e15e79.diff
patching file build.py
Hunk #1 succeeded at 226 (offset -2 lines).
==> Applying QTBUG-62266.diff
patching file src/qt/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
patching file src/qt/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
==> ./build.py --confirm --jobs 4
Last 15 lines from /Users/thomasfuchs/Library/Logs/Homebrew/phantomjs/01.build.py:
make: *** [project.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning and 1 error generated.
make: *** [property.o] Error 1
1 warning and 1 error generated.
1 warning and 1 error generated.
make: *** [option.o] Error 1
make: *** [main.o] Error 1

ERROR: Failed to build PhantomJS! Configuration of Qt Base failed.
Executing in /private/tmp/phantomjs-20180924-50075-xfdr2d: git submodule init
Executing in /private/tmp/phantomjs-20180924-50075-xfdr2d: git submodule update --init
configuring Qt Base, please wait...
Using OpenSSL at /usr/local/opt/openssl
Executing in /private/tmp/phantomjs-20180924-50075-xfdr2d/src/qt/qtbase: /private/tmp/phantomjs-20180924-50075-xfdr2d/src/qt/qtbase/configure -static -opensource -confirm-license -prefix /private/tmp/phantomjs-20180924-50075-xfdr2d/src/qt/qtbase -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -nomake examples -nomake tools -nomake tests -no-qml-debug -no-dbus -no-opengl -no-audio-backend -D QT_NO_GRAPHICSVIEW -D QT_NO_GRAPHICSEFFECT -D QT_NO_STYLESHEET -D QT_NO_STYLE_CDE -D QT_NO_STYLE_CLEANLOOKS -D QT_NO_STYLE_MOTIF -D QT_NO_STYLE_PLASTIQUE -D QT_NO_PRINTPREVIEWDIALOG -qpa phantom -openssl -openssl-linked -no-openvg -no-eglfs -no-egl -no-glib -no-gtkstyle -no-cups -no-sm -no-xinerama -no-xkb -no-xcb -no-kms -no-linuxfb -no-directfb -no-mtdev -no-libudev -no-evdev -no-pulseaudio -no-alsa -no-feature-PRINTPREVIEWWIDGET -no-pkg-config -no-c++11 -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib -release
10.14 outdated

Most helpful comment

Agree on just moving to the statically compiled Cask. 2 PRs above to accomplish that.

All 8 comments

See #28817

how to solve the problem?

PhantomJS is not actively developed, so we may have to remove it.

The quickest solution for the time being is not to install PhantomJS via Homebrew. Download the binary from their website and drop it inside _/usr/local/bin_.

Probable the best solution for Homebrew at this point is to migrate it to Cask. A couple of pull requests doing that would be welcome!

how can i resolve it, I have same problem

Agree on just moving to the statically compiled Cask. 2 PRs above to accomplish that.

phantomjs was migrated to Cask.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dredmorbius picture dredmorbius  路  3Comments

ralexx picture ralexx  路  4Comments

xeoneux picture xeoneux  路  3Comments

Steffen911 picture Steffen911  路  3Comments

yuna9 picture yuna9  路  4Comments