You can't upgrade the free pascal compiler on raspian because I think its shipped with the wrong arm libraries. If you try to make fpc on raspian this is what you get.
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/prt0.o arm/prt0.as
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/cprt0.o arm/cprt0.as
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/gprt0.o arm/gprt0.as
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as
/home/pi/fpc-2.6.0/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../un ix -Fiarm -FE. -FU/home/pi/fpc-2.6.0/rtl/units/arm-linux -darm -dRELEASE -Us -Sg system.pp
An unhandled exception occurred at $0002F054 :
EAccessViolation : Access violation
$0002F054
$000213A0
$0001DC64
I think i've figured out what is going wrong. I need a new compiler for raspian wheezy as it is an arm hard float system armhf. In other words I think what is needed is a new target "linux armhf", or "raspbian armhf" for free pascal.
The arm libraries supplied with fpc 2.6.0 don't work with the raspberry pi running raspian. When I tried to compile fpc 2.6.0 this is what happend.
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/prt0.o arm/prt0.as
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/cprt0.o arm/cprt0.as
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/gprt0.o arm/gprt0.as
as -o /home/pi/fpc-2.6.0/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as
/home/pi/fpc-2.6.0/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../un ix -Fiarm -FE. -FU/home/pi/fpc-2.6.0/rtl/units/arm-linux -darm -dRELEASE -Us -Sg system.pp
An unhandled exception occurred at $0002F054 :
EAccessViolation : Access violation
$0002F054
$000213A0
$0001DC64
I strongly suspect this is why the debugger won't compile for lazarus as well. I haven't been using free pascal for long and I don't have the expertise yet, to sort these errors out for myself. I can compile most programs using fpc, but signicantly I can't make a new version of fpc or lazarus. I may try a soft float wheezy image to see if I can compile fpc ( the free pascal compiler ).
Obviously somebody managed to make the current fpc version using a cross compiler, but I don't think its currently possible to make an upgraded version using the zipped sources from the free pascal web site under raspbian.
