Recent

Author Topic: Package AnchorDockingDsgn does not compile  (Read 7131 times)

Munair

  • Sr. Member
  • ****
  • Posts: 473
  • Try to KISS (keep it simple, smart)
    • Ditrianum
Package AnchorDockingDsgn does not compile
« on: November 02, 2017, 01:22:38 pm »
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]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.     <CONFIG>
  3.       <Compiler Value="/usr/bin/fpc" Date="1497114828"/>
  4.       <Params Value=" -MObjFPC -Scghi -Cg -O1 -g -gl -l -vewnhibq -Fu/usr/lib/lazarus/1.6.2/packager/units/x86_64-linux -Fu/usr/lib/lazarus/1.6.2/components/lazutils/lib/x86_64-linux -Fu/usr/lib/lazarus/1.6.2/lcl/units/x86_64-linux -Fu/usr/lib/lazarus/1.6.2/lcl/units/x86_64-linux/qt -Fu/usr/lib/lazarus/1.6.2/components/lazcontrols/lib/x86_64-linux/qt -Fu/usr/lib/lazarus/1.6.2/components/ideintf/units/x86_64-linux/qt -Fu/usr/lib/lazarus/1.6.2/components/anchordocking/lib/x86_64-linux -Fu/usr/lib/lazarus/1.6.2/components/anchordocking/design/ -FU/home/frank/.lazarus/lib/AnchorDockingDsgn/lib/x86_64-linux -dLCL -dLCLqt anchordockingdsgn.pas"/>
  5.       <Complete Value="False" MainPPUExists="False"/>
  6.     </CONFIG>

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.
« Last Edit: November 02, 2017, 01:24:11 pm by Munair »
Lazarus 2.0.4; Manjaro, Debian, Windows

GetMem

  • Hero Member
  • *****
  • Posts: 3508
Re: Package AnchorDockingDsgn does not compile
« Reply #1 on: November 02, 2017, 01:30:29 pm »
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

  • Sr. Member
  • ****
  • Posts: 473
  • Try to KISS (keep it simple, smart)
    • Ditrianum
Re: Package AnchorDockingDsgn does not compile
« Reply #2 on: November 02, 2017, 01:44:44 pm »
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?
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?
Lazarus 2.0.4; Manjaro, Debian, Windows

GetMem

  • Hero Member
  • *****
  • Posts: 3508
Re: Package AnchorDockingDsgn does not compile
« Reply #3 on: November 02, 2017, 02:11:18 pm »
Quote
What 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: Package AnchorDockingDsgn does not compile
« Reply #4 on: November 02, 2017, 02:17:37 pm »
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.
« Last Edit: November 02, 2017, 02:33:11 pm by JuhaManninen »

Munair

  • Sr. Member
  • ****
  • Posts: 473
  • Try to KISS (keep it simple, smart)
    • Ditrianum
Re: Package AnchorDockingDsgn does not compile
« Reply #5 on: November 02, 2017, 02:19:55 pm »
Quote
What 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:
Quote
Build 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..
Lazarus 2.0.4; Manjaro, Debian, Windows

GetMem

  • Hero Member
  • *****
  • Posts: 3508
Re: Package AnchorDockingDsgn does not compile
« Reply #6 on: November 02, 2017, 02:29:18 pm »
@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

  • Sr. Member
  • ****
  • Posts: 473
  • Try to KISS (keep it simple, smart)
    • Ditrianum
Re: Package AnchorDockingDsgn does not compile
« Reply #7 on: November 02, 2017, 02:32:28 pm »
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.
Lazarus 2.0.4; Manjaro, Debian, Windows

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: Package AnchorDockingDsgn does not compile
« Reply #8 on: November 02, 2017, 02:42:21 pm »
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.

GetMem

  • Hero Member
  • *****
  • Posts: 3508
Re: Package AnchorDockingDsgn does not compile
« Reply #9 on: November 02, 2017, 02:43:03 pm »
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

  • Sr. Member
  • ****
  • Posts: 473
  • Try to KISS (keep it simple, smart)
    • Ditrianum
Re: Package AnchorDockingDsgn does not compile
« Reply #10 on: November 02, 2017, 02:45:34 pm »
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.
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.
Lazarus 2.0.4; Manjaro, Debian, Windows

Munair

  • Sr. Member
  • ****
  • Posts: 473
  • Try to KISS (keep it simple, smart)
    • Ditrianum
Re: Package AnchorDockingDsgn does not compile
« Reply #11 on: November 02, 2017, 03:02:50 pm »
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.

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.
« Last Edit: November 02, 2017, 03:11:51 pm by Munair »
Lazarus 2.0.4; Manjaro, Debian, Windows

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: Package AnchorDockingDsgn does not compile
« Reply #12 on: November 02, 2017, 03:13:46 pm »
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.
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.

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.
This is part of the fundamental problem I guess. Such problems are fixed in 1.8.
« Last Edit: November 02, 2017, 03:16:31 pm by JuhaManninen »

Munair

  • Sr. Member
  • ****
  • Posts: 473
  • Try to KISS (keep it simple, smart)
    • Ditrianum
Re: Package AnchorDockingDsgn does not compile
« Reply #13 on: November 02, 2017, 03:21:46 pm »
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.
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.

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.
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?
Lazarus 2.0.4; Manjaro, Debian, Windows

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • I like bugs.
Re: Package AnchorDockingDsgn does not compile
« Reply #14 on: November 02, 2017, 03:42:22 pm »
Does 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.
« Last Edit: November 02, 2017, 03:46:16 pm by JuhaManninen »