Opened 3 years ago

Closed 3 years ago

#64345 closed defect (fixed)

qt6-qtbase fails to build on 10.14

Reported by: jmroot (Joshua Root) Owned by: chrstphrchvz (Christopher Chavez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: mojave Cc: chrstphrchvz (Christopher Chavez)
Port: qt6-qtbase

Description

https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/111651

/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_aqua_qt6/qt6-qtbase/work/qtbase-everywhere-src-6.2.1/src/gui/platform/darwin/qapplekeymapper.mm:534:45: error: property 'length' not found on object of type 'id'
                if (charactersWithModifiers.length > 0)
                                            ^

Change History (6)

comment:1 Changed 3 years ago by jmroot (Joshua Root)

In 9fd24dff1496f80ed7a4d855b9904df16ea29b62/macports-ports (master):

qt6: mark as broken on 10.14

See: #64345

comment:2 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

The relevant code is guarded by if (@available(macOS 10.15, *)) {…}: https://github.com/qt/qtbase/blob/v6.2.1/src/gui/platform/darwin/qapplekeymapper.mm#L525. I’m not too familiar with this Objective-C feature, but why does it not prevent the errors? Could it be that the Xcode clang on the builder or SDK are too old, or would it complain during configure that were the case?

comment:3 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:4 Changed 3 years ago by jmroot (Joshua Root)

@available is a runtime check. It allows you to build against a newer SDK and deploy to an older OS version, but not to build against an older SDK. To accomplish the latter, you also need to wrap the if statement in a preprocessor check like so:

#include <AvailabilityMacros.h>
…
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
if (@available(macOS 10.15, *)) {
…
}
#endif

comment:5 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

PR opened: https://github.com/macports/macports-ports/pull/14427. Could someone with access to 10.14 please check if the port now builds, or if it now encounters other errors?

comment:6 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Owner: set to chrstphrchvz
Resolution: fixed
Status: newclosed

In 864cdf2f295e5f547692d07e8bf00d980e9afc3f/macports-ports (master):

qt6-qtbase: allow building on macOS 10.14

Fixes: #64345

Note: See TracTickets for help on using tickets.