This one doesn’t reproduce on developer hardware (or we wouldn’t have left it in) – a person who works with this code suggests “On my mac (10.7.5), I’ve got gcc 4.2 and clang 3.1, can they try it with either of these compilers?”
The error messages indicate that the error is from compiling a C file as a C++ file. My best guess is that there’s something off with your compiler installation. gcc should autodetermine the file type, but if it was symlinked or otherwise linked to g++, that might not work appropriately.
What do the following commands print?
If you could do an “ls -l” on both of the output paths, that would be helpful too.