See: https://trac.macports.org/ticket/71165 Upstream did not accept this solution nor provided other useful comments and/or fix. --- mesonbuild/compilers/mixins/clike.py.orig +++ mesonbuild/compilers/mixins/clike.py @@ -1191,7 +1191,8 @@ def find_framework_paths(self, env: 'Environment') -> T.List[str]: commands = self.get_exelist(ccache=False) + ['-v', '-E', '-'] commands += self.get_always_args() # Add CFLAGS/CXXFLAGS/OBJCFLAGS/OBJCXXFLAGS from the env - commands += env.coredata.get_external_args(self.for_machine, self.language) + # 'std=c++','std=gnu++' are valid for C++/ObjC++ but not for 'C' + commands += [x for x in env.coredata.get_external_args(self.for_machine, self.language) if '-std=c++' not in x and '-std=gnu++' not in x] mlog.debug('Finding framework path by running: ', ' '.join(commands), '\n') os_env = os.environ.copy() os_env['LC_ALL'] = 'C'