Lazarus

Installation => Linux => Topic started by: nyrell on January 07, 2009, 07:37:41 pm

Title: The way I setup lazarus and FPC on linux
Post by: nyrell on January 07, 2009, 07:37:41 pm
During the last year I discovered FPC and Lazarus and I am very impressed. However I have spent quite some time learning how to install them and setting them up in a way that is easily maintainable. Last time I had to do this I decided to document all the steps so I would remember what to do the next time. Hopefully someone else can find this useful too!

I have learnt most of these solutions from the lazarus web page, this forum and the email lists but I think it might be useful to collect everything in one place.

Note: This is only one way to do it. It seem to work nice for me, but there might be better ways to do it. If you have ideas for improvement feel free to add them to the thread.

I use this setup on my main computer: amd64 running kubuntu 8.04 64 bit

I tried to use it on my laptop: i386 running kubuntu 8.10. But there seem to be some issues with some changes to gtk that would require me to use a development version of fpc to compile the SVN version of lazarus. I didn't want to go into that at the moment so I decided that lazarus 0.9.26 was enough on the laptop.

This thread seems to describe the problem with the SVN version on Kubuntu 8.10: http://forum.lazarus.freepascal.org/index.php/topic,5887.0.html


Installing FPC
Download the fpc binary and unpack it somewhere. I will use:
~/program/fpc-2.2.2

Install it and let it put the binaries somewhere in your path. I will use ~/bin. If you do not have ~/bin in your path you might want to add it:

export PATH=$HOME/bin:$PATH
(You can put this in your ~/.bashrc)

Check that fpc is found correctly by the shell by typing:
which fpc

It should show the path to where you just installed the fpc binaries
(~/bin).

The Lazarus IDE will also need the FPC source code so download that to and unpack it. I will use:
~/program/fpcsrc-2.2.2


Installing Lazarus
The following procedure installs two versions of lazarus, one stable version (0.9.26) and one SVN version. Two different profiles are used to avoid any potential problems coused by differences in the versions.

SVN version
Move to the location where you want to install lazarus (~/program). Checkout the latest Lazarus from svn into the lazarus-svn directory:
svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus-svn

Later on you can update the lazarus svn directory with this comand:
svn update

To build lazarus just move to the directory and type:
make clean all

If you got any errors see "Errors when building lazarus" below.

Verify that Lazarus works by starting it:
./lazarus

If everything went well Lazarus should now start. Most likely it will complain about not beeing able to find the fpc sources. Just ignore this for now and exit Lazarus.


Stable version
Download the latest stable version (0.9.26) from the Lazarus website, and unpack it where you want to install it (~/program/lazarus-0.9.26).

To build lazarus just move to the directory and type:
make clean all

If you got any errors see "Errors when building lazarus" below.

Verify that this version of Lazarus works by starting it like you did
above.


Adding startup scripts
Create the following files somewhere in your path (Ex: ~/bin). Modify the paths to where you installed lazarus.

lazarus-svn:
Code: [Select]
#/bin/sh
cd ~/program/lazarus-svn
./lazarus --primary-config-path=~/.lazarus-svn

lazarus-0.9.26:
Code: [Select]
#/bin/sh
cd ~/program/lazarus-0.9.26
./lazarus --primary-config-path=~/.lazarus-0.9.26

Make both scripts executable by typing:
chmod u+x lazarus-svn
chmod u+x lazarus-0.9.26


Create a symbolic link to the version you wish to use as default. I use the SVN version:
ln -s lazarus-svn lazarus

When you start lazarus with these scripts they will use two different profiles, stored in ~/.lazarus-svn and ~/.lazarus-0.9.26.

If you start lazarus the way you did before, by moving to the lazarus directory and just typing "./lazarus" the default profile directory (~/.lazarus) will be selected. But using the same profile with two versions of the same program could lead to troubles so it is a good idea to avoid this.

Test both scripts to see that they work correctly. When you start Lazarus it will still likely complain about that it can not find the FPC source directory. Correct this by going to Environment->Options->Files->FPC source directory and browse to the directory where you installed the FPC sources (~/program/fpcsrc-2.2.2).


Adding lazarus to the "start"-menu
Now you can add an entry to the "Start" menu, or K menu or whatever it is called in your system.

Let the menu entry point to the symbolic link you just created (~/bin/lazarus), then the menu entry will always  start the version you have selected as default.

