At Tue, 11 Feb 2025 16:34:47 -0800, "Greg A. Woods" <wo...@planix.ca> wrote: Subject: freetype build failing with "error: unknown type name 'Byte'" > > I'm making a bit of progress building -current on macOS, and I've > updated everything from git today, and now I'm seeing this: > > In file included from > /Volumes/work/woods/g-NetBSD-xsrc/external/mit/freetype/dist/src/gzip/ftgzip.c:72: > In file included from > /Volumes/work/woods/g-NetBSD-xsrc/external/mit/freetype/dist/src/gzip/zlib.h:34: > /Volumes/work/woods/g-NetBSD-xsrc/external/mit/freetype/dist/src/gzip/ftzconf.h:228:12: > error: unknown type name 'Byte' > 228 | typedef Byte FAR Bytef; > | ^ > [[ .... ]] > *** Failed target: ftgzip.lo > *** In directory: > /Volumes/work/woods/g-NetBSD-src/external/mit/xorg/tools/mkfontscale > *** Failed commands: > ${_MKTARGET_COMPILE} > => @echo ' ' "compile " mkfontscale/ftgzip.lo > ${HOST_COMPILE.c} -o ${.TARGET}.o ${COPTS.${.IMPSRC:T}} > ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} > => cc -O -O2 -DFONTENC_NO_LIBFONT -DXFREE86_FT2 -DFONTENC_NO_LIBFONT > -DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON > -DFONT_ENCODINGS_DIRECTORY=\"/Users/woods/build/woods/very.local/trunk-amd64-destdir/usr/X11R7/lib/X11/fonts/encodings/encodings.dir\" > -DPACKAGE_STRING=\"NetBSD\ tools\ version\" > -DFT_CONFIG_OPTION_DISABLE_BZIP2 -DFC_NO_MT=1 > -I/Volumes/work/woods/g-NetBSD-xsrc/external/mit/freetype/dist/include > -I/Volumes/work/woods/g-NetBSD-xsrc/external/mit/freetype/dist/include/freetype > -I/Users/woods/build/woods/very.local/trunk-amd64-destdir/usr/X11R7/include > > -I/Users/woods/build/woods/very.local/trunk-amd64-destdir/usr/X11R7/include/freetype2 > -DTOOL_FCCACHE -c -o ftgzip.lo.o > /Volumes/work/woods/g-NetBSD-xsrc/external/mit/freetype/dist/src/gzip/ftgzip.c > > > Src is at bf03e67bbdc0 > Xsrc is at a6437d194 > > I do see others using freetype have encountered this problem, but not in > NetBSD? > > Am I missing something somewhere?
Apple's own copy of zconf.h in the macos SDK headers uses __MACTYPES__ instead of other mysterious macros, and so this change to ftzconf.h allows the compile to proceed: modified xsrc/external/mit/freetype/dist/src/gzip/ftzconf.h @@ -215,7 +215,7 @@ # define FAR #endif -#if !defined(MACOS) && !defined(TARGET_OS_MAC) +#if !defined(__MACTYPES__) typedef unsigned char Byte; /* 8 bits */ #endif typedef unsigned int uInt; /* 16 bits or more */ -- Greg A. Woods <gwo...@acm.org> Kelowna, BC +1 250 762-7675 RoboHack <wo...@robohack.ca> Planix, Inc. <wo...@planix.com> Avoncote Farms <wo...@avoncote.ca>
pgp09fH3_X8xC.pgp
Description: OpenPGP Digital Signature