Recent

Author Topic: Can no longer build Lazarus, add components  (Read 3401 times)

Exception

  • New Member
  • *
  • Posts: 10
Can no longer build Lazarus, add components
« on: May 31, 2021, 06:29:38 pm »
Hi,

First post, so I'll try not to be too annoying :D.

So I've been using Lazarus for Linux (2.0.10) (as well as Windows) for a good while without much incident, but suddenly I've ran into trouble.

It happened to the best of my knowledge when I thought I'd try out the PowerPDF component, when Lazarus refused to build when I tried to install it.

I've removed PowerPDF from the component library in the hope that would fix things, but unfortunately, no, now no new component will install.

What I get is: lazarus.pp(165, 1) Error : Error while linking

Any thoughts on how to fix things? Is a reinstall my only option?

Thanks.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Can no longer build Lazarus, add components
« Reply #1 on: May 31, 2021, 06:50:00 pm »
Welcome to the forum :-)

I'd suggest not reinstalling, but being as patient as possible allowing that today is a holiday in various places and those developers who've still got hair might be letting it down somewhere :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Handoko

  • Hero Member
  • *****
  • Posts: 5153
  • My goal: build my own game engine using Lazarus
Re: Can no longer build Lazarus, add components
« Reply #2 on: May 31, 2021, 06:56:33 pm »
Hello Exception,
Welcome to the forum.

It often happens to me. After installed 'bad' packages, my Lazarus refused to rebuild even I reinstalled the IDE. It just says "Error while linking". My solution is easy, perhaps it works on your case too.

Open your file manager
> enable to show hidden files > browse to /home/[user]/.lazarus > delete packagefiles.xml > start the Lazarus IDE > rebuild

If it doesn't work, you may need to delete all the files there. Make sure you already backup the files. The trick never fails on my Ubuntu Mate computer.
« Last Edit: June 02, 2021, 04:35:24 pm by Handoko »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Can no longer build Lazarus, add components
« Reply #3 on: May 31, 2021, 10:08:12 pm »
If you get only "Error while Linking" the actual error is being filtered by Lazarus (a stupid default setting IMHO).

Right click on the messages form, and reconfigure the filters by setting "Filter non urgent messages" to the last option, something with "none".

If your component comes with DLLs, also put the DLLs in the matching bittiness next to the IDE binary.

Exception

  • New Member
  • *
  • Posts: 10
Re: Can no longer build Lazarus, add components
« Reply #4 on: June 02, 2021, 03:47:51 pm »
Hello Exception,
Welcome to the forum.

It often happens to me. After installed 'bad' packages, my Lazarus refused to rebuild even I reinstalled the IDE. It just says "Error while linking". My solution is easy, perhaps it works on your case too.

Open your file manager
> enable to show hidden files > browse to /home/[user]/.lazarus > delete package.xml > start the Lazarus IDE > rebuild

If it doesn't work, you may need to delete all the files there. Make sure you already backup the files. The trick never fails on my Ubuntu Mate computer.

Hello and thank you.

I think that worked. The file I found in the directory was packagefiles.xml, which I renamed to something random, and I restarted Laz, then everything seemed to break, which gave me quite a "oh c**p!" moment  :D, but the standard component library was still working, and I just reinstalled some component libraries, and everything got working again...until I tried reinstalling one component library...

I've discovered that "bglcontrols" seems to be the culprit, which is in the BGRABitmap-Master directory, and part of BGRABitmap , not PowerPDF. Strangely BGRAControls (which I'm a fan of), which I thought needed BGRABitmap, seems to be working fine without bglcontrols and BGRABitmap (BGRAGames also doesn't install). Why it suddenly decided to go wrong when I've had BGRAControls, and possibly bglcontrols installed for months, I'm not sure. But still no real explanation of why bgacontrols now causes Laz to stop linking.

@marcov. Thanks, I tried the that option for the message window, but it didn't give me anything new as to why linking was failing, sadly. Maybe it's some kind of version clash, as the version of BGRAControls I have installed is older to the one in the repository.

Thanks also to @MarkMLl

Anyway, I have a fully working Lazarus and can install (most at least) components again! Yay!

I think my component library's probably still in a bit of mess, though, and maybe I should use this as excuse have a clear out and install .12.

Thanks for the replies, guys, apologies for not getting back earlier.

af0815

  • Hero Member
  • *****
  • Posts: 1291
Re: Can no longer build Lazarus, add components
« Reply #5 on: June 02, 2021, 04:14:16 pm »
a) Is your fpc < 3.2 eg. 3.0.x AND your fpc is 32 Bit -> There is a linking error if Lazarus is grown and need more than 1.8GB at linking time. See http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Error-No-Memory-left-at-linking-Lazarus-with-fpc-trunk-td4051133.html for older fpc versions.

