Recent

Author Topic: Installing Lazarus 1.8.4 on Ubuntu 18.04  (Read 72910 times)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #15 on: June 08, 2018, 04:51:19 pm »
I've made this thread sticky. The idea is to gather some debian/mate/ubuntu related issues here, hopefully resulting in a general upgrade advisory.

(I usually zap ~/.lazarus, which means I have to reenter settings. But usually that is still less work for me, since I don't customize that much)

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #16 on: June 08, 2018, 05:59:41 pm »
I customized the color scheme, window positions and many things. I want to keep the settings.

garlar27

  • Hero Member
  • *****
  • Posts: 652
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #17 on: June 08, 2018, 06:05:30 pm »
Every time I have a problem installing on Linux I try to keep a record of what I did.
Last time I installed Lazarus (1.8.2) on Ubuntu (16.4) with a non developer profile so I had to install several libraries:

Code: Pascal  [Select][+][-]
  1.         Detail of dependencies:
  2.               o------------------o----------------------o
  3.               |   MESSAGE        |    INSTALL           |      COMMAND
  4.               O==================O======================O======================================
  5.            o- | -lgtk-x11-2.0    |                      | (Restart if needed)
  6.               | -lgdk-x11-2.0    | libgtk2.0-dev        | sudo apt-get install libgtk2.0-dev
  7.               o------------------o----------------------o
  8.            o- | -lX11            | libx11-dev           | sudo apt-get install libx11-dev
  9.               o------------------o----------------------o
  10.            o- | -lgdk_pixbuf-2.0 |                      |
  11.            o- | -lgobject-2.0    |                      |
  12.            o- | -lglib-2.0       |                      |
  13.            o- | -lgthread-2.0    |                      |
  14.            o- | -lgmodule-2.0    | libgdk-pixbuf2.0-dev | sudo apt-get install libgdk-pixbuf2.0-dev
  15.               o------------------o----------------------o
  16.            o- | -lpango-1.0      |                      |
  17.            o- | -lcairo          |                      |
  18.            o- | -lpangocairo-1.0 | libpango1.0-dev      | sudo apt-get install libpango1.0-dev
  19.               o------------------o----------------------o
  20.            o- | -latk-1.0        | libatk1.0-dev        | sudo apt-get install libatk1.0-dev
  21.               o------------------o----------------------o
  22.               Some Package Dependencies
  23.               o------------------o----------------------o
  24.               |   MESSAGE        |    INSTALL           |      COMMAND
  25.               O==================O======================O======================================
  26.            o- | -lGL             | libgl1-mesa-dev      | sudo apt-get install libgl1-mesa-dev
  27.               o------------------o----------------------o
  28.            o- | -lcl             | libcl.so             | look here http://forum.lazarus.freepascal.org/index.php?topic=28053.15
  29.               o------------------o----------------------o
  30.  
I hope it helps

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #18 on: June 08, 2018, 06:08:48 pm »
+1 @garlar27

tudi_x

  • Hero Member
  • *****
  • Posts: 532
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #19 on: June 09, 2018, 02:18:02 pm »
http://wiki.lazarus.freepascal.org/BGRA_Installation_on_Linux updated with Linux MINT 19 XFCE beta.
Linux MINT 19 XFCE is based on Ubuntu 18.04 and more user friendly.
Lazarus 2.0.2 64b on Debian LXDE 10

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #20 on: June 12, 2018, 08:27:26 am »
I updated the first post (update2), how to check if the fpc is in the update list.

Read here if anyone interested to know how to use Synaptic Package Manager to see apps/libs that are in the update list:
https://forum.lazarus.freepascal.org/index.php/topic,41326.msg288471.html#msg288471

guest61674

  • Guest
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #21 on: June 23, 2018, 06:09:17 pm »
There is no need to restart Linux, Everyone has to know that Linux is not Windows to restart.
With a single command I installed the versions informed using the Terminal without needing to install Gdebi nor Synaptic:

Quote
sudo dpkg -i *.deb

The deb files should all be in a folder and the terminal also

Sorry if the translation was not good (Google Translate).

I have been a Linux expert for many years.

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #22 on: June 23, 2018, 08:08:27 pm »
In some very rare cases, you really need to restart your computer. I ever had such problem at least twice.

Linux is sometimes as stupid as Windows, especially when you installing/uninstalling certain libraries. Rare but it is true. For example, you can try:
fresh install Linux with Nvidia VGA, if you don't restart your computer after installing Nvidia driver your Linux computer most likely won't load the driver.

I never said you can't install Lazarus without Gdebi nor Synaptic. Gdebi is a handy tools that can automatically solves some library dependency issue.

I use Synaptic for inspecting problem. And of course you don't have to do version locking (using Synaptic) and your Lazarus may still work correctly, but after:
- You're not using Lazarus provided from your Linux repository
- Your installed Lazarus version > Lazarus version in the Linux repository
- Linux have just updated the FPC version in its repository
- You answered "Yes" when your Linux tell you to update
if all the 4 items above are satisfied, your Lazarus won't start. I've tested this issue many times and I'm sure about it.

With a single command I installed the versions informed using the Terminal ...

That's because you have IQ above average. FYI, not all users in this forum can use Terminal as proficient as you.


--- Off topic ---

I failed to install Lazarus 1.8.0 on Ubuntu 16.04 LTS (fresh installed) without using Gdebi. I tried it 3 times, but all were failed. Can you please try installing Lazarus 1.8.0 on Ubuntu 16.04 LTS (fresh installed) using Terminal only. If you managed to do it please write a installation guide. Here is the link:

https://forum.lazarus.freepascal.org/index.php/topic,39281.msg269112.html#msg269112
« Last Edit: June 23, 2018, 08:57:15 pm by Handoko »

guest61674

  • Guest
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #23 on: June 23, 2018, 08:10:35 pm »
Sorry, the second command was missing:

sudo apt-get install -f

will be asked to install the missing packages on the system

Y to Yes

:)