If you look in the lazarus directory you can find a nice icon in images/ide_icon48x48.png that you can use for the menu entry.


Errors when building lazarus
Common errors when building lazarus is linking errors like:

/usr/bin/ld: cannot find -lgdk_pixbuf-2.0                         
lazarus.pp(124,1) Error: Error while linking
lazarus.pp(124,1) Fatal: There were 1 errors compiling module,


In the case above the linker complains that it can not find "-lgdk_pixbuf-2.0". This actually means that it failed to find a file called libgdk_pixbuf-2.0.so somewhere in the library path. Usually the libraries are stored under /usr/lib/.

Let's have a look in /usr/lib/:
ls /usr/lib/libgdk_pixbuf-2.0*

If this command finds no matching files, then the library is probably not installed at all.

If you find files that are very similar to the one you are looking for, like libgdk_pixbuf-2.0.so.0, then the library is installed, but you are missing the ".so" file the linker is looking for. This file is usually part of the development package for the library.

So to fix this problem, you should launch the package manager (adept, synaptic, rpmdrake etc) for your linux distriution and search for gdk_pixbuf. Install both the regular package and the development package. In this case I found two packages called libgdk_pixbuf2 and libgdk_pixbuf2-dev that should be installed.

If you have installed both packages and still don't get the ".so" file that the linker needs, then you can create this file manually. Just create a symbolic link like this:
sudo ln -s /usr/lib/libgdk_pixbuf-2.0.so.0 /usr/lib/libgdk_pixbuf-2.0.so

After you have made sure that the linker will find the file it is looking for, try to build lazarus again:
make all


The FAQ (http://wiki.lazarus.freepascal.org/Lazarus_Faq#I_receive_an_error_during_the_linking_that_states_.2Fusr.2Fbin.2Fld_can.27t_find_-l.3Csome_lib.3E) also have more useful information on these problems.

Thanks to Vincent who pointed out that the ".so" files usually are part of the dev package.
Title: Re: The way I setup lazarus and FPC on linux
Post by: Vincent Snijders on January 07, 2009, 08:07:45 pm
Nice article.

I have only one remark. The missing lib problem is usually fixed by installing the development package for the missing lib. See also FAQ (http://wiki.lazarus.freepascal.org/Lazarus_Faq#I_receive_an_error_during_the_linking_that_states_.2Fusr.2Fbin.2Fld_can.27t_find_-l.3Csome_lib.3E).
Title: Re: The way I setup lazarus and FPC on linux
Post by: nyrell on January 07, 2009, 10:08:34 pm
Nice article.

I have only one remark. The missing lib problem is usually fixed by installing the development package for the missing lib. See also FAQ (http://wiki.lazarus.freepascal.org/Lazarus_Faq#I_receive_an_error_during_the_linking_that_states_.2Fusr.2Fbin.2Fld_can.27t_find_-l.3Csome_lib.3E).

Oh... That's good to know! I was not aware of that. Thanks!

Do you know if it is likely that there will be any problems if you manually create the link for the library file?
Title: Re: The way I setup lazarus and FPC on linux
Post by: Vincent Snijders on January 07, 2009, 10:42:28 pm
Do you know if it is likely that there will be any problems if you manually create the link for the library file?
No, I don't know. Maybe you run into trouble if you install that development package later on, or if it is removed or upgraded or whatever.
Title: Re: The way I setup lazarus and FPC on linux
Post by: Sternas Stefanos on January 08, 2009, 12:48:30 am
Try CodeTyphon

http://www.pilotlogic.com/
Title: Re: The way I setup lazarus and FPC on linux
Post by: nyrell on January 09, 2009, 01:30:11 pm
I modified my instructions and added the information about that the development packages contains the ".so" file. No need to manually create symbolic links in /usr/lib if it is not necessary!
Title: Re: The way I setup lazarus and FPC on linux
Post by: mmm4m5m on June 13, 2009, 02:41:16 pm
Thank you. Very simple, very useful. I am new with linux/ubuntu. I read a lot - there are so many docs and talks about installation. It is ubuntu 8.04 and there is some issue with packages - installing lazarus does not install all required packages. Finally I choose to install it this way - simple and easy for upgrade. All is inside my home directory.

Notes about your description in case someone needs more details:
"download fp" - I downloaded "fpc-2.2.4.i386-linux.tar" - single archive and unpack it

"install fp" - I run install.sh, it ask for "install prefix", so I gave a path inside my home directory.

"which fpc" - This command: "PATH=$HOME/bin:$PATH which fpc" - It export PATH only for the next command. Almost the same like "export PATH..." and "which fpc".
You could get info about fpc with this command: "fpc -i".

"install lazarus" - After "make clean all" I decide to try "make clean all LCL_PLATFORM=gtk2" - it works, looks like I had all required packages

"run lazarus" - it ask for fpc sources - I downloaded "fpc-2.2.4.source.tar.gz" and unpack. Then click lazarus menu: environment/options/environment/FPC source directory and select.
From INSTALL.txt: <<The 'FPC Source directory' should point to your fpc source directory. This directory normally ends with /fpc/ or /fpcsrc/ (e.g. /usr/share/fpcsrc or /home/username/freepascal/fpc) and contains directories like 'compiler', 'docs', 'fcl', 'rtl' and 'packages'.>>

"Help for FPC keywords" - I downloaded "fpc-2.2.4-doc-html.tar.gz" and unpack. Then click lazarus menu: environment/options/help/help options/FPC Doc HTML Path (for v0.9.27 or help/configure help/general/fpc doc html path, for v0.9.26.2).
Check "Help for FPC keywords": http://wiki.freepascal.org/Creating_IDE_Help
Title: Re: The way I setup lazarus and FPC on linux
Post by: invarbrass on June 14, 2009, 01:20:27 pm
Thank you. Very simple, very useful. I am new with linux/ubuntu. I read a lot - there are so many docs and talks about installation. It is ubuntu 8.04 and there is some issue with packages - installing lazarus does not install all required packages. Finally I choose to install it this way - simple and easy for upgrade. All is inside my home directory.
The lazarus source package in ubuntu repository has some issues. A lot of components refuse to compile.
Instead, install fpc 2.2.x from official ubuntu repo, but do not install lazarus.
Download lazarus source archive from this site, and build it yourself - it will compile perfectly.
Title: Re: The way I setup lazarus and FPC on linux
Post by: icebit on June 30, 2009, 04:40:25 am
Hello all,

I want to share with you how i installed lazarus on debian etch, manually.
Although i could used deb packages, i decided to install it manually, so the steps could be used in other linux flavor.

So this is the step-by-step:

1- Installed Debian with Desktop option.
2- Installed subversion through APT-GET.
3- Downloaded Lazarus svn to my Home directory with:
    svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
4- Downloaded FPC binaries and source:
    fpc-2.2.4.i386-linux.tar
    fpc-2.2.4.source.tar.gz
5- Created diretory under lazarus for fpc and unziped fpc there:
    tar -xvf fpc-2.2.4.i386-linux.tar
    tar -zxvf fpc-2.2.4.source.tar.gz
6- export PATH=$HOME/lazarus/fpc-2.2.4/bin:$PATH
7- Checked with: which fpc    and    fpc -i
8- Installed libc-dev through APT-GET
9- Installed libgtk2.0-dev through APT-GET
10- After all, compiled lazarus with: make clean all LCL_PLATFORM=gtk2

Launched Lazarus and made configuration in menu environment->options->files and environment->options->debugger->general

Enjoy  :)

Title: Ubuntu 9.04
Post by: klacus on August 31, 2009, 10:01:22 pm
Install was verry simple on ubuntu 9.04.

1. Synaptic / FPC install

2. Only select the program container (Kpackagekit / Software handling), and push install button.... :-)

3 enjoy ..
Title: Re: Ubuntu 9.04
Post by: egrobler on September 22, 2009, 09:37:03 pm
Quote
Install was verry simple on ubuntu 9.04.
1. Synaptic / FPC install

Where do I download this?

Regards
Eric
Title: Re: Ubuntu 9.04
Post by: egrobler on September 22, 2009, 10:08:05 pm

Where do I download this?
[/quote]

I found it!
System > Administration > Synaptic in ubuntu
I then searched for Lazarus and "Applied" the changes.

Regards
Eric
Title: Re: The way I setup lazarus and FPC on linux
Post by: danzman on October 22, 2009, 12:56:57 am
I am just getting my feet wet using Kubuntu. I need to install Lazarus/FreePascal the easiest way.  I am a newbie at this so bear with me. I need to translate some Delphi apps to run on linux.
Title: Re: The way I setup lazarus and FPC on linux
Post by: theo on October 22, 2009, 10:34:43 am
OpenSUSE's 1-Click Install:

http://software.opensuse.org/search?baseproject=openSUSE%3A11.1&p=1&q=lazarus
Title: Re: The way I setup lazarus and FPC on linux
Post by: Ñuño_Martínez on October 23, 2009, 10:25:18 am
What a nice information. :o Thanks man! I must try this. I just use Synaptic to install the packages on my Xubuntu system but I have some issues (i.e. can't use the latest versions of FPC or can't that or another library or package, etc.)
Title: Re: The way I setup lazarus and FPC on linux
Post by: Kjooow on December 04, 2009, 02:27:01 pm
In my Ubuntu 9.04 is all very simply:

1) Download latest linux rpm snapshot from HERE (http://snapshots.lazarus.shikami.org/):
Linux i386
 - Lazarus (needs fpc and fpc-src)
 - fpc
 - fpc sources

2) Move into directory where you downloaded these.
3) Type in terminal (e.g. yesterday builds):

sudo alien -i -c fpc-2.2.4-20091203.i386.rpm
sudo alien -i -c fpc-src-2.2.4-20091203.i386.rpm
sudo alien -i -c lazarus-0.9.29.22930-20091203.i386.rpm

4) The End. Lazarus and fpc are perfectly installed on Ubuntu 9.04 (with icon launcher in menu, under development) in these paths:

/usr/lib/lazarus/
/usr/bin/fpc
/usr/share/fpcsrc/
Title: Re: The way I setup lazarus and FPC on linux
Post by: Mike J on December 23, 2009, 07:44:09 pm
http://wiki.freepascal.org/Getting_Lazarus#Short_version:_get_Lazarus
Title: Re: The way I setup lazarus and FPC on linux
Post by: mbohn on December 27, 2009, 11:59:58 pm
Is this OP a joke of some sort?  I've yet to get Lazarus to work on Ubuntu 9.10 after trying for a few weeks.  I'm sure I'm the only one with this issue and that the OP instructions are totally clear and unambiguous to everyone else.  (Except for those folks who have already given up and moved on with their life).

Here's a bit of feedback on the OP


Quote
Installing FPC
Download the fpc binary and unpack it somewhere. I will use:
~/program/fpc-2.2.2
Download? How? Where? 
Unpack?  How? 

Quote
Install it and let it put the binaries somewhere in your path. I will use ~/bin. If you do not have ~/bin in your path you might want to add it:
Install it? How?
Put the binaries somewhere?  Where? How?

Quote
export PATH=$HOME/bin:$PATH
(You can put this in your ~/.bashrc)
~.bashrc WTF?

Quote
Check that fpc is found correctly by the shell by typing:
which fpc

It should show the path to where you just installed the fpc binaries
(~/bin).
Finally!  A step that makes sense!

Quote

The Lazarus IDE will also need the FPC source code so download that to and unpack it. I will use:
~/program/fpcsrc-2.2.2


Installing Lazarus...


The following procedure installs two versions of lazarus, one stable version (0.9.26) and one SVN version. Two different profiles are used to avoid any potential problems coused by differences in the versions.

Don't get me started.  Two versions?  One stable and one SVN?? Two profiles.  You've got to be joking!

Quote
SVN version
Move to the location where you want to install lazarus (~/program). Checkout the latest Lazarus from svn into the lazarus-svn directory:
svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus-svn

Later on you can update the lazarus svn directory with this comand:
svn update
Right!

Quote
To build lazarus just move to the directory and type:
make clean all
Any particular directory?

Quote
If you got any errors see "Errors when building lazarus" below.
Yep, I'm sure all the answers will be there!

Quote
Verify that Lazarus works by starting it:
./lazarus

If everything went well Lazarus should now start. Most likely it will complain about not beeing able to find the fpc sources. Just ignore this for now and exit Lazarus.
And if everything didn't go well (because it never has yet) ?

Quote
Stable version
Download the latest stable version (0.9.26) from the Lazarus website, and unpack it where you want to install it (~/program/lazarus-0.9.26).
Download how?  Any particular Lazarus website? By any chance is there a link?

Quote
To build lazarus just move to the directory and type:
make clean all
Any particular directory?

Quote
If you got any errors see "Errors when building lazarus" below.
Right!


And were now almost half way through!

Quote
blah blah ...

Is it really supposed to be 50 times harder than installing Lazarus under OSX or Windows?  Why?  I feel like I need to run out and get a Ph.D. in Computer Science from Stanford so I can get this damn thing installed.

Title: Re: The way I setup lazarus and FPC on linux
Post by: Marc on December 28, 2009, 12:09:45 am
Quote
Installing FPC
Download the fpc binary and unpack it somewhere. I will use:
~/program/fpc-2.2.2
Download? How? Where? 
Unpack?  How? 

Serious, if you don't get this far, please stop. Googling on "download fpc binary" gives http://www.freepascal.org/download.var

Title: Re: The way I setup lazarus and FPC on linux
Post by: Mike J on December 28, 2009, 12:13:46 am
  I've yet to get Lazarus to work on Ubuntu 9.10 after trying for a few weeks. 

Did you try the "getlaz" instructions from http://wiki.lazarus.freepascal.org/Getting_Lazarus#Short_version:_get_Lazarus (http://wiki.lazarus.freepascal.org/Getting_Lazarus#Short_version:_get_Lazarus) at all?

I am running Lazarus on Ubuntu 9.10 X64 w/o a hitch using the short version way.

Here they are inline (minus formatting) for reference:

Quote
Short version: get Lazarus

In the sections that follow, there's a complete list of the commands you need to type at the console to download and install Lazarus on an Ubuntu system. If you're impatient, this section will just give you what you need to get it installed without going through every part of the process line by line.

Select and copy the following script, and save it as a file in your home directory named getlaz:

Code: [Select]
#!/bin/sh
 gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F
 gpg --export 6A11800F | apt-key add -
 echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe" \
     >/etc/apt/sources.list.d/lazarus.list
 apt-get update
 apt-get install lazarus

At the shell prompt, type this to prepare the script for execution, and to execute it (you can copy these lines and paste them into your shell using Shift+Insert):

Code: [Select]
chmod +x getlaz
 sudo ./getlaz

The process will download around 100Mb of data from the Lazarus repository and the standard ones. It will take at least five minutes, even with a fast connection. Any time it stops to ask for confirmation of any step, answer "Y" for yes.

When it finishes and returns to the shell prompt, you're set. Look in the "Development" section of your Ubuntu menu; Lazarus will be there and functional.
Title: Re: The way I setup lazarus and FPC on linux
Post by: fredycc on February 15, 2010, 11:46:17 pm
I use this post: http://forum.lazarus.freepascal.org/index.php?topic=6199.15, just One click


I have test it with OpenSuse 11.2 Virtual Machine and runs great, no problems.
Aprox 2 hour for Install OpenSuse, Update OS and install Lazaruz. :)
Title: Re: The way I setup lazarus and FPC on linux
Post by: mike parr on May 05, 2010, 03:53:20 pm
http://wiki.freepascal.org/Getting_Lazarus#Short_version:_get_Lazarus

Yes, the 'short version' does work (even though passting a few lines into  a script file is more than I want to do. )

Ufortunately, it gets the latest devel. version. svn?

I have a major bug in 9.26, and need to move to  a later version (on ubuntu).  Unfortunately, 9.26 is always the one I get.

Mike
 
Title: Re: The way I setup lazarus and FPC on linux
Post by: mike parr on May 05, 2010, 03:58:28 pm
Is this OP a joke of some sort?  I've yet to get Lazarus to work on Ubuntu 9.10 after trying for a few weeks.  I'm sure I'm the only one with this issue and that the OP instructions are totally clear and unambiguous to everyone else.  (Except for those folks who have already given up and moved on with their life).
 

Yes, agree with all this.  Lazarus is really nice, but the whole project needs a user-friendly wrapping.

Mike
Title: Re: The way I setup lazarus and FPC on linux
Post by: mike parr on May 05, 2010, 04:01:13 pm
In my Ubuntu 9.04 is all very simply:

1) Download latest linux rpm snapshot....
 

Ah!  - this looks like an improvement on the other suggestins  - but alien gives me an error - 'unknown tag'  when I enter the first command (with file names amended for the latest version.)

Mike
Title: Re: The way I setup lazarus and FPC on linux
Post by: jhmos on May 07, 2010, 12:32:03 pm
I don't know why you are making it so complicated.
If you want the latest stable install, there are already ubuntu packages that work fine in Ubuntu 9.04. You can use Synaptic to do it all for you after you go into Synaptic->Settings->Repositories->Third Party Software' and add 'deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe' as a repository. If your using Ubuntu 10.04, it already has the latest Lazarus (0.9.28.2) without having to add a Third Party repository.
Title: Re: The way I setup lazarus and FPC on linux
Post by: Zoran on May 07, 2010, 01:17:23 pm
http://wiki.freepascal.org/Getting_Lazarus#Short_version:_get_Lazarus
Ufortunately, it gets the latest devel. version. svn?

