[tlbuild] ATSUGetAttribute not found

Jonathan Kew jfkthame at googlemail.com
Sat Apr 16 00:00:26 CEST 2011

On 15 Apr 2011, at 22:12, David Carter-Hitchin wrote:

> Hi,
> I'm trying to build latest TL (rsync'd as of a few days ago) on a modern iMac (10.7.0) , and running into this error:
> g++ -DHAVE_CONFIG_H -I. -I../../../texk/web2c -I./w2c  -I/Users/david/tex/texlive/source/Work/texk -I/Users/david/tex/texlive/source/texk -I../../../texk/web2c/xetexdir -DU_STATIC_IMPLEMENTATION -I/Users/david/tex/texlive/source/Work/libs/icu/include `cat /Users/david/tex/texlive/source/Work/libs/freetype2/ft-includes` -I/Users/david/tex/texlive/source/Work/libs/teckit/include -DXETEX_MAC  -DXETEX_GRAPHITE -I/Users/david/tex/texlive/source/Work/libs/graphite/include -I/Users/david/tex/texlive/source/Work/libs/zlib/include   -g -O2 -MT libxetex_a-XeTeXLayoutInterface.o -MD -MP -MF .deps/libxetex_a-XeTeXLayoutInterface.Tpo -c -o libxetex_a-XeTeXLayoutInterface.o `test -f 'xetexdir/XeTeXLayoutInterface.cpp' || echo '../../../texk/web2c/'`xetexdir/XeTeXLayoutInterface.cpp
> ../../../texk/web2c/xetexdir/XeTeXLayoutInterface.cpp: In function 'int GetFontCharRange_AAT(OpaqueATSUStyle*, int)':
> ../../../texk/web2c/xetexdir/XeTeXLayoutInterface.cpp:867: error: 'ATSUGetAttribute' was not declared in this scope
> ../../../texk/web2c/xetexdir/XeTeXLayoutInterface.cpp:869: error: 'FMGetATSFontRefFromFont' was not declared in this scope
> make[5]: *** [libxetex_a-XeTeXLayoutInterface.o] Error 1
> Poking around I found the function in the .deps file:
> #if !__LP64__
> /*
> *  ATSUGetAttribute()   *** DEPRECATED ***
> *
> *  Deprecated:
> *    Use CTFontDescriptorCopyAttribute instead.
> So, what is the plan here? Is someone working on this, does anyone need help with converting the code over?

This would be better asked on the xetex mailing list, really. Anyway, the answer is that you can't currently build xetex as a 64-bit OS X program, because it uses ATSUI, which Apple decided not to support in the 64-bit APIs. (There are a couple other issues as well, but that's the main one.) The solution is to replace the use of ATSUI with the more modern Core Text APIs. If you want to prepare a patch to do this, feel free! It's not particularly difficult, though the APIs are different enough that it requires a reasonable understanding of both of them in order to do a good job of it.

In the meantime, xetex still works fine as a 32-bit program, of course. I can't imagine a real use-case that _needs_ a 64-bit version, though it's possible it might have some performance gains.


More information about the tlbuild mailing list