A hardware magnetic sensor is built only in US market version of G5. That means the Americans, and only them, can use compass software.
No other version of G5 sold worldwide has built-in hardware magnetic field sensor. Including all European editions, what is a little surprising.