Sounds like your input string to the glShaderSource function has ended before the compiler could finish parsing.
Check the input string and length.
Check if you have a NULL character where it doesn’t belong.
Try a glGetShaderSourceARB to see if it returns the same as what you’ve wanted.
If you loaded the shader from a file, check the loader (read binary?).