[101393] trunk/dports/aqua/qt4-mac/Portfile

Michael Dickens michaelld at macports.org
Thu Jan 10 05:30:47 PST 2013


> On Jan 9, 2013, at 11:33 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
> > On Jan 9, 2013, at 19:38, michaelld at macports.org wrote:
> > # Qt4 does not compile with clang 3.0 or older; it also does not work
> > -# with Apple's clang from XCode 4.4 or older.  Block the clang
> > -# versions, both from Apple and MacPorts, and that don't meet these
> > -# requirements.
> > +# with Apple's clang from XCode 4.4 or older, or as installed on Mac
> > +# OS X 10.7 or earlier.  Block the clang versions, both from Apple and
> > +# MacPorts, and that don't meet these requirements.
> 
> I'm surprised: you're saying that Xcode 4.5 on Mountain Lion provides a usable clang but Xcode 4.5 on Lion doesn't? What is the symptom of the failure?

The primary symptom is that LIBRARY_PATH is not being honored.  Which is
why the comment in the qt4-mac Portfile about qt4 (really, the port
qt4-mac) not compiling with clang 3.0 or older.  The "feature" was not
corrected until at least the 3.1 release; I think it might even be a
"late 3.1" release, as opposed to an "early 3.1" release.

I think the issue on 2 of my tickets, both with folks running 10.7, is
that they updated Xcode.app, but Xcode was not set to "Check for and
install updates automatically".  Hence, whatever command line tools were
installed from the previous Xcode.app were left in place. Thus,
"xcodebuild -version" reported 4.5.1 or 4.5.2, but "/usr/bin/clang -v"
reported 2.1 or 3.1.

Because 10.8's Xcode.app came with a version of clang that honors
LIBRARY_PATH, this OS version is OK at least with respect to the
compiler.

Really: Qt4 is not designed to work with clang.  It does sort of work,
but not as well as it could.  Qt5 contains all of the correct hooks to
truly utilize clang.  I am not going to back-port Qt5's clang Qt mkspecs
to qt4-mac.  When folks have an issue with Qt4, 10.7, and clang, I
inevitably recommend that they reinstall using gcc (llvm-gcc-4.2).

I'm open to other's suggestions as to how to get qt4-mac to work more
reliably with the various potential clang installs, but it seems like
blocking Apple's clang on 10.7 solves some potential issues.  And,
really, I don't think most users care which compiler is used, so long as
the port installs and executes correctly. - MLD


More information about the macports-dev mailing list