Same problems on my Debian Etch and version 0.128: started with comment of the "-Werror" flag yesterday but still had the 'pthread_setaffinity_np' error.
Looked around the web for a while and the answer was finally here!
I hope to publish soon SDLMAME (v0.128) packages for debian Etch and Lenny. Just need to debug them a bit now.
Thanks again for your work and disponibility