Anthony Walter wrote on Mon, 02 Apr 2012:

I have installed fpc from sources before but it's been a while and I've
forgotten how to get it done, or perhaps something has changed and  need
some help.

When i am trying to do is install and run the latest version of fpc from my
home folder. Here is what I did:

# first I got a working version of fpc installed using
sudo apt-get install fpc

# then i made a ~/fpc and got a copy fpc sources there
svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus

Those are not the FPC sources, but the Lazarus sources. The fpc sources are in http://svn.freepascal.org/svn/fpc/trunk

# finally did a make all follow by make install to my home folder
make all
make install
make install INSTALL_PREFIX=/home/myusername

This first installs everything in the root (make install), and then again in your home directory (make install INSTALL_PREFIX=...). That may not be what you want.

Great success! Now I have a ~/bin (/home/myusername/bin) folder with all
the fpc binaries as well as ~/share and ~/lib. Then
put /home/myusername/bin in my path.

If you did in fact compile and install FPC rather than Lazarus (it's better to copy/paste the actually executed commands rather than typing everything again from memory): the "fpc" binary looks for a compiler binary in its own directory, and if it doesn't find it there then it will look for it in the PATH.

However, "make install" does not create/overwrite any symbolic links to the actual compiler binaries in the $INSTALL_PREFIX/bin, so as not to change the default compiler version that has potentially already been installed in that same prefix. This means that the new fpc will still find the old (symlink to the) compiler binary in /usr/bin.

If you do want to change the default compiler, also execute the following command: make FPC=`pwd`/compiler/ppc386 -C compiler installsymlink INSTALL_PREFIX=/home/myusername

(replace ppc386 with ppcx64 if you built an x86-64 compiler)


Jonas

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to