I had thought about this a little more yesterday and the problem only seems to occur (at least for me) if you use the OSX 10.6 SDKs shipped with XCode (it doesn't seem to happen if you use the standard includes in /usr), though I haven't had time to investigate further:
CFLAGS="-m32 -isysroot /SDKs/MacOSX10.6.sdk/" \ CXXFLAGS="-m32 -isysroot /SDKs/MacOSX10.6.sdk/" \ LDFLAGS="-isysroot /SDKs/MacOSX10.6.sdk/" \ CC="gcc-4.2" \ make CONFIGUREARGS="--with-abi=32 --without-machine-code"
Compiling modules/Odbc/odbc.c In file included from /Users/hww3/pike-machtest/src/pike_threadlib.h:95, from /Users/hww3/pike-machtest/src/threads.h:14, from /Users/hww3/pike-machtest/src/modules/Odbc/odbc.c:26: /usr/include/mach/task_info.h:252: error: expected specifier-qualifier-list before 'vm_extmod_statistics_data_t' WARNING: Compiler failure! Trying without optimization! In file included from /Users/hww3/pike-machtest/src/pike_threadlib.h:95, from /Users/hww3/pike-machtest/src/threads.h:14, from /Users/hww3/pike-machtest/src/modules/Odbc/odbc.c:26: /usr/include/mach/task_info.h:252: error: expected specifier-qualifier-list before 'vm_extmod_statistics_data_t' Compilation command was: /Users/hww3/pike-machtest/build/darwin-10.8.0-i386/smartlink gcc-4.2 -I. -I/Users/hww3/pike-machtest/src/modules/Odbc -I/Users/hww3/pike-machtest/build/darwin-10.8.0-i386 -I/Users/hww3/pike-machtest/src -I/usr/include -I/Users/hww3/pike-machtest/build/darwin-10.8.0-i386/bundles/include -I/usr/local/include -I/usr/X11/include -I/usr/X11R6/include -DHAVE_CONFIG_H -g -m32 -isysroot /SDKs/MacOSX10.6.sdk/ -fPIC -DDYNAMIC_MODULE -c /Users/hww3/pike-machtest/src/modules/Odbc/odbc.c -o odbc.o make[6]: *** [odbc.o] Error 1
It also made me wonder, what are we using from mach that these headers are required? They don't seem to be required for thread support.
On Thu, 5 Apr 2012, Henrik Grubbström (Lysator) @ Pike (-) developers forum wrote:
Hi Bill.
The following known problems exist:
- A compilation problem exists under OSX 10.6/7: pike_threadlib
includes mach*.h, which causes an error.
I see that you added a patch for the above issue yesterday. Problem is that we haven't seen the issue on our (Roxen's) MacOS X 10.6 build machine, so I'd like to see the compilation error.
/grubba