Yes i've had this message once
I forgot to say i'm a newbie and I use Knoppix (Debian based)
I've tried make uninstall, make clean, apt-get install flex and I've the 2.5.31-16 version
Then one more time make and one more time the same error
Oh may be it need's a ldconfig ?