I found I had the same error. I was compiling a code with both lapack and blas. When I switched the order that the two libraries were called the error went away.
"LAPACK_LIB = -llapack -lblas" worked where
"LAPACK_LIB = -lblas -llapack" gave the error described above.