Recent

Author Topic: (solved)Error installing Lazarus in ubuntu  (Read 18765 times)

geraldocg

  • New member
  • *
  • Posts: 7
(solved)Error installing Lazarus in ubuntu
« on: March 21, 2017, 02:40:25 am »
Hi,
I am using Ubuntu 16.04.2 64 bits,  just installed and updated, in a 64bits laptop .

Trying to install Lazarus-project_1.6.4-0_amd64.deb using "Ubuntu Software"   received message : "RAD tool for freepascal Lazarus is a free and opensource IDE and RAD tool for Free Pascal using the Lazarus component library LCL. The LCL is included in this package too. See http://www.lazarus.freepascal.org".

Trying to install with GDebi  the same message plus  " the dependency is not met : fpg(=3.02 | fp-compiler(=3.02)" . 'met' is for shure  a bad translation from portuguese 'dependência' (dependency?).

There is also an info I suppose is about  RAD tool :
version 1.6.4
size 587,3 MB

Another problem is that I can't execute executables compiled  using an older Lazarus version in ubuntu 12.04-32bits (will not be able to find the version soon). Is that normal?

Thanks for any help

Geraldo


« Last Edit: March 22, 2017, 04:31:17 pm by geraldocg »

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: Error installing Lazarus in ubuntu
« Reply #1 on: March 21, 2017, 03:04:32 am »
Hello geraldocg,
Welcome to this forum.

You should not use the Lazarus that come from your Ubuntu repository. For Ubuntu users, I recommend Synaptic Package Manager (instead of the default Ubuntu Software Manager).

First download the 3 debs file from Lazarus official website (via SourceForge):
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%201.6.4/

Because you have already tried to install Lazarus, you may need to clean up the previous installation:

01. Uninstall lazarus, fpc, fpc-src (use Ctrl+F shortcut on your Synaptic to search)
02. Delete ~/.lazarus
03. Delete /etc/fp* (fpc.bak, fpc.cfg, fppkg.bak, fppkg.cfg)
04. Delete /usr/share/fpsrc
05. Delete /usr/lib/fpc
06. Delete /usr/bin/ppc* (ppcarm, ppcross386, ppcrossarm, ppcx64)

After the cleaning up prosedure, then now Install the Lazarus:
07. Install fpc_3.0.2-170225_amd64.deb
08. Install fpc-src_3.0.2-170225_amd64.deb
09. Install lazarus-project_1.6.4-0_amd64.deb

Your Lazarus now should be able to start and run properly. But you should to lock your Lazarus/FPC to prevent Ubuntu to mess up your installation with its upgrades. To do it:

Start your Synaptic Package Manager > Select fpc, fpc-src, lazarus-project > menu item: Package > Lock Version.

Have fun!
« Last Edit: March 21, 2017, 03:10:09 am by Handoko »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Error installing Lazarus in ubuntu
« Reply #2 on: March 21, 2017, 10:33:13 am »
Yet another dependency problem with Ubuntu...
See also :
 http://forum.lazarus-ide.org/index.php/topic,36258.msg241382.html#msg241382

The recommendation for new Ubuntu users must be to switch their distro instead of explaining complex ways to fix the problems and then continue with it.
For some reason people keep up the hype and illusion that Ubuntu is a good desktop distro.

We recommend the latest Lazarus release!
New users should obviously choose a Linux distro that allows them to install the latest release without a hassle.
There are plenty of choices.
« Last Edit: March 21, 2017, 10:49:04 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: Error installing Lazarus in ubuntu
« Reply #3 on: March 21, 2017, 06:00:45 pm »
Hello.

I have installed new version of Lazarus on Linux Mint mate 64 following Handoko advices (many thanks for this).

OK, Lazarus installed and run.

But when trying to install a component (OPM), while recompiling Lazarus, there is that error:
 
Quote
Creation de l'EDI: Code de sortie 512 - Erreurs : 1
lazarus.pp(154,1) Error: Error while linking

Note that Lazarus was started with root permission:
Code: Pascal  [Select][+][-]
  1. # sudo startlazarus

Thanks.

Fre;D
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: Error installing Lazarus in ubuntu
« Reply #4 on: March 21, 2017, 06:16:16 pm »
Re-hello.

It seems that the problem comes from new fpc release.
( from https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%201.6.4/  )

Example:
Code: Pascal  [Select][+][-]
  1. program test;
  2. begin
  3. end.

---->
Code: Pascal  [Select][+][-]
  1. # fpc test.pas
