I’m using ArchLinux. The latest version of FPC (Free Pascal) which is available in the official repo is 2.6.0
$ pacman -Ss fpc community/fpc 2.6.0-1 [installed] The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit Pascal Compiler. It comes with fully TP 7.0 compatible run-time library.
So what if you want to use the development version, which at the time of this post, is 2.7.0? Easy.
First, grab the development snapshot:
svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
Next, build it:
sudo make install INSTALL_PREFIX=/usr
Hmm it seems to be done. So let’s give it a try. Type fpc on your favourite shell.
$ fpc Free Pascal Compiler version 2.6.0 [2012/01/02] for x86_64 Copyright (c) 1993-2011 by Florian Klaempfl and others /usr/lib/fpc/2.6.0/ppcx64 [options] [options]
Wait a sec. This is FPC 2.6.0, and not 2.7.0. There must be an error.
Actually there is no error at all.
$ ls /usr/lib/fpc/ 2.4.4 2.6.0 2.7.1 lexyacc ppcx64
See, the 2.7.1 directory?
$ file /usr/bin/ppcx64 /usr/bin/ppcx64: symbolic link to `/usr/lib/fpc/2.6.0/ppcx64'
Apparently, /usr/bin/ppcx64 is still pointing to /usr/lib/fpc/2.6.0/ppcx64. So, just change the symlink.
$ sudo ln -sf /usr/lib/fpc/2.7.1/ppcx64 /usr/bin/ppcx64
Now try fpc once again:
Free Pascal Compiler version 2.7.1 [2012/03/02] for x86_64 Copyright (c) 1993-2011 by Florian Klaempfl and others /usr/lib/fpc/2.7.1/ppcx64 [options] [options]
That’s it. Now you can use the development snapshot