Recent

Author Topic: Problem after Lazarus Update  (Read 8783 times)

dallison@southalabama.edu

  • Newbie
  • Posts: 1
Problem after Lazarus Update
« on: November 05, 2017, 05:22:52 am »
After a recent update with "apt-get" a program that used to compile now returns the compiler message:
'error compiling resource, lazres not found' (or something to that effect)
The interesting thing is that "lazres" is present in the /usr/bin/ folder and the path points to that folder - I can execute "lazres" from the terminal command line. I searched for a path setting for the resource compiler in the compiler options without success. Being very new to linux and Lazarus/fpc I'm pretty much stuck at this point.
Lazarus 1.6
fpc 3.0.0
Ubuntu 16.04

schuler

  • Full Member
  • ***
  • Posts: 223
Re: Problem after Lazarus Update
« Reply #1 on: November 05, 2017, 07:26:56 am »
I use Ubuntu 16.04 too.

Have you tried updating to the latest Lazarus 1.6.4/FPC 3.0.2?

https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%201.6.4/
« Last Edit: November 05, 2017, 07:59:48 am by schuler »

AntonioFS

  • New Member
  • *
  • Posts: 12
Re: Problem after Lazarus Update
« Reply #2 on: November 08, 2017, 08:48:51 am »
Hi.

I have version 1.6 of Lazarus and I want to update it to 1.6.4 but there is no way to do it on my Ubuntu 16.04 lts. Although I uninstall the first one, when I'm about to install the second one, it gives me dependency errors. I've tried everything I've found on the WWW but it has not worked for me. How is it updated from one version to another effectively?

Thank you.
Antonio F.S.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Problem after Lazarus Update
« Reply #3 on: November 08, 2017, 09:50:15 am »
I am a Ubuntu user, I know this problem. What you need to do are:
01. Uninstall Lazarus, FPC, FPC-source
02. Restart your computer
03. Install FPC, FPC-source
04. Lock the version (FPC, FPC-source)
05. Install Lazarus


The step #02 - restarting computer is important (for me). It failed me several times simply because I forget to restart. Rare but that really happened because I messed up with some libraries in my system. On Windows, we are usually recommended to restart after instal/uninstall app. On Linux, we are almost never asked to do so.

For step #01, if you want you can do a full complete Lazarus/FPC removal:
11. Uninstall lazarus, fpc, fpc-src
12. Delete ~/.lazarus, except: editoroptions, environmentoptions
13. Delete /etc/fppkg (folder)
14. Delete /etc/fp.*
15. Delete /usr/share/fpcsrc (folder)
16. Delete /usr/lib/fpc (folder)
17. Delete /usr/bin/ppc*

Note:
I keep editoroptions and environmentoptions because I want to keep some settings I made for the IDE.

For step #03, if you're a 64-bit users, I recommend you download the 3 deb files from:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/
For 32-bit users, download from here:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20i386%20DEB/Lazarus%201.6.4/

For step #04 - lock version, I recommend you to use Synaptic Package Manager. To do version locking using Synaptic:
41. Press Ctrl+F, type "FPC" [Enter]
42. Select fpc and fpc-src
43. Menu > Package > Lock Version


The Lazarus installation must be performed only after all the 4 steps above completed.

---edited---
Added 2 images for version locking (step #04):
« Last Edit: July 19, 2023, 05:24:00 am by Handoko »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Problem after Lazarus Update
« Reply #4 on: November 08, 2017, 10:16:49 am »
I would go for Lazarus 1.8RC5 directly. It should be released already but still waiting for FPC 3.0.4 release.
Has many improvements.
One option is to dump Ubuntu and use a distro with recent versions of FPC and Lazarus.
I don't know why people still recommend Ubuntu while updating SW is so difficult there.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Problem after Lazarus Update
« Reply #5 on: November 08, 2017, 10:21:10 am »
The default Lazarus version on Ubuntu Mate 17.10 is Lazarus 1.8.0R5. They must be not using the latest version of Ubuntu.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Problem after Lazarus Update
« Reply #6 on: November 08, 2017, 10:25:36 am »
One important thing I forgot to say. When installing Lazarus on Ubuntu, I often (not always) get warning:
Error: Breaks exisiting package 'fpc' conflict: fpc ()

Simply ignore the warning, nothing bad will happen as long as you follow my installation instruction correctly.

You can read more and the see screenshot here:
http://forum.lazarus.freepascal.org/index.php/topic,38445.msg261176.html#msg261176

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Problem after Lazarus Update
« Reply #7 on: November 08, 2017, 10:29:31 am »
Hmm, I found it very straight forward on my Ubuntu 16.04LTS.

I initially installed what ever version of lazarus using apt. That solved all the dependencies for me. I then used apt to uninstall Lazarus, FPC-source and finally FPC then I grabbed the 1.8rcX debs, manually installed them, first FPC, the FPC-sources, then Lazarus.

And it all worked. That was on my laptop. On the desktop, I started with a totally clean install, again with the 1.8rcX deps, this time I let apt deal with the dependencies. Again, it all worked. I don't understand how it was so easy for me but is, apparently a problem for so many other people. Only "secret" I can think of is to do it in the right order. Thats important. I found lots of problems occur on the mac if you stray from the path even a little bit. (I doc'ed that on the mac Install Wiki page, I hope people believe me.)
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

