Skip to content

[BUILD][UNIX] Failure on macOS w/ Xcode 16.4, error: unknown type name 'Fixed' #479

@cho-m

Description

@cho-m

Summary

Compilation failure on macOS 15 / Xcode 16.4 with message: error: unknown type name 'Fixed'.

POV-Ray Version

  • Incarnation: POV-Ray for Unix
  • Affected source version: v3.7.0.10 and current master (6dd2dca)
  • Known working source version: NA

Build Environment

  • Operating system: macOS 15
  • Hardware architecture: arm64
  • Compiler: Apple Clang 17.0.0 (based on LLVM 19.1.4)

Build Command Sequence

# Built via Homebrew formula (also repro'd running build from local directory)
cd unix
./prebuild.sh
./configure COMPILED_BY=homebrew --disable-debug --disable-dependency-tracking --prefix=/opt/homebrew/Cellar/povray/3.7.0.10_14 --mandir=/opt/homebrew/Cellar/povray/3.7.0.10_14/share/man --with-boost=/opt/homebrew/opt/boost --with-openexr=/opt/homebrew/opt/openexr --without-libsdl --without-x
make install

Configure Output

===============================================================================
Configure POV-Ray version 3.7.0.10
===============================================================================

This is an unofficial version compiled by:
 homebrew
The POV-Ray Team(tm) is not responsible for supporting this version.

Environment
-----------
checking build system type... aarch64-apple-darwin24.5.0
checking host system type... aarch64-apple-darwin24.5.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether sleep supports fractional seconds... yes
checking filesystem timestamp resolution... 2
checking whether build environment is sane... yes
/bin/sh: "/private/tmp/povray-20250811-31834-r6x7vu/povray-3.7.0.10/unix/config"/missing: No such file or directory
configure: WARNING: 'missing' script is too old or missing
checking for a race-free mkdir -p... mkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking xargs -n works... yes
checking whether UID '501' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether $C_INCLUDE_PATH contains the "." path... no
checking whether $CPLUS_INCLUDE_PATH contains the "." path... no

Programs
--------
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether clang accepts -g... yes
checking for clang option to enable C11 features... none needed
checking whether clang understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of clang... none
checking how to run the C preprocessor... clang -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking whether the compiler supports GNU C++... yes
checking whether clang++ accepts -g... yes
checking for clang++ option to enable C++11 features... none needed
checking dependency style of clang++... none
checking whether the clang++ compiler works... yes
checking how to run the C++ preprocessor... clang++ -E
checking for C++ compiler vendor... gnu
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for clang++ version... 17.0.0
checking for ranlib... ranlib
checking for stat format option... -f

Libraries
---------
checking whether to link with cygwin DLL... no
checking whether to enable static linking... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking for boostlib >= 1.37... yes
checking whether the Boost::Thread library is available... yes
checking for exit in -lboost_thread... yes
checking whether the boost thread library is usable... yes
checking for sin in -lmkl... no
checking for sin in -lm... yes
checking for clock_gettime in -lrt... no
checking whether to use the ZLIB library... yes
checking for library containing zlibVersion... -lz
checking for zlib.h... yes
checking for libz version >= 1.2.1... 1.2.12, ok
checking whether to use the PNG library... yes
checking for library containing png_get_libpng_ver... -lpng
checking for png.h... yes
checking for libpng version >= 1.2.5... 1.6.50, ok
checking whether to use the JPEG library... yes
checking for library containing jpeg_std_error... -ljpeg
checking for jpeglib.h... yes
checking for libjpeg version >= 6b (62)... 80, ok
checking whether to use the TIFF library... yes
checking for library containing TIFFGetVersion... -ltiff
checking for tiffio.h... yes
checking for libtiff version >= 3.6.1... 4.7.0, ok
checking whether to use the OpenEXR library... yes
checking for pkg-config... pkg-config
checking for OpenEXR's pkg-config... yes
checking for OpenEXR version >= 1.2... 3.3.5, ok
checking for OpenEXR/ImfCRgbaFile.h... yes
checking for X... disabled
configure: X Window display will be disabled

Language constructs and functions
---------------------------------
checking for sys/time.h... yes
checking for time.h... yes
checking for limits.h... yes
checking for sys/resource.h... yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking size of int... 4
checking size of long int... 8
checking size of size_t... 8
checking size of float... 4
checking for working memcmp... yes
checking for vsnprintf... yes
checking for getcwd... yes
checking for readlink... yes
checking for nanosleep... yes
checking for clock_gettime... yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for asinh... yes

