SRL Archive - Todo

[Unfinished] How to get your own FPC and Lazarus


Wizzup?

2009-12-10 16:02:53

[ This is unfinished work ]

Linux:

Very quickly and undetailed.
Install FPC 2.2.4 from the package manager repos.
checkout the fpc repos
checkout the lazarus repos
make all @ fpc repos
sudo make install @ fpc repos
make sure the path FPC links to the correct fpc (2.5.1, not 2.2.4):

32bit compiler is ppc386. 64 bit compiler is ppcx64. Replace ppc386 accordingly.

First, check what it links to:

$ ls -l `which ppc386`
lrwxrwxrwx 1 root root 31 2009-11-11 22:48 /usr/bin/ppc386 -> /usr/local/lib/fpc/2.5.1/ppc386

Mine is already up to date. If you installed it for the first time, it will probably link to

$ ls -l `which ppc386`
lrwxrwxrwx 1 root root 31 2009-11-11 22:48 /usr/bin/ppc386 -> /usr/local/lib/fpc/2.2.4/ppc386

Changing this is simple.

Enter a root shell with sudo -s -H

# mv /usr/bin/ppc386 /usr/bin/ppc386old
# ln -s /usr/local/lib/fpc/2.5.1/ppc386 /usr/bin/ppc386
# exit

Now, run this again to verify ppc386 links to the correct binary.

$ ls -l `which ppc386`
lrwxrwxrwx 1 root root 31 2009-11-11 22:48 /usr/bin/ppc386 -> /usr/local/lib/fpc/2.5.1/ppc386

Now, run fpc:
$ fpc -v
Free Pascal Compiler version 2.5.1 [2009/12/05] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Fatal: No source file name in command line
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)


And you're done!

** lazarus
make all @ laz repos

Windows:

download fpc 2.4.0, install it.
checkout the fpc source repos.
cd to the fpc source. type
make clean all
make install

This will create C:/pp/.
Now check out the lazarus source, cd to it, and then type
make all PP=C:\pp\path\to\ppc386.exe

You may have to tweak fpc.cfg, but just ask about it when you run into problems.

Nava2

2009-12-10 16:10:15

Why do I feel this is targeted at me.. :)

Isn't Laz ``make clean all'' for install?

Wizzup?

2009-12-10 16:27:51

From: Nava2
Why do I feel this is targeted at me.. :)

Isn't Laz ``make clean all'' for install?


``make clean'' is when recompiling lazarus. If you compile it the first time you don't need it. I'll add it later. This needs to be extended a lot anyway.

And no, it is not aimed at you really. :)

Cazax

2009-12-11 06:26:39

This would have helped me but I managed to do it :) Ofc I asked some things to Wizzup. Also, the Lazarus wiki has an installation guide: http://wiki.lazarus.freepascal.org/Getting_Lazarus

Dgby714

2010-02-11 05:23:00

for some reason these things never liek working for me….

C:\lazarus>make all PP=C:\pp\bin\i386-win32\ppc386.exe
make -C lcl all
make[1]: Entering directory `C:/lazarus/lcl'
C:/FPC/2.4.0/bin/i386-win32/rm.exe -f units/i386-win32/alllclunits.ppu
C:/pp/bin/i386-win32/ppc386.exe -gl -Fu. -Fuforms -Fuwidgetset -Fiinclude -FE.
-FUunits/i386-win32 -di386 alllclunits.pp
Fatal: Can't find unit Contnrs used by Masks
Fatal: Compilation aborted
make[1]: *** [alllclunits.ppu] Error 1
make[1]: Leaving directory `C:/lazarus/lcl'
make: *** [lcl] Error 2

Wizzup?

2010-02-11 09:47:35

You need to edit fpc.cfg so it points to the proper directory.

Anyway… as an update… You no longer need FPC 2.5.1
FPC 2.4.0 will do. (It's downloadable as installer)

Ron

2010-03-28 02:16:12

In Ubuntu, you can install FPC lazarus using this command:
sudo apt-get install lazarus


~Ron

Wizzup?

2010-03-28 04:47:44

From: Ron
In Ubuntu, you can install FPC lazarus using this command:


~Ron


Yes, but you may need a more recent version. In Ubuntu (BETA) 10.04 there is FPC 2.4.0, so you could then install fpc with apt-get, but Lazarus will most likely still have to be installed from SVN. (get the sources from their svn repos -> make clean all)