Stan in R on PowerPC G5 (10.6 PPC): Help needed

That error indicates that the re-entrant (thread safe) version of the lgamma function is not implemented in the cmath libraries used by your compiler. Is there a different version that you can use?