Compiling
---------
checking whether to enable pipes for communications... yes
checking whether clang++ accepts -pipe... yes
checking whether clang++ accepts -Wno-multichar... yes
checking whether clang++ accepts -Wno-write-strings... yes
checking whether clang++ accepts -fno-enforce-eh-specs... no
checking whether clang++ accepts -Wno-non-template-friend... no
checking whether to enable I/O restrictions... yes
checking whether to enable debugging... no
checking whether to enable profiling... no
checking whether to enable stripping... yes
checking whether clang++ accepts -s... no
configure: WARNING: Cannot set stripping mode
checking whether to enable optimizations... yes
checking whether clang++ accepts -O3... yes
checking whether clang++ accepts -ffast-math... yes
checking whether to enable architecture-specific optimizations... yes
checking which architecture to optimize for... aarch64-apple-darwin24.5.0

Makefiles
---------
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating source/Makefile
config.status: creating vfe/Makefile
config.status: creating unix/Makefile
config.status: creating unix/config.h
config.status: executing depfiles commands

===============================================================================
POV-Ray 3.7.0.10 has been configured.

Built-in features:
  I/O restrictions:          enabled
  X Window display:          disabled
  Supported image formats:   gif tga iff ppm pgm hdr png jpeg tiff openexr
  Unsupported image formats: -

Compilation settings:
  Build architecture:  aarch64-apple-darwin24.5.0
  Built/Optimized for: aarch64-apple-darwin24.5.0
  Compiler vendor:     gnu
  Compiler version:    clang++ 17.0.0
  Compiler flags:      -pipe -Wno-multichar -Wno-write-strings -O3 -ffast-math -D_THREAD_SAFE

Type 'make check' to build the program and run a test render.
Type 'make install' to install POV-Ray on your system.

The POV-Ray components will be installed in the following directories:
  Program (executable):       /opt/homebrew/Cellar/povray/3.7.0.10_14/bin
  System configuration files: /opt/homebrew/Cellar/povray/3.7.0.10_14/etc/povray/3.7
  User configuration files:   /private/tmp/povray-20250811-31834-r6x7vu/povray-3.7.0.10/.brew_home/.povray/3.7
  Standard include files:     /opt/homebrew/Cellar/povray/3.7.0.10_14/share/povray-3.7/include
  Standard INI files:         /opt/homebrew/Cellar/povray/3.7.0.10_14/share/povray-3.7/ini
  Standard demo scene files:  /opt/homebrew/Cellar/povray/3.7.0.10_14/share/povray-3.7/scenes
  Documentation (text, HTML): /opt/homebrew/Cellar/povray/3.7.0.10_14/share/doc/povray-3.7
  Unix man page:              /opt/homebrew/Cellar/povray/3.7.0.10_14/share/man
===============================================================================

Make Output

backend/shape/truetype.cpp:126:2: error: unknown type name 'Fixed'
  126 |         Fixed version;                /* 0x10000 (1.0) */
      |         ^
backend/shape/truetype.cpp:151:2: error: unknown type name 'Fixed'
  151 |         Fixed version;                /* for this table, set to 1.0 */
      |         ^
backend/shape/truetype.cpp:152:2: error: unknown type name 'Fixed'
  152 |         Fixed fontRevision;           /* For Font Manufacturer */
      |         ^
backend/shape/truetype.cpp:192:2: error: unknown type name 'Fixed'
  192 |         Fixed version;
      |         ^
4 errors generated.
make[1]: *** [backend/shape/truetype.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install-recursive] Error 1

Additional context (optional)

No issues with Xcode 16.2 or older

Workaround (optional)

Passing -include MacTypes.h to CXXFLAGS does allow build to succeed so I think header is not indirectly included in newer Xcode

Suggested Solution (optional)

Not too sure best solution but could modify logic at:

#if !defined(TARGET_OS_MAC)
typedef int Fixed;

Some ideas:

  • Add #include <MacTypes.h> on macOS. I think this is where Fixed is defined, or
  • Check for header guard (e.g. defined(__MACTYPES__)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS: Unixspecific to POV-Ray for Unixcompatibility?reported as compatibility issue; triage pending

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions