Lazarus

Installation => Linux => Topic started by: knuckles on December 23, 2016, 11:15:11 pm

Title: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: knuckles on December 23, 2016, 11:15:11 pm
Ok let me first start by saying I am very much a beginner with Linux, I have used it in the past for short amounts of time just out of curiosity. I have now just installed Linux Mint alongside Windows 10 as a dual boot and would like to get Lazarus setup on the Linux OS but am finding it rather confusing so would appreciate some help.

As of now the latest Lazarus version is 1.6.2 and I believe FPC 3.0.0

Now this is where I am unsure what steps to take, I noticed you can obviously download Lazarus from the Downloads page but am unsure what exactly to download.

I have instead (and likely wrong approach) searched Lazarus from the Software Manager and tried installing from there (though it is only Lazarus 1.6). This did not work however as when launching the IDE it says it is missing rtl and fpc sources etc. I skipped this part just to see how the IDE looked in Linux Mint and came across some strange issues with the Form Designer, for example if I moved the Form Designer and clicked a control from the Tool palette at the top the designer window moves back to its original position. Of course this is all meaningless because the IDE is not functioning anyway.

Since then I have reinstalled Linux Mint anyway so I am back on a clean install and would love to get Lazarus up and running.

How exactly do I install the latest Lazarus and FPC on Linux Mint?

