I remember getting this error last time I tried and I had to set an environment variable before running make. However, I can't seem to find the secret environment variable I need to set on google.
I want to fix a problem with relative paths in plist files for xcode targets, but I need to be able to build premake first...
Linking Premake4
Undefined symbols for architecture x86_64:
"_os_stat", referenced from:
_os_functions in premake.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [bin/release/premake4] Error 1
make: *** [Premake4] Error 2
new-host-3:premake seanhoughton$ gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

After assuming it was some kind of exotic compiler or linker flag problem it turns out that os_stat was simply missing from the makefile because I pulled down a new version and forgot to re-run premake on the source.
User error.