---->
Quote
Free Pascal Compiler version 3.0.2 [2017/02/25] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling test.pas
Linking test
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: /usr/lib/fpc/3.0.2/units/x86_64-linux/rtl/prt0.o: unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
testnew.pas(3,1) Error: Error while linking
testnew.pas(3,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode

Fre;D
« Last Edit: March 21, 2017, 06:22:08 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: Error installing Lazarus in ubuntu
« Reply #5 on: March 21, 2017, 06:23:26 pm »
Just repeat. These linker errors are often due to lack of memory. (E.g: Rpi) Repeating the build cycle will skip everything done and has more space for linking.
Specialize a type, not a var.

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: Error installing Lazarus in ubuntu
« Reply #6 on: March 21, 2017, 06:30:32 pm »
Hello Thaddy.

Huh, after more than 100 times, same error.  :-[

I am busy to re-install fpc from http://www.freepascal.org/download.var (that was perfectly working).

So, it was only to note that this deb file has problem:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%201.6.4/fpc_3.0.2-170225_amd64.deb/download

Fre;D

 
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: Error installing Lazarus in ubuntu
« Reply #7 on: March 21, 2017, 07:36:52 pm »
Re-hello.

After re-installing fpc from http://www.freepascal.org/download.var ---> OK, it compiles and link perfectly.

Quote
fpc test.pas
Free Pascal Compiler version 3.0.2 [2017/02/06] for i386
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling test.pas
Linking test
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
3 lines compiled, 1.3 sec

While loading Lazarus, in welcome form -->
Quote
Erreur :"fpc.cfg" manque.

Huh, /etc/fpc.cfg is there...
After ignoring the message, Lazarus load and re-compiling Lazarus was OK (including OPM new package).

Fre;D
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: Error installing Lazarus in ubuntu
« Reply #8 on: March 22, 2017, 08:23:18 am »
Hi  Fred vS.

Can you tried to (re)install the older version to see if the problem is exist in the older versions? If it happens on FPC 3.0.2 only, then it may be a bug.

I remember when installing FPC, I got a warning message with red text. I said that the FPC 3.0.2 installation had conflict. I just ignored it and my Lazarus/FPC installation now seems to work correctly regardless the warning.

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: Error installing Lazarus in ubuntu
« Reply #9 on: March 22, 2017, 12:48:04 pm »
@Handoko.

Huh, all is re-working now. I t was lot of work to re-install all.
If I may there is something that I do not understand.
Why only give .deb file for installing "out of the box" Lazarus in Linux ?
For this I need to de-install all my fpc's (32/64 bit) that were working perfectly.
This because Lazarus.deb needs fpc installed via .deb.

Quote
But you should to lock your Lazarus/FPC to prevent Ubuntu to mess up your installation with its upgrades. To do it:

Then .deb is totally not needed (even worse better to not use it).

Sincerely, IMO, why Lazarus team does not do like fpc do  ---> a simple compressed file + a install.sh script that works, perfectly for all Linux distribution, without cry and without a single hair loosed.

Fre;D

« Last Edit: March 22, 2017, 01:16:33 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

geraldocg

  • New member
  • *
  • Posts: 7
Re: Error installing Lazarus in ubuntu
« Reply #10 on: March 22, 2017, 02:38:39 pm »
Hi,
Thanks for your repply.
Followed Handoko instructions and Lazarus was installed without errors. Thanks !!!!!. Have not used it yet.
Regarding 16.04 not running executables compiled under 12.04 (32bits) I tried to run one of them in a terminal and got the error:

"./CAMCONT: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory"

Can this be corrected by installing (reinstalling) the lib cited?
If yes how?

Thanks for any help,
Geraldo

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Error installing Lazarus in ubuntu
« Reply #11 on: March 22, 2017, 02:49:16 pm »
Then .deb is totally not needed (even worse better to not use it).
Yes, I don't know why there are so many problems. It seems to work in some machines though.
Fortunately there are other ways to install.

Quote
Sincerely, IMO, why Lazarus team does not do like fpc do  ---> a simple compressed file + a install.sh script that works, perfectly for all Linux distribution, without cry and without a single hair loosed.
Maybe because it is so very easy to get Lazarus from the SVN server. Just do:
 $ svn co http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6 lazarus_1_6
and then "make".
As an extra bonus you get the latest backported bug fixes.
BTW, I have seen how people recommend the fpclazup tool for this simple task. I think it is misleading and even irresponsible towards new users. It is a complex tool, good for installing various versions of FPC and for cross-compilation, but for this easy task it is not needed.

The "svn co" command above is needed only once per a major release, currently for 1.6.x.
Then "svn up" will get the latest backported fixes.
Minimal hassle, minimal network traffic.
« Last Edit: March 22, 2017, 04:26:11 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Error installing Lazarus in ubuntu
« Reply #12 on: March 22, 2017, 03:16:12 pm »
"./CAMCONT: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory"

Can this be corrected by installing (reinstalling) the lib cited?
If yes how?
My prediction is you will screw up the whole system.

Earlier I recommended other Linux distros for people who have such problems with Ubuntu. Maybe it was considered a joke but no, it was not a joke.
For example what is your motivation to use Ubuntu while it clearly does not work well as a desktop OS for your purposes?
« Last Edit: March 22, 2017, 04:31:43 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

geraldocg

  • New member
  • *
  • Posts: 7
Re: (Solved)Error installing Lazarus in ubuntu
« Reply #13 on: March 22, 2017, 04:41:17 pm »
Copied all old project files and folders from old 12.04 HD to new, opened Nautilus, double clicked the copied  CAMCONT.lpr, Lazarus opened the project, compiled, build. Executable now 'executing'.
 Will do the same for other projects.
Thanks again,
Geraldo

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: (solved)Error installing Lazarus in ubuntu
« Reply #14 on: March 22, 2017, 05:48:19 pm »
Quote
maybe because it is so very easy to get Lazarus from the SVN server. Just do:
Yes, maybe, but (IMHO) a "out-of-the-box" compressed file (+ included install.sh script), like fpc does, has some advantages.
--> no need to install svn, you can share the zip file with everybody (without internet connection), you may look at the script and change it if you want.

Quote
For example what is your motivation to use Ubuntu while it clearly does not work well as a desktop OS for your purposes?
Because Ubuntu + Mint are the kings (I know, it is sad, see classement) ---> http://distrowatch.com

Fre;D
« Last Edit: March 22, 2017, 06:13:46 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018