I’m not sure what’s causing the issue, but as a workaround you could at least disable modules for only the file(s) where you’re using tgmath.h:
- Navigate to the target’s Build Phases tab in Xcode.
- Under the Compile Sources phase, locate the source files.
- Double-click the source file and type
-fno-modulesin the Compiler Flags popover to disable Clang modules for that file.
At least this way you would still get the benefits of modules in most of your project. (This is assuming, of course, you don’t need tgmath.h in the majority of your source files.)