Thanks :)
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: knuckles on December 23, 2016, 11:46:25 pm
I am using Linux Mint 18.1 Serena (Cinnamon 64-bit) if that helps.
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: howardpc on December 23, 2016, 11:56:17 pm
Click the Downloads (Laz+FPC) link on the left panel of this forum.
Then click on the Lazarus Linux amd64 DEB link.
This will download a file named lazarus_1.6-0_amd64.deb to your downloads directory.
Once the file has downloaded successfully, double-click it, and supply your password.
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: minesadorada on December 23, 2016, 11:57:07 pm
I would recommend fpcupdeluxe (http://forum.lazarus.freepascal.org/index.php/topic,34645.0.html (http://forum.lazarus.freepascal.org/index.php/topic,34645.0.html)) as the best method for Linux Mint which worked for me.

Latest version: https://github.com/newpascal/fpcupdeluxe/releases/tag/v1.2.0 (https://github.com/newpascal/fpcupdeluxe/releases/tag/v1.2.0)
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: knuckles on December 24, 2016, 02:49:21 am
Click the Downloads (Laz+FPC) link on the left panel of this forum.
Then click on the Lazarus Linux amd64 DEB link.
This will download a file named lazarus_1.6-0_amd64.deb to your downloads directory.
Once the file has downloaded successfully, double-click it, and supply your password.

Thanks.

I have just tried this and v1.6.2 is now installed but there are two issues I am currently looking for a solution to.

The first is Interfaces.pp cannot be found by project:

Quote
project1.lpr(9,3) Fatal: Cannot find Interfaces used by Project1. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=/usr/share/lazarus/1.6.2/lcl/units/x86_64-linux/gtk2/interfaces.ppu. Clean up package "LCL"..

I guess the paths are setup wrong or I need to rebuild LCL package or something.

The second issue is as I mentioned earlier, move Form1 around and then click a control from the Tool palette at the top and the Form Designer keeps jumping back.
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: JuhaManninen on December 24, 2016, 11:17:35 am
You should have uninstalled your previous attempts first.
Do that and also remove the local config dir ~/.lazarus.
Then install DEB packages for FPC, FPC sources and Lazarus.
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: wp on December 24, 2016, 02:15:35 pm
I would recommend fpcupdeluxe (http://forum.lazarus.freepascal.org/index.php/topic,34645.0.html (http://forum.lazarus.freepascal.org/index.php/topic,34645.0.html)) as the best method for Linux Mint which worked for me.
Really? In my Mint VM it crashes without any message after checking out fpc. Is there a way to create a log file?
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: knuckles on December 24, 2016, 02:23:53 pm
You should have uninstalled your previous attempts first.
Do that and also remove the local config dir ~/.lazarus.
Then install DEB packages for FPC, FPC sources and Lazarus.

Well not been too Linux savvy I was not sure if everything would be clean by uninstalling Lazarus from the Package Manager so I did a clean wipe and install of Linux Mint before installing Lazarus the way howardpc mentioned. So that is all I have done so far, clean Linux install and clean Lazarus install.
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: JuhaManninen on December 24, 2016, 02:55:46 pm
How did you create the project? After a clean install, if you do
  Project -> New Project -> Application
... then press F9 (Run) but Interfaces.pp still cannot be found, then I don't know what is happening.
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: DonAlfredo on December 24, 2016, 03:31:23 pm
@wp

There was a problem with a bootstrapper with fpcupdeluxe.
Trunk has a makefile that mentions 3.0.2 as a valid bootstrapper, but there is (yet) no 3.0.2 !

Temporary fix available:
https://github.com/newpascal/fpcupdeluxe/releases/tag/v1.2.0a
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: knuckles on December 24, 2016, 04:22:53 pm
How did you create the project? After a clean install, if you do
  Project -> New Project -> Application
... then press F9 (Run) but Interfaces.pp still cannot be found, then I don't know what is happening.

Exactly, create a new project and try to run and I get that error, same with trying to build the ide.

My environment settings look like this if it helps: http://i67.tinypic.com/xm500k.jpg (http://i67.tinypic.com/xm500k.jpg)
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: knuckles on December 24, 2016, 04:55:29 pm
Ok I removed lazarus and fpc from Synaptic Package Manager, then installed FPC, FPC source and Lazarus deb files and now can compile and rebuild ide.

But the form designer still acts strange, as soon as you select a control from the Standard tab for example a TButton the Form designer jumps back to original position.

EDIT: Have made a new question for this problem: http://forum.lazarus.freepascal.org/index.php/topic,35218.0.html (http://forum.lazarus.freepascal.org/index.php/topic,35218.0.html)
Title: Re: How to install latest Lazarus on Linux Mint?
Post by: wp on December 24, 2016, 05:54:21 pm
@wp

There was a problem with a bootstrapper with fpcupdeluxe.
Trunk has a makefile that mentions 3.0.2 as a valid bootstrapper, but there is (yet) no 3.0.2 !

Temporary fix available:
https://github.com/newpascal/fpcupdeluxe/releases/tag/v1.2.0a (https://github.com/newpascal/fpcupdeluxe/releases/tag/v1.2.0a)

Sorry - same problem, also with stable+stable ("Stable" button in bottom bar)
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: Bitbeisser on January 11, 2017, 07:57:55 pm
Ok, tried to install on a clean, fresh install of Linux Mint 18 (so fresh and clean that as usual, the wireless networking doesn't work, but wired connection is fine).
Downloaded the three files from sourceforge and installed without error in the order compiler, IDE and lastly source.
However, when I try and start the IDE afterwards, the small settings windows pops up (as it usually does on Windows and Mac too) but with the error that it can't find the LCL?  :-\

Ralf
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: Bitbeisser on January 14, 2017, 08:58:37 am
Wipe in previous install and downloaded the packages for compiler, sources and Lazarus again and it is working now.
What changed over the previous attempt(s) is that this time, is that installed the sources right after the compiler but before the IDE and I used the newly renamed "lazarus_project*.deb" file instead of the previously one just named "lazarus*.deb".

Mint (18.1 Mate, btw) still complained that there would be a newer version in their repository and it would be recommended to use that one.
And when checking the Update Manager, it offers an fpc package named "3.0.0+dfsg-2", but so far I have resisted to tag this one for install...  :-\

Ralf
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: Awesome Programmer on May 10, 2017, 05:58:59 pm
DO YOU MUST REMOVE THE PREVIOUS INSTALL? If so, is there a way to preserve the old installation just in case your new installation doesn't work.
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: JuhaManninen on May 10, 2017, 06:51:57 pm
DO YOU MUST REMOVE THE PREVIOUS INSTALL?
Previous FPC or previous Lazarus? They are separate things.
Apparently many people have problems with .deb packages.
A certain way to install FPC is to use their install script. Yes you should uninstall previous versions before that.
You can have many versions of FPC but then you must know what you are doing.
Once FPC works you can compile Lazarus from sources. You can easily have many versions of Lazarus, just start them from their own directories.

There is even a better way to prevent any installation hassle. Use a rolling Linux distro which has the latest versions of everything. I use Manjaro myself.
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: marcov on May 10, 2017, 07:00:29 pm
DO YOU MUST REMOVE THE PREVIOUS INSTALL? If so, is there a way to preserve the old installation just in case your new installation doesn't work.

Sure, save the original installation files.

The problem with *nix here is that certain file locations are doubly used, specially the files that go into <prefix>/bin

I solve this by only doing local installs in various prefixes (~/rel300 ~/rel302 ~/trunk) etc and having a ~/lib that has symlinks to the lib directories of those (to keep fpc.cfg simple) then have a shell script that can erase and recreate symlinks for all files in ~/bin/

These installs are from the .tar (or even make), but afaik nearly all package systems allow you to install into a specified directory, and then it only the matter of making a script with  a bunch of symlinks.
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: timbo347 on May 18, 2017, 01:21:11 pm
Hi all,

This is my first post on this forum, so hello to everyone.  :D

I'm not exactly a Linux newbie (my first Slackware installation was in 1994), but I'm having big problems installing fp fp-source and Lazarus IDE on Mint 18.1:

After every failure, I do a a complete uninstall with both the package manager and by removing fp and Lazarus references manually.

I've tried installing with apt and the software manager - installing fp, fp source and the IDE. When the IDE runs, it gives an error message: 'packager/globallinks' not found, and the toolbar lacks the component palette.

I've downloaded the latest .deb files from Sourceforge (fpc_3.0.2... fpc-src_3.02... and  lazarus-project_16.4-0...
fp and fp source claim to have loaded, but the IDE deb installer tells me that 'links cannot be satisfied', and won't go further.

I've also tried the older 3.0.0 and 1.6 .deb packages, which install to completion, but still giving the packager/globallinks error, and still missing the component palette.

I'm beginning to think that the Lazarus packaging is broken (or perhaps my brain is  :o )

I've recently bitten the bullet and no longer have a Windoze installation, and the only thing I miss in my wholesale move to Linux is Lazarus. So: HELP!

Thanks a lot in advance - Tim
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: Handoko on May 18, 2017, 03:18:58 pm
Hello timbo347,
Welcome to the forum

I'm not familiar with Linux Mint, but I found that this link below may be can help you:

http://forum.lazarus.freepascal.org/index.php/topic,27065.msg167129.html
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: Handoko on May 18, 2017, 03:24:27 pm
I've just remembered, in some cases, you may need to install these things:

- libx11-dev
- libgtk2.0-dev
- libgdk-pixbuf2.0-dev
- libcairo2-dev
- libpango1.0-dev
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: Zoran on May 18, 2017, 03:47:41 pm
Tim, I use Linux Mint and, instead of deb packages, here is what I do:

1. Chose fpc download section according to your os bitness (for example: https://www.freepascal.org/down/x86_64/linux-hungary.var (https://www.freepascal.org/down/x86_64/linux-hungary.var)) and, instead of deb package, chose "Download in 1 big file".

2. Unpack in a folder. From terminal, cd in this folder and type "sh ./install.sh". The fpc installation will start. First it will ask you for "prefix", that is the folder where fpc will be installed. Chose a path under your user folder, so that you will not need super user rights (eg. $HOME/fpc). The install process will continue, just answer yes to all further questions.

3. Download fpc sources (https://www.freepascal.org/down/source/sources.var) and unpack them.

4. Download lazarus sources. You can dowload lazarus sources from here https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%201.8.0RC1/ (https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%201.8.0RC1/)

4a. Now, before building lazarus, you will probably need to install these libraries:
sudo apt-get install build-essential
sudo apt-get install libgtk2.0-dev
sudo apt-get install libgdk-pixbuf2.0-dev

5. In terminal cd to lazarus folder and type these lines (first add your fpc/bin path to PATH variable, then compile lazarus):
PATH=$HOME/fpc/bin:$PATH
make clean bigide

6. Try to start lazarus:
./startlazarus

In Lazarus IDE, set fpc folder and fpc sources folder according to steps 2 and 3 above.

It should work...
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: timbo347 on May 20, 2017, 11:17:40 am
It did work...

You, Sir, are a true Hero!

Thank you - Lazarus 1.8 is up and running, and I'll be porting all my old projects.

Much impressed - Tim ::)
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: Zoran on May 20, 2017, 12:18:09 pm
Much impressed - Tim ::)

Thanks, I assume there is no deliberate irony in these rolling eyes. :)

I'd like to add one more thing which should be done -- install chm help in the IDE:

7. Downolad chm files (https://sourceforge.net/projects/lazarus/files/Lazarus%20Documentation/Lazarus%201.8.0RC1/ (https://sourceforge.net/projects/lazarus/files/Lazarus%20Documentation/Lazarus%201.8.0RC1/)), unpack and then adjust chm help path in Lazarus IDE:
From main menu open Tools->Options... in tree view on the left side go down and select Help, then on the right side select "CHM help" and set HelpFilesPath to the folder with these chm files.
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: timbo347 on May 22, 2017, 10:21:12 pm
A bad choice of emoticon - it looked appropriate at the time! I certainly didn't see it as eye-rolling - perhaps as looking up to you? (creep over)

Thanks for the additional advice too.

One thing I found - I needed to make the addition to PATH permanent by adding it to .profile - this avoids the compiler barfing when you run.

Tim

Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: Zoran on May 23, 2017, 07:44:55 am
I certainly didn't see it as eye-rolling
Yes, I knew it. :)

One thing I found - I needed to make the addition to PATH permanent by adding it to .profile - this avoids the compiler barfing when you run.

Yes.
Although, I don't think that Lazarus needs it if you set full fpc path in the IDE (in Options->Environment->Files, Compiler Executable), you might need it for compiling outside the IDE.
Title: Re: [SOLVED] How to install latest Lazarus on Linux Mint?
Post by: circular on March 01, 2019, 01:49:26 pm
If you have already installed an older version of Lazarus and that there is a conflict with DEB packages you just downloaded, you won't be told by the GUI application for packages. Instead use the command line :
Code: Bash  [Select][+][-]
  1. apt deb fpc-src_3.0.4-2_amd64.deb
  2. apt deb fpc-laz_3.0.4-1_amd64.deb
  3. apt deb lazarus-project_2.0.0-0_amd64.deb
You will know then what can be causing trouble.
TinyPortal © 2005-2018