One bug that I found on Mac was if I tried to declare and initialize an array outside of any function. This works on Linux, but apparently not on Mac. I had to populate the array inside main like this:
vec2 dirs[4];
void main()
{
dirs[0] = vec2(0.0, 1.0);
dirs[1] = vec2(0.0, -1.0);
dirs[2] = vec2(1.0, 0.0);
dirs[3] = vec2(-1.0, 0.0);