guest61674

  • Guest
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #24 on: June 23, 2018, 08:15:16 pm »
Quote
Linux is sometimes as stupid as Windows, especially when you installing/uninstalling certain libraries. Rare but it is true. For example, you can try:
fresh install Linux with Nvidia VGA, if you don't restart your computer after installing Nvidia driver your Linux computer most likely won't load the driver.

proprietary drivers where the fonts are closed, otherwise a modprob would solve the case.

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #25 on: June 23, 2018, 08:18:51 pm »
Modprob, what is it? I ever heard it but don't know much about it. Why should I do modprob if I only need a computer restart to solve it?

bylaardt

  • Sr. Member
  • ****
  • Posts: 309
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #26 on: June 24, 2018, 04:14:30 am »
I use Synaptic for inspecting problem. And of course you don't have to do version locking (using Synaptic) and your Lazarus may still work correctly, but after:
- You're not using Lazarus provided from your Linux repository
- Your installed Lazarus version > Lazarus version in the Linux repository
- Linux have just updated the FPC version in its repository
- You answered "Yes" when your Linux tell you to update
if all the 4 items above are satisfied, your Lazarus won't start. I've tested this issue many times and I'm sure about it.
have you changed the control file to then workaround for ubuntu dfsg-3 suffix on lazarus package?
 https://forum.lazarus.freepascal.org/index.php/topic,41333.msg287683.html#msg287683
« Last Edit: June 24, 2018, 04:22:32 am by bylaardt »

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #27 on: June 24, 2018, 04:46:01 am »
Thank you for providing the information about manually modify the deb files. I've never tried it, so far I've been using version locking for years and it seems to works without problem. I will try your suggestion for next Lazarus releases.

whiffee

  • New Member
  • *
  • Posts: 18
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #28 on: August 23, 2018, 01:35:47 am »
A very good installation tutorial. I was having major trouble installing on Mint 19. GDebi installed the FP files okay, but then refused to install Laz because, I guess, of minor name differences in the installation script (e.g. a dependency called fp-compiler). Your ingenious insight about cutting the internet connection at the crucial moment was truly %) inspired. Thanks much for the assist.

whiffee    

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Installing Lazarus 1.8.4 on Ubuntu 18.04
« Reply #29 on: August 23, 2018, 08:09:27 am »
Hmm, I have installed Lazarus on Ubuntu 18.04 three times in the last month or so. Each time I have followed the same model and its worked flawlessly (except for one special case noted below). I first install the FPC as an Ubuntu package (at present its the right one to build L184). I then do Handoko's trick of locking it so Ubuntu does not try any sneaky updates. Because I'm doing this nicely (according to Ubuntu) it brings down all the necessary build tools as dependencies and its dead easy.

Then I pull down Lazarus source and build it using that compiler. I like to have the IDE and LCL in user space where there are no issues about write permission. Lazarus does some clever tricks to hide that problem but it still worries me. So, once FPC and all its dependencies are installed I -

Code: [Select]
cd ~/bin
mkdir -p Lazarus/184
cd Lazarus/184
svn checkout http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_4  .
# note, a space and dot at the end of above line
make CPU_TARGET=x86_64
#make CPU_TARGET=i386

And thats all thats really necessary. It does not set a path to the lazarus dir nor add a shortcut to your main menu but both are easy. In my ~/bin directory I have a script I made executable containing -

Code: [Select]
#!/bin/bash
cd ~/bin/Lazarus/184
./startlazarus

This has worked perfectly on an U18.4 upgrade and two fresh installs including a 32bit atom powered 2012 netbook with only 2G ram.

The one issue I have had was that on the (64bit) machine I upgraded to Ubuntu 18.04, I also setup as a cross compile machine. The windows cross compiling was a breeze  ::) but getting it to compile 32bit Linux binaries was an issue due to 3 Ubuntu upgrade errors.   
  • In /usr/lib/i386-linux-gnu  libpangocairo-1.0.so was a broken link. pointed to ~.4 and should have pointed to .14
  • In /usr/lib/i386-linux-gnu there was no libglib-2.0.so, however there was libglib-2.0.so.0 -> libglib-2.0.so.0.5600.1
  • The  fpc.cfg section #ifdef cpu386 needed to point to above, ie
        -Fl/usr/lib/i386-linux-gnu
        -Fl/usr/lib/gcc/x86_64-linux-gnu/7/32
        -Fl/usr/lib32


One more thing while I am sprouting off !  I believe most problems people have installing on Ubuntu relate to the fact that people use dpkg -i to install downloaded debs and dpkg does not resolve dependencies.

 
« Last Edit: August 23, 2018, 08:36:53 am by dbannon »
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018