Can no longer build Lazarus, add components lazarus / 13-General ---------------------------------------------------------------------- Exception · 2021-05-31 16:29 Hi, First post, so I'll try not to be too annoying . 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 · 2021-05-31 16:50 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 ---------------------------------------------------------------------- Handoko · 2021-05-31 16:56 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. ---------------------------------------------------------------------- marcov · 2021-05-31 20:08 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 · 2021-06-02 13:47 Quote from: Handoko on May 31, 2021, 06:56:33 pmHello 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  , 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 · 2021-06-02 14:14 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i C:\XXX\lazd ev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(148,29) Hint: (5024) Parameter "Sender" not usedC:\XXX\lazdev\XXX\lazarus\components \chmhelp\lhelp\lhelpcore.pas(614,26) Hint: (5057) Local variable "FileReq" does not seem to be initializedC:\XXX\lazdev\XXX\lazarus\com ponents\chmhelp\lhelp\lhelpcore.pas(627,29) Hint: (5057) Local variable "UrlReq" does not seem to be initializedC:\XXX\lazdev\XXX\laz arus\components\chmhelp\lhelp\lhelpcore.pas(644,29) Hint: (5057) Local variable "ConReq" does not seem to be initializedC:\XXX\lazdev\XXX\laz arus\components\chmhelp\lhelp\lhelpcore.pas(653,30) Hint: (5057) Local variable "MiscReq" does not seem to be initializedC:\XXX\lazdev\XXX\la zarus\components\chmhelp\lhelp\lhelpcore.pas(798,65) Hint: (4055) Conversion between ordinals and pointers is not portableC:\XXX\lazdev\ XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(736,26) Hint: (5057) Local variable "IsHandled" does not seem to be initialized(9022) Compiling resource C:\XXX\lazdev\XXX\lazarus\compone nts\chmhelp\lhelp\lib\i386-win32\lhelp.or(9015) Linking C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelp.exe(1008) 3494 lines compiled, 4.6 sec, 2149248 bytes code, 404020 bytes data(1021) 3 warning(s) issued(1022) 57 hint(s) issued(1023) 5 note(s) issued ---------------------------------------------------------------------- Handoko · 2021-06-02 14:36 Quote from: Exception on June 02, 2021, 03:47:51 pmI 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. ---------------------------------------------------------------------- Exception · 2021-06-03 19:20 Quote from: af0815 on June 02, 2021, 04:14:16 pma) 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i C:\XXX\lazd ev\XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(148,29) Hint: (5024) Parameter "Sender" not usedC:\XXX\lazdev\XXX\lazarus\components \chmhelp\lhelp\lhelpcore.pas(614,26) Hint: (5057) Local variable "FileReq" does not seem to be initializedC:\XXX\lazdev\XXX\lazarus\com ponents\chmhelp\lhelp\lhelpcore.pas(627,29) Hint: (5057) Local variable "UrlReq" does not seem to be initializedC:\XXX\lazdev\XXX\laz arus\components\chmhelp\lhelp\lhelpcore.pas(644,29) Hint: (5057) Local variable "ConReq" does not seem to be initializedC:\XXX\lazdev\XXX\laz arus\components\chmhelp\lhelp\lhelpcore.pas(653,30) Hint: (5057) Local variable "MiscReq" does not seem to be initializedC:\XXX\lazdev\XXX\la zarus\components\chmhelp\lhelp\lhelpcore.pas(798,65) Hint: (4055) Conversion between ordinals and pointers is not portableC:\XXX\lazdev\ XXX\lazarus\components\chmhelp\lhelp\lhelpcore.pas(736,26) Hint: (5057) Local variable "IsHandled" does not seem to be initialized(9022) Compiling resource C:\XXX\lazdev\XXX\lazarus\compone nts\chmhelp\lhelp\lib\i386-win32\lhelp.or(9015) Linking C:\XXX\lazdev\XXX\lazarus\components\chmhelp\lhelp\lhelp.exe(1008) 3494 lines compiled, 4.6 sec, 2149248 bytes code, 404020 bytes data(1021) 3 warning(s) issued(1022) 57 hint(s) issued(1023) 5 note(s) issued  My install is still 32bit, so I'll look into that. Thanks. ---------------------------------------------------------------------- Exception · 2021-06-03 19:21 Quote from: Handoko on June 02, 2021, 04:36:49 pmQuote from: Exception on June 02, 2021, 03:47:51 pmI 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.   Thanks.