Package AnchorDockingDsgn does not compile lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- munair · 2017-11-02 12:22 I get an error when trying to compile the package AnchorDockingDsgn into the IDE. When trying to install from the package list I get the following message after hitting the recompile IDE button: lazarus.pp(1,1) Fatal: Cannot find anchordockingdsgn used by Lazarus. Check if package AnchorDockingDsgn creates anchordockingdsgn.ppu, check nothing deletes this file and check that no two packages have access to the unit source. So I tried to load the package manually Package -> Open Package File... and install it from there. After being prompted to rebuild the IDE I get the same error. The ppu file does not seem to be created. Also, I don't think I mixed sources. This is from a fresh install. I went directly to the package list and tried to install the package. The only file being created is AnchorDockingDsgn.compiled in the home directory under /home/frank/.lazarus/lib/AnchorDockingDsgn/lib/x86_64-linux with the following content: Code: XML  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i                           I tried to manually compile the file in the console with the same arguments as provided by the xml file. It says cannot open the file, even though the correct path is in the parameter list. See screenshot. Did anyone run into the same problem on Linux? Any input would be highly appreciated. PS I commented about this issue in another thread (https://forum.lazarus.freepascal.org/index.php/topic,37856.0.html) but I thought the status [SOLVED] would be misleading, so I started a new thread. ---------------------------------------------------------------------- balazsszekely · 2017-11-02 12:30 The next logical question is: can you install any other, randomly chosen package from ($LazarusDir)/component folder? Is this a generic problem or only related to anchordocking? ---------------------------------------------------------------------- munair · 2017-11-02 12:44 Quote from: GetMem on November 02, 2017, 01:30:29 pmThe next logical question is: can you install any other, randomly chosen package from ($LazarusDir)/component folder? Is this a generic problem or only related to anchordocking? Apparently not. I tried to install two different packages and they gave the same error when trying to rebuild the IDE. What could be the reason that the compiler cannot open the file? ---------------------------------------------------------------------- balazsszekely · 2017-11-02 13:11 QuoteWhat could be the reason that the compiler cannot open the file?Please go to Tools-->Configure Build Lazarus, add to the options "-gw -gl -godwarfsets -gh -gt -Co -Cr -Ci -Sa -va" without the quote, then try to rebuild the IDE, maybe this way you will get more information why the build fails. It would be also interesting to see if "make bigide" works or not, I'm wondering this is a wrong config file or a privilege issue? ---------------------------------------------------------------------- JuhaManninen · 2017-11-02 13:17 GetMem, the error is "cannot open file anchordockingdsgn.pas" which is weird. I don't think compiling the IDE with debug flags help to solve it although it is a good idea for other problems. Maybe the user does not have enough access rights for the directory. For most Linux users it works though. Easiest would be to download Lazarus sources from SVN to somewhere under home dir and build with an installed FPC. It would solve all your problems.  The original problem then remains a mystery which is not nice of course. Hey, you use Lazarus 1.6.2. Now we (almost) have 1.8. You definitely must download from SVN fixes_1_8 branch. The errors will be gone as an extra bonus. ---------------------------------------------------------------------- munair · 2017-11-02 13:19 Quote from: GetMem on November 02, 2017, 02:11:18 pmQuoteWhat could be the reason that the compiler cannot open the file?Please go to Tools-->Configure Build Lazarus, add to the options "-gw -gl -godwarfsets -gh -gt -Co -Cr -Ci -Sa -va" without the quote, then try to rebuild the IDE, maybe this way you will get more information why the build fails. It would be also interesting to see if "make bigide" works or not, I'm wondering this is a wrong config file or a privilege issue? @GetMem, I will try to do that next and let you know. In the meantime, I had a second go. I purged FPC and Lazarus and renamed the home directory ~/.lazarus to ~/.lazarus.bak After reinstalling FPC and Lazarus and starting the IDE I got the checking window as expected. Everything said OK so I continued to the IDE. When trying to install the package again, I got the same error. This is the Messages output: QuoteBuild IDE: Exit code 512, Errors: 1, Warnings: 7, Hints: 13 debugger.pp(669,37) Hint: Parameter "AnOldValidity" not used debugger.pp(1384,27) Hint: Parameter "AValidity" not used debugger.pp(806,31) Hint: Parameter "AValidity" not used debugger.pp(959,38) Hint: Parameter "AnOldFormat" not used debugger.pp(1132,32) Hint: Parameter "AValidity" not used debugger.pp(1133,38) Hint: Parameter "AValidity" not used debugger.pp(1133,69) Hint: Parameter "AMinCount" not used debugger.pp(1135,34) Hint: Parameter "AValidity" not used addtopackagedlg.pas(127,68) Hint: Parameter "User" not used packageeditor.pas(801,36) Warning: Symbol "BeginUpdate" is deprecated packageeditor.pas(865,36) Warning: Symbol "EndUpdate" is deprecated packageeditor.pas(939,36) Warning: Symbol "BeginUpdate" is deprecated packageeditor.pas(967,36) Warning: Symbol "EndUpdate" is deprecated packageeditor.pas(253,65) Hint: Parameter "Shift" not used addtoprojectdlg.pas(88,68) Hint: Parameter "User" not used projectinspector.pas(112,65) Hint: Parameter "Shift" not used buildmodesmanager.pas(35,31) Hint: Unit "CompOptsIntf" not used in BuildModesManager main.pp(6917,23) Warning: Symbol "CommandLine" is deprecated main.pp(7697,22) Warning: Symbol "BeginUpdate" is deprecated main.pp(7718,22) Warning: Symbol "EndUpdate" is deprecated lazarus.pp(1,1) Fatal: Cannot find anchordockingdsgn used by Lazarus. Check if package AnchorDockingDsgn creates anchordockingdsgn.ppu, check nothing deletes this file and check that no two packages have access to the unit source.. ---------------------------------------------------------------------- balazsszekely · 2017-11-02 13:29 @JuhaManninen You missed the -va in the end. It will force the IDE to show everything, which sometimes helps. Do you have better ideas? I know the other main suspect is wrong file version, bitness...but in this case we can rule that out. According to @Munair is a fresh installation. ---------------------------------------------------------------------- munair · 2017-11-02 13:32 BTW installing custom packages works just fine. As a test I tried to install HtmlViewer/FrameViewer 11.6 and rebuild the IDE. No problems and the IDE nicely shows the new component tab. ---------------------------------------------------------------------- JuhaManninen · 2017-11-02 13:42 True, I missed the -va. For the error, sometimes it is better just leave it behind and move to 1.8. It has many improvements also for AnchorDocking package. No use to bang one's head with 1.6 any more. ---------------------------------------------------------------------- balazsszekely · 2017-11-02 13:43 Quote@Munair BTW installing custom packages works just fine. As a test I tried to install HtmlViewer/FrameViewer 11.6 and rebuild the IDE. No problems and the IDE nicely shows the new component tab.What if you copy anchordocking to your home folder, for example to ~/.lazarus/packages/ then install it from there. In fact OPM does the same thing, until know it wasn't any privilege issues. ---------------------------------------------------------------------- munair · 2017-11-02 13:45 Quote from: JuhaManninen on November 02, 2017, 02:42:21 pmTrue, I missed the -va. For the error, sometimes it is better just leave it behind and move to 1.8. It has many improvements also for AnchorDocking package. No use to bang one's head with 1.6 any more. OK. Well I tried to install a newer version and dependencies were OK, but it means I also need to manually install the lcl-qt4 library and other packages compatible with the latest version. When trying to do that from the repo it says dependency problem as it is linked to the older version of Lazarus. ---------------------------------------------------------------------- munair · 2017-11-02 14:02 Quote from: GetMem on November 02, 2017, 02:43:03 pmQuote@Munair BTW installing custom packages works just fine. As a test I tried to install HtmlViewer/FrameViewer 11.6 and rebuild the IDE. No problems and the IDE nicely shows the new component tab.What if you copy anchordocking to your home folder, for example to ~/.lazarus/packages/ then install it from there. In fact OPM does the same thing, until know it wasn't any privilege issues. OK I did that. Here is what happened: When trying to install anchordockingdsgn.lpk manually I got the message that anchordocking 0.6 would also be installed (while anchordockingdsgn is v0.5). When continuing I got the same error. Then I tried to open anchordocking.lpk and COMPILE it (not install it). This worked fine. Then I tried to INSTALL anchordockingdsgn.lpk again which gave the same error. Then I tried to just COMPILE anchordockingdsgn.lpk and this worked fine. So I tried to install it by hitting Use>> Install. This time rebuilding the IDE gave no errors and the package was installed successfully, apparently because it was already compiled. ---------------------------------------------------------------------- JuhaManninen · 2017-11-02 14:13 Quote from: Munair on November 02, 2017, 02:45:34 pmOK. Well I tried to install a newer version and dependencies were OK, but it means I also need to manually install the lcl-qt4 library and other packages compatible with the latest version. When trying to do that from the repo it says dependency problem as it is linked to the older version of Lazarus. No. LCL-QT4 code comes with Lazarus. No need to install it. You only need the QtPas shared lib but you already have it. You also have FPC installed. Uninstall the current Lazarus. Otherwise you may indeed have problems again. Then just: $ svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_1_8  lazarus_1_8 $ cd lazarus_1_8 $ make $ ./lazarus It builds the IDE with GTK2 bindings but you can change it later from the Configure Build Lazarus window. Quote from: Munair on November 02, 2017, 03:02:50 pmWhen trying to install anchordockingdsgn.lpk manually I got the message that anchordocking 0.6 would also be installed (while anchordockingdsgn is v0.5). When continuing I got the same error. This is part of the fundamental problem I guess. Such problems are fixed in 1.8. ---------------------------------------------------------------------- munair · 2017-11-02 14:21 Quote from: JuhaManninen on November 02, 2017, 03:13:46 pmQuote from: Munair on November 02, 2017, 02:45:34 pmOK. Well I tried to install a newer version and dependencies were OK, but it means I also need to manually install the lcl-qt4 library and other packages compatible with the latest version. When trying to do that from the repo it says dependency problem as it is linked to the older version of Lazarus. No. LCL-QT4 code comes with Lazarus. No need to install it. You only need the QtPas shared lib but you already have it. You also have FPC installed. Uninstall the current Lazarus. Otherwise you may indeed have problems again. Then just: $ svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_1_8  lazarus_1_8 $ cd lazarus_1_8 $ make $ ./lazarus It builds the IDE with GTK2 bindings but you can change it later from the Configure Build Lazarus window. Quote from: Munair on November 02, 2017, 03:02:50 pmWhen trying to install anchordockingdsgn.lpk manually I got the message that anchordocking 0.6 would also be installed (while anchordockingdsgn is v0.5). When continuing I got the same error. This is part of the fundamental problem I guess. Such problems are fixed in 1.8. Does that mean Lazarus 1.8 works with FPC 3.0.0? ---------------------------------------------------------------------- JuhaManninen · 2017-11-02 14:42 Quote from: Munair on November 02, 2017, 03:21:46 pmDoes that mean Lazarus 1.8 works with FPC 3.0.0? Should work. If it does not then we must fix it. The rule of thumb is that Lazarus should compile with 2 latest FPC release versions. FPC 3.0 is within that range. Due to the breaking Unicode change in 1.6 the rule was extended. Lazarus 1.8 should compile even with FPC 2.6.4 although I don't recommend it to anybody. ---------------------------------------------------------------------- munair · 2017-11-02 14:45 OK, FPC 3.0.0 seems to work with Lazarus 1.8. After building I set the widgetset to qt5 in build options. This gave a compile error at the last line 'end.' saying Lazarus could not be built. Changing qt5 to qt solved the problem, so I take it qt5 support isn't 100% yet. BTW installing the package anchordockingdsgn ran flawlessly with version 1.8. ---------------------------------------------------------------------- JuhaManninen · 2017-11-02 14:48 Quote from: Munair on November 02, 2017, 03:45:15 pmChanging qt5 to qt solved the problem, so I take it qt5 support isn't 100% yet. Correct. QuoteBTW installing the package anchordockingdsgn ran flawlessly with version 1.8.    I told you! Congratulations! ---------------------------------------------------------------------- munair · 2017-11-02 14:56 Quote from: JuhaManninen on November 02, 2017, 02:17:37 pmMaybe the user does not have enough access rights for the directory. For most Linux users it works though. If that were the case then SUDO fpc .. should have allowed to compile, but it gave the same error. So it remains a mystery, but I will play around with 1.8 from the home directory. ---------------------------------------------------------------------- alex256 · 2017-11-30 16:40 I just upgraded to 1.8.0RC5 and met the same problem. I use Debian GNU/Linux and installed Lazarus package from its repos. I couldn't even rebuild the IDE with the errors simillar with the described in the topic. Then I downloaded Lazarus DEB from SourceForge, installed it and such errors disappeared. So, it seems that this bug is present only in Lazarus from Debian/Ubuntu repos. Anyway it's very weird. ---------------------------------------------------------------------- JuhaManninen · 2017-11-30 17:09 Quote from: alex256 on November 30, 2017, 05:40:41 pmI just upgraded to 1.8.0RC5 and met the same problem. I use Debian GNU/Linux and installed Lazarus package from its repos. That cannot be right. Debian repos don't have Lazarus 1.8.0RC5. BTW, Lazarus 1.8 will be released soon now that FPC 3.0.4 is out. Unfortunately it will not be in Debian repos either anytime soon. Only rolling distros typically provide new versions quickly. ---------------------------------------------------------------------- alex256 · 2017-11-30 17:14 Quote from: JuhaManninen on November 30, 2017, 06:09:42 pmQuote from: alex256 on November 30, 2017, 05:40:41 pmI just upgraded to 1.8.0RC5 and met the same problem. I use Debian GNU/Linux and installed Lazarus package from its repos. That cannot be right. Debian repos don't have Lazarus 1.8.0RC5. BTW, Lazarus 1.8 will be released soon now that FPC 3.0.4 is out. Unfortunately it will not be in Debian repos either anytime soon. Only rolling distros typically provide new versions quickly. It is avaliable in the backports https://packages.debian.org/stretch-backports/lazarus-ide-1.8