[tlbuild] Building on the Macintosh (Part 2)
Richard Koch
koch at uoregon.edu
Tue Jan 16 20:26:33 CET 2018
Folks,
Now I can build the full tree on El Capitan and all tests are passed. BUT my method is a kludge and I don't know how to do the same thing on a simple command line containing the Build instruction.
The problem occurs in a file written to Work by the icu build system. The file is named umachine.h. Starting at line 331, this file says:
------------------
#if 1
// #if 1 is normal. UChar defaults to char16_t in C++.
// For configuration testing of UChar=uint16_t temporarily change this to #if 0.
// The intltest Makefile #defines UCHAR_TYPE=char16_t,
// so we only #define it to uint16_t if it is undefined so far.
#elif !defined(UCHAR_TYPE)
# define UCHAR_TYPE uint16_t
#endif
-------------------
A little later in this file,
#if ***irrelevant***
typedef char16_t UChar;
#elif defined(UCHAR_TYPE)
typedef UCHAR_TYPE UChar;
#elif defined (__cplusplus)
typedef char16_t UChar;
and this last line causes an error when compiling XeTeX.
----------------------
To fix the problem, I let the build system proceed to the error. Then I reached into Work and edited umachine.h by essentially changing "1" to "0".Then I issued the command
./Build --no-clean
to finish building.
If you look at the key steps, you realize that the original file renamed the predefined char16_t type to be UChar, but unfortunately char16_t wasn't defined and we got an error. The revision defined UCHAR_TYPE to be uint16_t, and then renamed this type to UChar. This was equivalent to setting char16_t = uint16_t = UChar, which is what is desired. Just setting char16_t to be uint16_t in the Build command line should do the trick, but I don't know how to do that correctly.
Dick Koch
More information about the tlbuild
mailing list