IIRC people encountered such errors in some Lazarus versions. Please install the latest 4.0 instead. Or build from fixes_4 branch which is close to a soon to come 4.2 version.
BTW, there is a forum section for Lazarus IDE usage, too. This section is for Pascal language beginners stuff.