[Lazarus] Lazarus and FPC versions for Ubuntu 10?

ABorka fpc-devel at aborka.com
Mon Sep 27 00:29:40 CEST 2010


OK, here it is guys.
These steps are a little bit raw and some additional apt packages might 
be needed, but it works for me. Also I did not detail how to extract 
tar.gz files and such.

==========================================
Linux install (about 5.6GB disk space is needed to finish, recommended 
at least 10-12GB disk for future Linux/FPC/Lazarus updates):
need VMWare tools for the network and copy/paste.
I use midnight commander (the "mc" apt package) to copy files, change 
owners, create symlinks, edit files, etc., I find it easier.

START:
sudo aptitude install build-essential linux-kernel-headers 
linux-kernel-devel

get the ubuntu updates system/admin../update manager (or "apt-get 
update" , then  "apt-get upgrade" from a terminal window as root or sudo)

need VM reboot for VMWare tools copy paste to work in the terminal 
window.(did not detail how to install/compile VMWare tools)

fpc, lazarus START:

as user xx:
"sudo apt-get install gcc libgtk2.0-dev build-essential libgdk-pixbuf-dev"
"sudo apt-get install mc apache2 mysql-server php5 phpmyadmin 
libapache2-mod-auth-mysql php5-mysql" ....etc. if needed
"sudo apt-get install subversion"
(some people might not need apache or mysql or php5, Im developing web 
apps, so I did)

cd /home/xx

as user xx:
http://www.freepascal.org/download.var (this is a web page) binary 
downloads for latest stable(!) FPC release (needed to compile the latest 
SVN trunk the first time)
ex: wget 
ftp://ftp.freepascal.org/pub/fpc/dist/2.4.0/i386-linux/fpc-2.4.0.i386-linux.tar
extract: binary.i386-linux.tar from it into /home/xx/ for example
then extract from it the "base" and "utils" tars into 
/home/xx/fpc-2.4.0-bootstrap/
then extract these tar.gz files in there.
(owner and group needs to be xx:xx) //not nobody:nogroup
(for windows: ftp://ftp.freepascal.org/pub/fpc/dist/2.4.0/...win64.exe 
or win32  and install it "custom" with utils, make, etc.)

as root (after sudo su -):
copied the bin and lib folders into /usr/local (the bin files will be 
overwritten after new recompile, and the rest are
in their own dir in /usr/local/lib/fpc/2.4.0)

symlink in /bin to the ppc386 in /usr/local/lib/fpc/2.4.0/
  so the "make" can find it (will be overwritten during "make install")

run "/usr/local/lib/fpc/2.4.0/samplecfg /usr/local/lib/fpc/2.4.0 /etc"
(creates a sample fpc.cfg in /etc)

cd /home/xx/
type "fpc" to see if it is working and starts FPC 2.4.0

as user xx (important!):
"svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc_svn" (full fpc 
latest development source code into dir fpc_svn under user xx's home dir)
(to refresh later at any time: from /home/xx as user xx: "svn update 
fpc_svn")

as user xx:
cd /home/xx/fpc_svn
"make clean all"
if it complains about fpcmake -> ../fpc-2.4.0-bootstrap/bin/fpcmake and 
then "make clean all again"
"sudo make install" (everything goes to /usr/local/bin/  , 
/usr/local/lib/fpc/... and /usr/local/share/doc/fpc/.. etc.)

change the symlink in /bin/ppc386 or /bin/fpc to point to 
/usr/local/lib/fpc/2.5.1/ppc386
(where 2.5.1 is the latest SVN version checked out)
as root or sudo -> in /usr/local/lib/fpc/2.5.1/ run "./samplecfg 
/usr/local/lib/fpc/2.5.1/ /etc"
(FPC done, now Lazarus)

cd /home/xx
as user xx:
"sudo apt-get install libx11-dev" (..LX11 missing error during make if 
not installed)
"sudo apt-get install libgtk2.0-dev" (...gdk_pixbuf error during make if 
not installed)

"svn checkout http://svn.freepascal.org/svn/lazarus/trunk/ lazarus_svn"
(full lazarus latest development source code)
(for refreshing the sources in the future: from /home/xx as user xx: 
"svn update lazarus_svn")

cd /home/xx/lazarus_svn
as user xx: "make clean all"

"sudo make install" (everything goes to /usr/local/share/lazarus/)
"make clean" (if wanna free up some space, not really needed, next round 
of make compiling will do it again)

Getting Synapse:
in /home/xx
as user xx
svn checkout https://synalist.svn.sourceforge.net/svnroot/synalist/trunk 
synapse_svn

Getting ZEOS:
in /home/xx
as user xx
wget 
http://downloads.sourceforge.net/project/zeoslib/Zeos%20Database%20Objects/zeosdbo-6.6.6-stable/ZEOSDBO-6.6.6-stable.zip
unzip ZEOS*.zip into a zeos directory there (docs, src, Examples, packages)

"cd ~"  //to get to your home dir
"startlazarus"  //to start lazarus , NOT with sudo or as user root !!!. 
Will complain about FPC sources, this is ok.
set up the fpc source dir in the environment options //ex: /home/xx/fpc_svn/
exit from Lazarus

"startlazarus" again
(complaining about FPC sources is gone)

ZEOS install in Lazarus:
package -> open .lpk file -> zeos/packages/lazarus/zcomponent.lpk -> 
install (rebuilds Lazarus)

package -> install/uninstall packages
add the needed packages (weblaz, lazwebextra, etc.) if there are any and 
do the rebuild from inside Lazarus
(if there is a problem with rebuilding saying that it can't 
find...blahblah then the timestamp is not ok for some files
due to the first svn checkout time delays because of your 
internet/machine speed and because those files are in different
directories maybe, so they were checked out with few seconds difference.
Delete the .pas .lrs of that file and then
Rebuild everything again after an svn update)

DONE.


AB





More information about the Lazarus mailing list