Okay, I got it working, but I still don't understand what was wrong.
After reading that someone had a similar problem here,
I tried removing the -march=k6-2, -mmmx, and -m3dnow compile flags, and it worked. Then I tried adding back the flags one at a time, and found that using -march=k6-2 caused the problem, but -mmmx and -m3dnow could be used without incident.
Could someone explain what the issue was, and why the error happened?