>> configure:17517: gcc -c >> -I/Users/travis/ttfautohint-build/local/include -g -O2 conftest.c >&5 >> conftest.c:145:13: error: use of undeclared identifier 'max_align_t' > > Evidently the stddef.h found by the above command does not define > max_align_t, whereas the stddef.h found by the command 'CXX main.o' > in > <https://travis-ci.org/source-foundry/ttfautohint-build/jobs/269031319#L3401> > does define max_align_t. Can you investigate why this is so? > Perhaps CXX uses different -I options, or perhaps stddef.h does not > define max_align_t if C++.
I suspect that the used clang version doesn't activate C11 support by default, while C++11 is available. Right now I only have the `stddef.h' file of a later XCode version (from 2015); however, looking at the copyright notice it seems that it is unchanged. It contains the following. #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \ || (defined(__cplusplus) && __cplusplus >= 201103L) typedef long double max_align_t; #endif Chris, do you have a chance to check /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.1.0/include/stddef.h of an OS X 10.10 Travis run whether the definition is identical? > Ideally 'configure' should be using the same compiler and options as > 'make'; when that isn't true, there can be trouble. Sounds sensible. However, how to do that correctly? The `max_align_t' test is part of gnulib, I don't ask for it. Shall I simply add AC_LANG_PUSH([C++]) right before the call to gl_INIT in my `configure.ac' file? Note that I also have AX_CXX_COMPILE_STDCXX([11],,[optional]) to activate C++11 if available. Werner