In the presence of a magnetic field, a compass can't be guaranteed to be pointing north.
This is an important fact if you are in an area known for this type of activity. However, a compass isn't going to wildly spin just because it's by a magnetic rock.
To get it to spin, I suppose the simplest way is to have a motor type setup - this would induce the conditions required for the compass to spin.
EDIT: I suppose if you're in an area with a significant magnetic field the compass will align to it and as you move, it will track this field instead (and any surrounding fields) so it could appear to spin as it tracks the various magnetic locations - but you need to note it's not spinning because of the rocks magnetic field, it will only move as and when you move between them (imagine moving a compass around a number of magnets on your desk).