Opened 11 months ago

Last modified 11 months ago

#61921 new defect

qt5-qtwebengine @5.15.2: does not build on macOS 10.13 with Xcode 9

Reported by: dliessi (Davide Liessi) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: highsierra Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), kencu (Ken), ryandesign (Ryan Schmidt)
Port: qt5-qtwebengine

Description

macOS 10.13.6 17G14042
Xcode 9.4.1 9F2000

The port qt5-qtwebengine fails because nothing is built. The configure phase ends with the following warnings:

WARNING: QtWebEngine requires at least version 10.0.0, but using Xcode version 9.4.1.
WARNING: QtPdf requires at least version 10.0.0, but using Xcode version 9.4.1.
WARNING: QtWebEngine will not be built.
WARNING: QtPdf will not be built.

See the full log.

I tried patching the configure phase to allow Xcode 9.4.1, but the build phase failed because of a missing symbol (_responsibility_spawnattrs_setdisclaim; unfortunately I didn't take note of which file required it and I have already cleaned the build attempt), so I assume Xcode 10 is really required.

The version of Xcode in the buildbot is indeed 9.4.1, and although Xcode 10.0.0 should run on macOS 10.13 I seem to recall that it wasn't recommended to install it (probably because of the SDK version). Is it still true?

Answering my message to the mailing list, Ken suggested that the buildbot be updated to use Xcode 10 on 10.13 (that's why I'm adding Ryan in Cc).

An alternative solution is to create a new set of qt514 ports.

Ken suggested also to try forcing macports-clang 9.0: I will try later and report.

Attachments (1)

qt5-qtwebengine-clang9-main.log.bz2 (16.8 KB) - added by dliessi (Davide Liessi) 11 months ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 months ago by kencu (Ken)

It would be a shame, and a moderate project, to have to create a whole plethora of qt514 ports just for this one thing, holding back to Xcode9 on the 10.13 buildbot.

And sooner or later, things would come along that require qt515 and then 10.13 would (needlessly) be left behind...

Last edited 11 months ago by kencu (Ken) (previous) (diff)

comment:2 Changed 11 months ago by kencu (Ken)

From the PR <https://github.com/macports/macports-ports/pull/8744>, here's evidence things work on 10.13 with Xcode10:

  qt5-qtwebengine @5.15.2_0 (active) platform='darwin 17' archs='x86_64' date='2020-12-14T21:38:59-0800'
  qt5-qtwebengine-docs @5.15.2_0 (active) platform='darwin 17' archs='noarch' date='2020-12-14T21:46:11-0800'

comment:3 in reply to:  description Changed 11 months ago by dliessi (Davide Liessi)

Replying to dliessi:

Ken suggested also to try forcing macports-clang 9.0: I will try later and report.

I did the following.

$ sudo port patch qt5-qtwebengine
--->  Computing dependencies for qt5-qtwebengine
--->  Fetching distfiles for qt5-qtwebengine
--->  Verifying checksums for qt5-qtwebengine
--->  Extracting qt5-qtwebengine
--->  Applying patches to qt5-qtwebengine
$ sudo nano aqua/qt5/work/qtwebengine-everywhere-src-5.15.2/configure.pri
[changed minimal Xcode version from 10.0.0 to 9.0.0]
$ sudo port install qt5-qtwebengine configure.compiler=macports-clang-9.0
--->  Computing dependencies for qt5-qtwebengine
--->  Fetching archive for qt5-qtwebengine
--->  Attempting to fetch qt5-qtwebengine-5.15.2_0.darwin_17.x86_64.tbz2 from https://lil.fr.packages.macports.org/qt5-qtwebengine
--->  Attempting to fetch qt5-qtwebengine-5.15.2_0.darwin_17.x86_64.tbz2 from https://cph.dk.packages.macports.org/qt5-qtwebengine
--->  Attempting to fetch qt5-qtwebengine-5.15.2_0.darwin_17.x86_64.tbz2 from http://fco.it.packages.macports.org/qt5-qtwebengine
--->  Configuring qt5-qtwebengine
--->  Building qt5-qtwebengine
Error: Failed to build qt5-qtwebengine: command execution failed
Error: See /opt/local/var/macports/logs/_opt_macports-git_macports-ports_aqua_qt5/qt5-qtwebengine/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port qt5-qtwebengine failed

I attach the main.log.

Changed 11 months ago by dliessi (Davide Liessi)

comment:4 Changed 11 months ago by kencu (Ken)

Well, somewhat surprisingly perhaps, using macports-clang-9.0 does indeed let you past the configure stage. So at least that works.

The next error seems to be this somewhat messy construction:

:info:build /bin/sh: ../../../../../../../../../../bin/clang++: No such file or directory

We are attempting (perhaps fruitlessly) to use macports-clang-9.0, but qt has configured for this odd compiler spec, which I assume was supposed to be the Xcode clang++.

So -- either give up and move up to Xcode10 (that's my recommendation, and that is what I did) or -- would have to see how to make the build actually use macports-clang-9.0 during the build itself, not just during the configure phase.

Somewhere there is some script that is assuming that on MacOS, only the Xcode clang is going to be used here, and so that script did not anticipate the idea of ever using a different, specified compiler on MacOS.

Finding that exact bit of code buried in qt5-qtwebengine might prove to be a trick, but you might simply grep the source for something that would be /bin/clang or /bin/clang++.

Grepping for /bin/clang++ might prove difficult with those ++ signs, and I'd have to monkey around a while to see how to do that best.

Marcus also writes the recommended qt5 compiler spec into the qt5/qmake5 portgroups, and also into the build scripts that installed with qt5-qttools, so it could be passed into the qt5-qtwebengine build from there.

comment:5 Changed 11 months ago by kencu (Ken)

When fixing qt5.3 for SnowLeopard, I settled on clang-9.0 as the compiler that would be used, and built qt5-qttools with that. As I recall that compiler was then baked into qt5-qttools, and was thereafter used for all the qt5 builds on SnowLeopard, which is what I wanted.

Note: See TracTickets for help on using tickets.