No, it gets the latest stable version. It is 0.9.28.2, since last autumn.
Title: Re: The way I setup lazarus and FPC on linux
Post by: marcov on July 05, 2010, 09:52:36 pm
http://wiki.freepascal.org/Getting_Lazarus#Short_version:_get_Lazarus

Yes, the 'short version' does work (even though passting a few lines into  a script file is more than I want to do. )

Then you need to talk to Ubuntu or its packagers team.

They maintain their own packages, policies and the like. Basic .debs are released when FPC or Lazarus are released, only adaptation for specific Ubuntu/Debian demands is needed.


Title: Re: The way I setup lazarus and FPC on linux
Post by: Rangsynth on August 06, 2010, 08:00:42 pm
I just posted this in another topic but then saw that this was here as well, so I am reposting since it might be of help to anyone who wants to run the lazarus in puppy and with minimal time wasted. I was able to get it working in a few minutes on a standard PC. I have puppy linux booted from disk but this will also work with a CD frugal install which puppy does automatically.

---------------------------------

Hello,

I tested Lazarus this morning with Puppy Linux 4.31 and it was simple. No building anything, just link up the right .sfs files in the puppy Bootup Configure utility and then Lazarus was ready to go after reboot.

I downloaded Puppy 4.31, and then devx_431.sfs which is at the same puppy site, and then I got this interesting .sfs that contains a built and ready lazarus from the link at puppyspace.


From: http://petstore.puppyspace.org/s5d/utility/lazarus-0.9.28.2-complete.sfs
To: C:\download\lazarus-0.9.28.2-complete.sfs
Size: 114.4 MB (119,877,632 bytes)
Transferred: 114.4 MB (119,877,632 bytes)

Once rebooted, I found lazarus in the utility menu of the puppy start menu, and then I was able to just run it. The only glitch is that everytime it starts up it wants to save a file called %f, but this is no problem and you can just click Ok and then proceed to using the forms designer and editors like you normally would.

The lazarus is helping a lot with some things I want to port to linux and I would recommend this above approach to anyone who wants to get the lazarus up and running quickly.

The puppy linux 4.31 system runs fast and building and working is overall better in my opinion than when using windows with lazarus, but this must be because the lazarus is a linux program.
Title: Re: The way I setup lazarus and FPC on linux
Post by: vfclists on October 03, 2010, 12:49:49 pm
FWIW here is my 2 cents too.

http://devblog.brahmancreations.com/content/build-scripts-for-installing-freepascal-and-lazarus-from-source

It is setup on Ubuntu 8.04 LTS and should work on even older distrubtions if any dependent libraries are updated.

During the last year I discovered FPC and Lazarus and I am very impressed. However I have spent quite some time learning how to install them and setting them up in a way that is easily maintainable.
---- snip
Title: Re: The way I setup lazarus and FPC on linux
Post by: fbadriawan on February 10, 2011, 03:50:54 am
I have my own script to build FPC, FPC Sources, FPC Cros Win32 and Lazarus IDE

here the link: http://www.ziddu.com/downloadlink/13743573/build_fpc_laz_ubuntu.zip
Title: Re: The way I setup lazarus and FPC on linux
Post by: tatamata on June 07, 2011, 09:05:09 am
For Puppy Linux lovers,

I have prepared Puppy linux PET package for Lazarus 0.9.30 + fpc 2.4.2 with cross-compiling to win32.
Download PET from here:
http://www.4shared.com/file/q_aktBSR/Lazarus-09300-fpc-242.html (http://www.4shared.com/file/q_aktBSR/Lazarus-09300-fpc-242.html)

Even Zeosdbo is preinstalled.
Title: Re: The way I setup lazarus and FPC on linux
Post by: TurboRascal on October 14, 2011, 08:20:31 pm
I currently use the following procedure to install Fixes snapshots on Ubuntu Lucid since other ways have proved quite hard to me:

- add lazarus testing repository to software sources
- install current FPC from the repository
- download Lazarus source, unpack and compile with "make clean all" then if compilation went ok, I do "make install" so it gets installed to /usr/local/share/lazarus
- manually setup links, icons etc.

