[tlbuild] 64 bit on Mac OS X

Richard Koch koch at math.uoregon.edu
Tue May 26 05:37:51 CEST 2009


Jonathan,

I have been experimenting with building TeX Live 2009 in 64 bit on  
Intel. To do that I execute

	CFLAGS="-arch x86_64 -mmacosx-version-min=10.5"; export CFLAGS
	CXXFLAGS="-arch x86_64 -mmacosx-version-min=10.5"; export CXXFLAGS
	OBJCFLAGS="-arch x86_64 -mmacosx-version-min=10.5"; export OBJCFLAGS

and sometimes, to also test llvm,

	CC=/Developer/usr/bin/llvm-gcc-4.2; export CC

In these cases,

	./Build --disable-pdfopen --disable-xetex --disable-xdv2pdf

works fine. I haven't yet tested Xindy or asymptote, but that's due to  
laziness. I have tested both of these in 32 bit, where they work fine.  
As you know, we have always disabled pdfopen.

I'm writing mainly about XeTeX. If I try to compile XeTeX, I run into  
difficulty and the log file contains

	In file included from ../../../texk/web2c/xetexdir/XeTeXFontMgr.cpp:37:
	../../../texk/web2c/xetexdir/XeTeXswap.h: In function 'SInt32  
SWAP(SInt32)':
	../../../texk/web2c/xetexdir/XeTeXswap.h:90: error: redefinition of  
'SInt32 SWAP(SInt32)'
	../../../texk/web2c/xetexdir/XeTeXswap.h:65: error: 'fixed  
SWAP(fixed)' previously defined here

Tracing this down, I find that in XeTeXswap.h, the two routines in  
question are inside an #ifdef__cplusplus. The two routines are

	#ifdef XETEX_MAC
	#include "sfnt.h" /* for the 'fixed' typedef */
	static inline fixed
	SWAP(fixed p)
	{
		return (fixed)SWAP32((UInt32)p);
	}
	#endif

and

	static inline SInt32
	SWAP(SInt32 p)
	{
		return (SInt32)SWAP32((UInt32)p);
	}

Incidentally, in sfnt.h, "fixed" is defined as

	typedef le_int32 fixed;

Note that builders on other machines are having no trouble with 64 bit  
operation. But it is pretty clear why that is; the "fixed" type is  
only defined on the Mac, and apparently in 64 bit,  fixed is the same  
thing as SInt32.

Might you have a fix for this problem?

------------

The other problem program is xdv2pdf. I suspect that this program is  
only compiled on the Mac, and XeTeX users are mainly switching to  
xdvipdfmx. Thus even if we added 64 bit binaries, it should be OK to  
only include a 32 bit version of xdv2pdf. Can you think of any  
problems that might cause?

Compiling xdv2pdf produces a lot of warnings about deprecated cString  
calls, and then the following errors:

	../../../texk/xdv2pdf/xdv2pdf.cpp: In function 'FixedPoint  
getGlyphVOrg(const nativeFont&, UInt16)':
	../../../texk/xdv2pdf/xdv2pdf.cpp:504: error:  
'ATSUGlyphGetIdealMetrics' was not declared in this scope
	../../../texk/xdv2pdf/xdv2pdf.cpp: At global scope:
	../../../texk/xdv2pdf/xdv2pdf.cpp:623: error: variable or field  
'readBitmapInfo' declared void
	../../../texk/xdv2pdf/xdv2pdf.cpp:623: error:  
'GraphicsImportComponent' was not declared in this scope
	../../../texk/xdv2pdf/xdv2pdf.cpp:623: error: expected primary- 
expression before '*' token
	../../../texk/xdv2pdf/xdv2pdf.cpp:623: error: 'bi' was not declared  
in this scope
	In file included from /usr/include/dirent.h:65,
                  from /Users/koch/texlive2009/Build/source/texk/ 
kpathsea/c-dir.h:30,
                  from /Users/koch/texlive2009/Build/source/texk/ 
kpathsea/kpathsea.h:7,
                  from ../../../texk/xdv2pdf/xdv2pdf.cpp:934:
	/usr/include/sys/dirent.h:89: error: expected declaration before end  
of line

I haven't decided whether to add 64 bit binaries, but even if not, I'm  
sure that some Mac users will get the sources at the svn and try to  
make 64 bit binaries.

Dick Koch

  


More information about the tlbuild mailing list