For your information, I attempted to build MAME 0.172 on freshly installed Ubuntu and openSUSE Linux. The typical problem is that new people fail at building because they do not find out what packages to install, while those who are already doing builds for a longer time just don't remember what packages they installed in the past.