Opened 2 years ago

Closed 2 years ago

#66114 closed defect (fixed)

qt4-mac: build failure on macOS 13

Reported by: ShadSterling (Shad Sterling) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: ventura Cc: michaelld (Michael Dickens)
Port: qt4-mac

Description

Build failed while reinstalling all ports after upgrading to Ventura

Following suggestions in #57083 to build on a newer macOS,

the attempted build failed with one undeclared identifier and five explicitly marked unavailable

Undeclared: ATSFontActivateFromFileReference

Unavailable: ATSFontActivateFromMemory, ATSFontFindFromContainer, ATSFontFindFromContainer, ATSFontGetPostScriptName, ATSFontDeactivate

:info:build /usr/bin/clang++ -c -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk -std=c++98 -Xarch_x86_64 -mmacosx-version-min=13.0 -fconstant-cfstrings -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=13.0 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_OPENTYPE -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/macx-g++ -I. -I.moc/release-shared -I../../include/QtGui -I.rcc/release-shared -Iimage -I../3rdparty/harfbuzz/src -Idialogs -I../../include/QtCore -I../../include -I.uic/release-shared -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.7/Library/Frameworks -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.7/lib -o .obj/release-shared/qtextcursor.o text/qtextcursor.cpp
:info:build In file included from text/qfontdatabase.cpp:1103:
:info:build text/qfontdatabase_mac.cpp:452:17: error: use of undeclared identifier 'ATSFontActivateFromFileReference'
:info:build                 ATSFontActivateFromFileReference(&ref, kATSFontContextLocal, kATSFontFormatUnspecified, 0, kATSOptionFlagsDefault, &handle);
:info:build                 ^
:info:build text/qfontdatabase_mac.cpp:466:13: error: 'ATSFontActivateFromMemory' is unavailable
:info:build         e = ATSFontActivateFromMemory((void *)fnt->data.constData(), fnt->data.size(), kATSFontContextLocal,
:info:build             ^
:info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:363:1: note: 'ATSFontActivateFromMemory' has been explicitly marked unavailable here
:info:build ATSFontActivateFromMemory(
:info:build ^
platform darwin {
    if { ( ${MAJOR} == 10 && ${MINOR} > 15 ) || ${MAJOR} > 13 } {
        # This project needs to be updated to build with clang++ against libc++
        depends_lib
        depends_run
        pre-fetch {
            ui_error "$name does not currently build on macOS later than 13 'Ventura'."
            error "unsupported platform"
        }
    }
}

Attachments (2)

main.log (2.1 MB) - added by ShadSterling (Shad Sterling) 2 years ago.
Portfile (45.7 KB) - added by ShadSterling (Shad Sterling) 2 years ago.

Change History (6)

Changed 2 years ago by ShadSterling (Shad Sterling)

Attachment: main.log added

Changed 2 years ago by ShadSterling (Shad Sterling)

Attachment: Portfile added

comment:1 Changed 2 years ago by kencu (Ken)

The ATSFont* functions are severely deprecated now -- to be removed next macOS release.

You could try forcing a deployment target of 12.0. I don't think you need to use the MacOSX12.sdk.

comment:2 Changed 2 years ago by kencu (Ken)

Yes, that worked... qt4 lives on, on Intel at least. :>

Added this to the Portfile:

platform darwin 22 {
    macosx_deployment_target 12.0
}

and presto

 % port -v installed qt4-mac
The following ports are currently installed:
  qt4-mac @4.8.7_13 (active) requested_variants='' platform='darwin 22' archs='x86_64' date='2022-10-30T00:26:04-0700'

comment:3 Changed 2 years ago by ShadSterling (Shad Sterling)

Worked for me as well, thanks!

qt4 seems to be a dependency of every kde app (via kdelibs4), I hope those libs get updated before this workaround stops working

comment:4 Changed 2 years ago by michaelld (Michael Dickens)

Owner: set to michaelld
Resolution: fixed
Status: newclosed

In aa2fc824a17ab7d3bd15a1c92d9c814c76d06fa1/macports-ports (master):

qt4-mac: fix building on macOS 13 (at least on Intel)

Closes: #66114

Note: See TracTickets for help on using tickets.