You can build Lazarus in following steps:
1.Download fpcsrc****.tgz
2.extract it to i.e. /home/xxx/fpc
3.Copy the makepack script form /home/xxx/fpc/install to the fpc-root dir. I.e. to /home/xxx/fpc
4.run makepack
5.now you have an file named fpc-xxx.tar
6.extract it
7.run ./install.sh
8.if you run fpc then it must show as version your new compiled version
9.if it show an ppc386 error, create a new link in /usr/local/bin with :
ln -sf /usr/local/lib/fpc/1.9.3/ppc386 /usr/local/bin/ppc386
10.extract the lazarus source
11.run make
12.if you get the error GLIB not found, edit the fpc.cfg
include
-Fu/usr/local/lib/fpc/$version/units/$target
-Fu/usr/local/lib/fpc/$version/units/$target/*
-Fu/usr/local/lib/fpc/$version/units/$target/rtl
and run make