So, the graphics-sprite.cpp example works fine for me on Arch Linux, whereas on Xubuntu it gave me the same problem it is giving you. This leads me to believe the problem has to do with Ubuntu.
Are you using 32 bit or 64 bit Ubuntu? I was using 64 bit Xubuntu and am now using 64 bit Arch.