[MacPorts] #68714: harfbuzz fails to configure with gcc on Sonoma: error: CoreText support requested but libcoretext not found

MacPorts noreply at macports.org
Tue Nov 21 18:20:54 UTC 2023


#68714: harfbuzz fails to configure with gcc on Sonoma: error: CoreText support
requested but libcoretext not found
---------------------------+--------------------
  Reporter:  barracuda156  |      Owner:  (none)
      Type:  defect        |     Status:  closed
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.8.1
Resolution:  wontfix       |   Keywords:  sonoma
      Port:  harfbuzz      |
---------------------------+--------------------
Changes (by ryandesign):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 It's not a bug for MacPorts to fix. On modern macOS, MacPorts selects a
 clang compiler to build this port, and that works. We don't support users
 picking random compilers to build their ports.

 The config.log contains a zillion errors related to the system headers,
 starting with:

 {{{
 configure:22970: checking for CTFontRef
 configure:22970: /opt/svacchanda/local/bin/gcc-mp-13 -c -pipe -Os
 -DHB_NO_PRAGMA_GCC_DIAGNOSTIC_ERROR
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64
 -I/opt/svacchanda/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk conftest.c
 >&5
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATS.h:32,
                  from
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:27,
                  from conftest.c:48:
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:
 In function 'ATSGetGeneration':
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:230:24:
 error: expected declaration specifiers before 'ATS_UNAVAILABLE'
   230 | ATSGetGeneration(void) ATS_UNAVAILABLE;
       |                        ^~~~~~~~~~~~~~~
 }}}

 so either something about the way that conftest.c is using the system
 headers is not compatible with gcc, or (more likely in my opinion) the
 system headers themselves are not compatible with gcc. Harfbuzz isn't
 doing anything particularly exotic in its test, just `#include
 <ApplicationServices/ApplicationServices.h>`:

 https://github.com/harfbuzz/harfbuzz/blob/894a1f72ee93a1fd8dc1d9218cb3fd8f048be29a/configure.ac#L388

 You can try yourself if this works with your compiler:

 {{{
 % cat test.c
 #include <ApplicationServices/ApplicationServices.h>
 int main(void) {}
 % clang -o test test.c
 % gcc-mp-12 -o test test.c
 [a zillion errors]
 }}}

 So the system headers are not compatible with gcc, and if you want that to
 change, you'd have to file a bug report with Apple and/or the developers
 of gcc.

 A similar error was [https://forums.wxwidgets.org/viewtopic.php?t=50187
 reported to wxwidgets] when trying to use gcc to build it on macOS, and
 their response was don't do that; use clang.

 This would not be the first time macOS system headers have not been
 compatible with gcc. Here is
 [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90835 a previous instance].

-- 
Ticket URL: <https://trac.macports.org/ticket/68714#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list