Closed cartr closed 5 years ago
Thanks, how can I test this patch?
@pjessesco I usually test branches by cd-ing to Homebrew's copy of the repo and checking out the branch there. You can do that with the following commands:
$ cd /usr/local/Homebrew/Library/Taps/cartr/homebrew-qt4
$ git config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch
$ git checkout qt-mojave
$ brew install qt@4
(That git config line is needed because by default, Homebrew only fetches the master branch of a tap.)
Thanks. I'll try it as soon as possible, maybe few hours.
There are some typo in bottle download link.
qt4, pyqt4, pyside, and others for mojave. Otherwise it builds successfully.
@pjessesco Thanks for testing, and good catch on the bottle names! I've re-uploaded them with the correct names, so we should be good to go.
FYI : I found that Apple removed /usr/include
as you said, and I could restore the path using
installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
(it generates /usr/include
like High Sierra)
In Xcode 10/macOS Mojave, Apple moved some of the system header files around for whatever reason. The system
clang
is able to find the headers in the new locations, but it refuses to do so if yourMACOSX_DEPLOYMENT_TARGET
is lower than 10.9. It turns out that Qt was settingMACOSX_DEPLOYMENT_TARGET=10.4
, which meant thatclang
wouldn't find the C++ standard library headers, which caused the build to fail.This PR resolves this issue by patching Qt to set
MACOSX_DEPLOYMENT_TARGET=10.9
. This means that Qt applications compiled on a Mojave machine using this formula will no longer work on macOS versions older than Mavericks, which is probably not a huge loss.Closes #62. @pjessesco, can you verify that this PR fixes your issue?