Actually it worked for a while, but when I tried it again to verify that I no longer needed some of the mesa-dev packages, it broke. I’ve put all the packages I took out back in and I still get:
ld: cannot find -lGL
[size=150]Edit[/size]:
I was able to fix this by manually relinking libGL.so. I guess removing the Mesa packages broke them. For anyone else who has this problem, make sure that:
ls -lah /usr/lib/libGL.so
ls -lah /usr/lib32/libGL.so
ls -lah /usr/lib64/libGL.so
all point to a valid library. On my machine, 2/3 pointed to ./libGL.so.1 and the 3rd pointed to mesa/libGL.so (which was no longer valid). I just replaced the broken link with a link to ./libGL.so.1 and it worked.