b) Open the Messages Windows. A rigth click , use copy -> Copy All/Original Messages to Clipboard. After this create a empty txt file outside Lazarus and past the clipboard in the txt file. Then look for the messages befor the error.

Normal it looks like this
Code: Pascal  [Select][+][-]
  1. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(148,29) Hint: (5024) Parameter "Sender" not used
  2. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(614,26) Hint: (5057) Local variable "FileReq" does not seem to be initialized
  3. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(627,29) Hint: (5057) Local variable "UrlReq" does not seem to be initialized
  4. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(644,29) Hint: (5057) Local variable "ConReq" does not seem to be initialized
  5. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(653,30) Hint: (5057) Local variable "MiscReq" does not seem to be initialized
  6. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(798,65) Hint: (4055) Conversion between ordinals and pointers is not portable
  7. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(736,26) Hint: (5057) Local variable "IsHandled" does not seem to be initialized
  8. (9022) Compiling resource C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lib\i386-win32\lhelp.or
  9. (9015) Linking C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelp.exe
  10. (1008) 3494 lines compiled, 4.6 sec, 2149248 bytes code, 404020 bytes data
  11. (1021) 3 warning(s) issued
  12. (1022) 57 hint(s) issued
  13. (1023) 5 note(s) issued
  14.  
 
« Last Edit: June 02, 2021, 04:19:32 pm by af0815 »
regards
Andreas

Handoko

  • Hero Member
  • *****
  • Posts: 5153
  • My goal: build my own game engine using Lazarus
Re: Can no longer build Lazarus, add components
« Reply #6 on: June 02, 2021, 04:36:49 pm »
I think that worked. The file I found in the directory was packagefiles.xml ...

Oops, I typed too fast.  :-[
Glad to hear it worked for you.
« Last Edit: June 02, 2021, 04:48:21 pm by Handoko »

Exception

  • New Member
  • *
  • Posts: 10
Re: Can no longer build Lazarus, add components
« Reply #7 on: June 03, 2021, 09:20:48 pm »
a) Is your fpc < 3.2 eg. 3.0.x AND your fpc is 32 Bit -> There is a linking error if Lazarus is grown and need more than 1.8GB at linking time. See http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Error-No-Memory-left-at-linking-Lazarus-with-fpc-trunk-td4051133.html for older fpc versions.

b) Open the Messages Windows. A rigth click , use copy -> Copy All/Original Messages to Clipboard. After this create a empty txt file outside Lazarus and past the clipboard in the txt file. Then look for the messages befor the error.

Normal it looks like this
Code: Pascal  [Select][+][-]
  1. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(148,29) Hint: (5024) Parameter "Sender" not used
  2. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(614,26) Hint: (5057) Local variable "FileReq" does not seem to be initialized
  3. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(627,29) Hint: (5057) Local variable "UrlReq" does not seem to be initialized
  4. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(644,29) Hint: (5057) Local variable "ConReq" does not seem to be initialized
  5. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(653,30) Hint: (5057) Local variable "MiscReq" does not seem to be initialized
  6. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(798,65) Hint: (4055) Conversion between ordinals and pointers is not portable
  7. C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(736,26) Hint: (5057) Local variable "IsHandled" does not seem to be initialized
  8. (9022) Compiling resource C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lib\i386-win32\lhelp.or
  9. (9015) Linking C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelp.exe
  10. (1008) 3494 lines compiled, 4.6 sec, 2149248 bytes code, 404020 bytes data
  11. (1021) 3 warning(s) issued
  12. (1022) 57 hint(s) issued
  13. (1023) 5 note(s) issued
  14.  


My install is still 32bit, so I'll look into that. Thanks.

Exception

  • New Member
  • *
  • Posts: 10
Re: Can no longer build Lazarus, add components
« Reply #8 on: June 03, 2021, 09:21:45 pm »
I think that worked. The file I found in the directory was packagefiles.xml ...

Oops, I typed too fast.  :-[
Glad to hear it worked for you.

 :D Thanks.

 

TinyPortal © 2005-2018