If you need newer Lazarus, like next release testing snapshots, or from SVN, download and install newer FPC debs from the snapshot page.

I've chosen this path since fresh Lazarus debs won't install on my system because of dependency problems, but manual install is just as easy and with no obvious drawbacks. I install FPC from the repositories/debs since the installation works flawlessly, yet manually installing it can be a pain...
Title: Re: The way I setup lazarus and FPC on linux
Post by: brunof on February 14, 2012, 04:18:23 pm
Nice post! :D

I did install on a virtual machine Ubuntu 10.04 LTS via Synaptic.
Later i ahve to install the packges:

sudo apt-get install fpc-source mysql-client-5.1 mysql-server-5.1 libmysqlclient15-dev

Without problems.
Title: Re: The way I setup lazarus and FPC on linux
Post by: mdlueck on June 12, 2012, 02:53:29 pm
I've chosen this path since fresh Lazarus debs won't install on my system because of dependency problems, but manual install is just as easy and with no obvious drawbacks. I install FPC from the repositories/debs since the installation works flawlessly, yet manually installing it can be a pain...

Which is what I have slammed into with my Ubuntu Linux Lucid 10.04 LTS system. Why oh why were the packages of Lazarus built to require something higher than 10.04 whereas the FPC packages automatically updated to the 2.6 version without much trouble at all?

Is there package compatibility problems with building the Laz packages on a 10.04 box and attempting to deploy to a newer release of Ubuntu?
Title: Re: The way I setup lazarus and FPC on linux
Post by: new2linux on October 01, 2014, 02:26:40 pm
Is this thread still relevant?

I didn't have any problems installing Lazarus, on various machines and occasions, except for the outdated version in the Ubuntu etc Software Channel (which is a pity).

I suggest we unpin this thread, it scares people ;) I didn't read through it all though. The gist could go to the wiki.
Title: Re: The way I setup lazarus and FPC on linux
Post by: Ñuño_Martínez on October 02, 2014, 11:08:04 am
Agree.  This thread born when Lazarus was far from version 1.0.0.  Should be unpinned.
Title: Re: The way I setup lazarus and FPC on linux
Post by: marcov on October 02, 2014, 11:49:44 am
Done. Mostly because it was never updated for current distros. (though somethings like that Debian/Ubuntu versions are generally old are universal)
Title: Re: The way I setup lazarus and FPC on linux
Post by: SephirothsHell on December 07, 2014, 05:38:26 pm
Is this thread still relevant?

I didn't have any problems installing Lazarus, on various machines and occasions, except for the outdated version in the Ubuntu etc Software Channel (which is a pity).

I suggest we unpin this thread, it scares people ;) I didn't read through it all though. The gist could go to the wiki.

Actually I am currently having some problems installing Lazarus on PinGuyOS (Ubuntu 14.04) and it has something to do with  "FCC". It keeps being deleted by the "fpc_2.6.4-140420_i386.deb" file. If I reinstall FCC (I have done it a couple of time according to this: http://www.sysads.co.uk/2014/07/install-gcc-gnu-4-9-1-on-ubuntu-14-04/) it is just deleted again when I try to install FPC.

Any ideas how to fix this?

Thanks.
Title: Re: The way I setup lazarus and FPC on linux
Post by: marcov on December 08, 2014, 04:25:56 pm
I assume you installed FPC first, and then gcc.

Afaik FPC tries to get the path from gcc to configure itself, it is the -Fl and -FD lines in fpc.cfg.  Check those.

IIRC fpcmkcfg and/or samplecfg (in share or doc directory) can be used to regenerate FPC's fpc.cfg.
Title: Re: The way I setup lazarus and FPC on linux
Post by: SephirothsHell on December 10, 2014, 06:02:38 am
Hi marcov,

GCC was initially installed but as I tried to install FPC required GCC removal (as far as I understand).

When I check the lines you suggested on fpc.cfg I see this:

***
# path to the gcclib



# searchpath for libraries
#-Fl/usr/lib/fpc/$fpcversion/lib
#-Fl/lib;/usr/lib
-Fl/usr/lib/fpc/$fpcversion/lib/$FPCTARGET

# searchpath for tools
-FD/usr/lib/fpc/$fpcversion/bin/$FPCTARGET

***

I'm not sure how could I regenerate FPC's fpc.cfg using those files you pointed. They don't seem to do anything at all.
TinyPortal © 2005-2018