CarbonHeaders obsolete: uninstall dependencies

Ian Wadham iandw.au at gmail.com
Mon Jan 19 17:56:50 PST 2015


Hi René and Brandon,

On 20/01/2015, at 12:23 PM, René J.V. Bertin wrote:
> On Monday January 19 2015 18:09:46 Brandon Allbery wrote:
>> On Mon, Jan 19, 2015 at 5:47 PM, René J.V. <rjvbertin at gmail.com> wrote:
>> 
>>> AvailabilityMacros.h? I've made a number of patches to KDE4 that rely on
>>> that header, and KDE uses Carbon itself.
>> 
>> One hopes not, since Carbon is gone post-10.6 except for backward
>> compatibility for ancient apps.
> 
> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon is linked by both libkdeui.dylib and /opt/local/libexec/qt4/Library/Frameworks/QtGui.framework/QtGui . I seem to recall that it is a leftover and redundant (non-)dependency for Qt. I remember a bit more distincly that I couldn't remove it from the KDE4 libraries' dependencies without enough link errors to dissuade me from figuring out where all those calls came from.

Here is a more glaring example.  Shiny new code in Qt 5 (i.e. our friend QStandardPaths,
QSP for short) is using Carbon in a central supporting role for apps dependent on Qt5 ---
i.e. all Qt5 apps, all KF5 apps (from KDE), etc.

As I wrote in December on the KDE-Mac list.

"A Possible Problem re QStandardPaths (QSP)
--------------------------------------------------------------

"QStandardPaths::standardLocations() and QStandardPaths::writableLocation() use a helper
method called macLocation() to obtain "standard" Apple OS X locations.  It uses another helper,
translateLocation(), to convert from QSP file types to file types in the OS X libraries.  Then it
uses FSFindFolder() from the CARBON library to get a location containing files of the required
type.  But FSFindFolder() is DEPRECATED as of OS X 10.8, see [7].  I managed to find some
doco of FSFindFolder() on the PDF file in [8], page 12.

"It looks as though QSP has started to move to using the COCOA library to find file types, which
is why qstandardpaths_mac.cpp has become qstandardpaths_mac.mm in Qt 5.4 source code.
Is "mm" short for "mix and match"?… :-)  Anyway, QSP is now using code that is a mix of C++
and Objective C, with use of both Cocoa and Carbon ATM.  And QSP might change some
more in later versions of Qt 5."

[7] https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_8/CoreServices.html
[8] http://www.filibeto.org/unix/macos/lib/dev/documentation/Carbon/Reference/Folder_Manager/folder_manager.pdf (Page 12)

It may be time to nip this continuing use of Carbon by Qt and KF5 in the bud --- but where to start?

Cheers, Ian W.



More information about the macports-users mailing list