AntonioFS

  • New Member
  • *
  • Posts: 12
Re: Problem after Lazarus Update
« Reply #8 on: November 08, 2017, 04:30:24 pm »
Hi.

I am pleasantly surprised with the quality of the answers. :-)

Please Handoko, how point 4 is made (04. Lock the version (FPC, FPC-source)). I am still a neophyte in Lazarus.

Thanks in advance.
Antonio F.S.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Problem after Lazarus Update
« Reply #9 on: November 08, 2017, 05:11:32 pm »
For Ubuntu's users, I strongly recommend to instal Synaptic Package Manager. It is handy to fix broken package, inspecting dependency, etc. It is not installed by default on Ubuntu, you need to install it manually. You can find it on Ubuntu Software Center.

To do lock version:
41. Start Synaptic Package Manager
42. Use shortcut [Ctrl]+[F] to activate Find dialog
43. Type "fpc" and then [Enter]
44. Select both "fpc" and "fpc-src"
45. Menu > Package > Lock Version


Based on my own experience, the things that cause fail to upgrade Lazarus on Ubuntu:
- You do not restart your computer after uninstall
- You do not do lock version (fpc and fpc-src)

The full Lazarus/FPC uninstallation (step #2) is not a must. It is only needed on some special cases. For example tried to combine different Lazarus with FPC version, which cause mess with the config files.

AntonioFS

  • New Member
  • *
  • Posts: 12
Re: Problem after Lazarus Update
« Reply #10 on: November 08, 2017, 06:43:09 pm »
Hello again.

First of all, thank you very much for the quick assistance.

I think I understand that blocking is done so as not to have conflict with the new versions. Is it like that?

I will execute all the steps to see if the result is correct and Lazarus 1.6.4 is perfectly installed on my PC.

Antonio F.S.
« Last Edit: November 08, 2017, 06:57:59 pm by AntonioFS »

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Problem after Lazarus Update
« Reply #11 on: November 08, 2017, 07:30:34 pm »
You need to do version locking if you have problem installing Lazarus. You still need to do version locking even you have no problem installing Lazarus because Ubuntu someday may ask you to downgrade Lazarus/FPC.

I've never really done serious tests about version locking. But these are what I know:

- Each version of Ubuntu will recommend certain version of Lazarus/FPC based on their repository. For example Ubuntu 17.10 will recommend you to install Lazarus 1.8.0RC5, Ubuntu 16.04 will recommend you Lazarus 1.6.0 (if I remember correctly).

- Installing any version of FPC is allowed even Ubuntu recommend the other version. But if you do not do version locking, someday if you do software update in the future using Ubuntu Software Updater, Ubuntu will replace the version you installed with other version it thinks better, it can be a downgrade (or maybe an upgrade). But because Lazarus depends on FPC, the Lazarus may fail to start (if the FPC has been downgraded). The Lazarus will be listed as broken if you check it using Synaptic Package Manager.

- If you want to install Lazarus version other than recommended, you need to use the 3 deb files. You have to install both the FPC and FPC-source before installing Lazarus. And you need to use Synaptic Package Manager to lock the version of FPC and FPC-source, because Ubuntu may prohibit you to install Lazarus version other than recommended if you do not version locking on FPC and FPC-Source.

- Ubuntu will never ask you to upgrade nor downgrade the software if you lock version on it. You can't upgrade/downgrade/uninstall the software if it is version-locked.

- After you managed to install Lazarus, you can remove the lock (FPC and FPC-source). But Ubuntu may replace them with lower version if someday you run Software Updater. So you should never remove the lock, unless you want to manually perform an upgrade.
« Last Edit: November 08, 2017, 07:39:34 pm by Handoko »

AntonioFS

  • New Member
  • *
  • Posts: 12
Re: Problem after Lazarus Update
« Reply #12 on: November 08, 2017, 08:49:41 pm »
His explanation about the blockage is very interesting and instructive.

It is wonderful to share knowledge.

Thank you very much.

Antonio F.S.

lolka_bolka

  • Newbie
  • Posts: 3
Re: Problem after Lazarus Update
« Reply #13 on: May 04, 2018, 07:37:26 am »
For me it was so easy:

sudo apt-get install lazarus-ide

And done.

Then type lazarus-ide and IDE has started.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Problem after Lazarus Update
« Reply #14 on: May 04, 2018, 01:25:07 pm »
For me it was so easy:

Which distro are you using?
And what Lazarus version did you get?

 

TinyPortal © 2005-2018