add helper function for broken gnu packages, make sure sm tools are in PATH for compilation