Lazarus

Programming => LCL => Topic started by: ermeneuta on June 14, 2017, 11:03:34 pm

Title: Error compiling one of the examples
Post by: ermeneuta on June 14, 2017, 11:03:34 pm
Running here Linux Mint 18.1 Xfce and Lazarus 1.8.0 RC2.

Tried to compile one of the examples copied by the Lazarus installer, namely
/usr/share/lazarus/1.8.0RC2/examples/trackbar.lpi

The compilation halted with this error message :

lclproc.pas(29,44) Fatal: Cannot find Laz_AVL_Tree used by LCLProc, incompatible ppu=/usr/share/lazarus/1.8.0RC2/components/lazutils/lib/x86_64-linux/laz_avl_tree.ppu, package LazUtils

What does this mean ? Maybe my installation is broken ? Thanks for any advices.

Al


Title: Re: Error compiling one of the examples
Post by: Handoko on June 15, 2017, 04:01:50 am
I had no problem trying trackbar.lpi on my Ubuntu + Lazarus 1.6.4.

RC2 is not a stable release, it could be a bug.

You can try to recompile the package:
Lazarus main menu > Package > Open Loaded Package > select: LazUtils > click: Open > Compile

The compilation process should not show any error. And make sure avglvtree.pas can be found in the list. If you can not see it, maybe there was something wrong with your installation. Or maybe in 1.8.0RC2 the name has changed.
Title: Re: Error compiling one of the examples
Post by: ermeneuta on June 15, 2017, 03:32:49 pm
I had no problem trying trackbar.lpi on my Ubuntu + Lazarus 1.6.4.

RC2 is not a stable release, it could be a bug.

You can try to recompile the package:
Lazarus main menu > Package > Open Loaded Package > select: LazUtils > click: Open > Compile

The compilation process should not show any error. And make sure avglvtree.pas can be found in the list. If you can not see it, maybe there was something wrong with your installation. Or maybe in 1.8.0RC2 the name has changed.
Thanks for your tests and answer. I tried to compile the package LazUtils, the file avglvltree.pas was there, as shown in the first screen capture, but the compilation ended with the error shown in the second screen capture... is there anything I can do, short of ditching 1.8.0 RC2 and reinstall 1.6.4 ?  TNX.

Al
Title: Re: Error compiling one of the examples
Post by: JuhaManninen on June 15, 2017, 03:45:54 pm
Quote
is there anything I can do, short of ditching 1.8.0 RC2 and reinstall 1.6.4 ?  TNX.
Yes, build Lazarus clean. If that does not help, remove the current installation and then reinstall.
"Incompatible .ppu" always means it was compiled with a different version.
Title: Re: Error compiling one of the examples
Post by: ermeneuta on June 15, 2017, 03:57:30 pm
Quote
Yes, build Lazarus clean. If that does not help, remove the current installation and then reinstall.
"Incompatible .ppu" always means it was compiled with a different version.
Update.... I opened the Tools menu, then selected "Configure Build Lazarus..." (see screen capture) and clicked on "Build".
After a lot of messages saying that this and that were compiled successfully (with some warnings), I got 7 error messages, all equal, only referring to different lines of the file  sourcefilemanager.pas, saying :

sourcefilemanager.pas(6450,29) Error: identifier idents no member "DesignPPI"

But after that, trackbar compiled and executed successfully... the problem is that, if I close and restart Lazarus, I have to do that procedure again...   ???

Al
Title: Re: Error compiling one of the examples
Post by: JuhaManninen on June 15, 2017, 04:46:33 pm
Ok, you have it in a write protected place. Better remove it all completely, first by .deb installation and then the directories that are left.
Installing on top of an old installation without cleanup is a recipe for problems (as you noticed).

One good and easy way to test Lazarus RC is to use the fixes_1_8 SVN branch.
It is easy to build with an existing FPC (by "make").
Title: Re: Error compiling one of the examples
Post by: ermeneuta on June 15, 2017, 06:13:08 pm
Ok, you have it in a write protected place. Better remove it all completely, first by .deb installation and then the directories that are left.
Installing on top of an old installation without cleanup is a recipe for problems (as you noticed).
Weird... something is escaping me... I completely disinstalled Lazarus, then, with the command (as root)   find / -xdev -iname *lazarus*  I completely deleted any remnants of that package. At this point I reinstalled it, not from root, but from my user, using the  .deb  file downloaded from SVN :
 lazarus-project_1.8.0RC2-0_amd64.deb

Then started it. Lazarus did open, showing an empty project. Without modifying anything, I issued a Build command, whose results are shown in the attached error messages list...  as far as I know, this install is the cleanest possible... I am at a loss...

Code: [Select]
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.0.3 [2017/05/13] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
(3104) Compiling /home/alberto/tmp/project1.lpr
(10001) PPU Loading /usr/share/lazarus/1.8.0RC2/lcl/units/x86_64-linux/gtk2/gtk2disableliboverlay.ppu
(10011) PPU Source: gtk2disableliboverlay.pas not found
(10028) Recompiling gtk2DisableLibOverlay, checksum changed for Classes
/home/alberto/tmp/gtk2disableliboverlay.pas(11,35) Fatal: (10022) Can't find unit gtk2DisableLibOverlay used by Interfaces
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Title: Re: Error compiling one of the examples
Post by: Handoko on June 15, 2017, 06:51:30 pm
Maybe you have not 'really' cleaned the previous installation. Try this:
http://forum.lazarus.freepascal.org/index.php/topic,36967.msg247084.html#msg247084
Title: Re: Error compiling one of the examples
Post by: JuhaManninen on June 15, 2017, 07:13:57 pm
At this point I reinstalled it, not from root, but from my user, using the  .deb  file downloaded from SVN :
 lazarus-project_1.8.0RC2-0_amd64.deb
How can you install the .deb file as normal user?
Search for .ppu files. Somewhere they are left.

I would recommend using the SVN repo directly and then building with your existing FPC 3.0.2.
You don't need to actually install Lazarus then, just start it from its directory. Other versions do not matter, you can have many versions around.
Code: [Select]
svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_1_8 lazarus1_8Then just "make" in the directory.
Title: Re: Error compiling one of the examples
Post by: ermeneuta on June 15, 2017, 07:48:49 pm
How can you install the .deb file as normal user?
Search for .ppu files. Somewhere they are left.

I would recommend using the SVN repo directly and then building with your existing FPC 3.0.2.
You don't need to actually install Lazarus then, just start it from its directory. Other versions do not matter, you can have many versions around.
Code: [Select]
svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_1_8 lazarus1_8Then just "make" in the directory.
I feel like an idiot... cleaned everything as suggested by Handoko, then installed (as root) fpc and fpcsrc 3.03 using the SVN  .deb  packages, then downloaded from SVN the file  fixes_1_8_lazarus1_8,  then did  "make clean bigide" as suggested in the readme file.

Compilation of Lazarus started, everything seemed to go well, but at the end I got this:
Code: [Select]
/root/lazarus1_8/ide/sourcefilemanager.pas(6450,29) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6452,71) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6454,88) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6455,88) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6457,86) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6458,86) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6459,27) Error: (5038) identifier idents no member "DesignPPI"
sourcefilemanager.pas(8456) Fatal: (10026) There were 7 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Makefile:3961: recipe for target 'lazarus' failed
make[2]: *** [lazarus] Error 1
make[2]: Leaving directory '/root/lazarus1_8/ide'
Makefile:4385: recipe for target 'bigide' failed
make[1]: *** [bigide] Error 2
make[1]: Leaving directory '/root/lazarus1_8/ide'
Makefile:3158: recipe for target 'idebig' failed
make: *** [idebig] Error 2
LMint lazarus1_8 #
Sorry to be a nuisance, but, despite being somewhat an expert in the Windows world, I am a newcomer as far as Linux is concerned...
TNX

Al
   
Title: Re: Error compiling one of the examples
Post by: ermeneuta on June 16, 2017, 10:41:33 am
I found this thread :
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Trunk-is-broken-td4051954.html#a4051961 (http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Trunk-is-broken-td4051954.html#a4051961)
which points to a possible cause for the errors I am getting...
Code: [Select]
/root/lazarus1_8/ide/sourcefilemanager.pas(6450,29) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6452,71) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6454,88) Error: (5038) identifier idents no member "DesignPPI"
... etc....  etc .....
Apparently it looks like fpc 3.0.3 is the cause of the error... the poster says that with 3.0.2 the error goes away... but this seems to contradict what it is possible to read on an SVN page, where it is declared that fpc 3.0.3 is needed, because of a bug in 3.0.2 ...
 
Title: Re: Error compiling one of the examples
Post by: Handoko on June 16, 2017, 11:30:17 am
Since 1.8.0 has not been released and you found problem with 1.8.0RC2, I suggest you to post your issue on the announcement thread:
http://forum.lazarus.freepascal.org/index.php/topic,37128.0.html
... so it will get more attentions.

Hope it will be fixed when 1.8.0 stable has release.
Title: Re: Error compiling one of the examples
Post by: Ondrej Pokorny on June 16, 2017, 01:26:35 pm
I found this thread :
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Trunk-is-broken-td4051954.html#a4051961 (http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Trunk-is-broken-td4051954.html#a4051961)
which points to a possible cause for the errors I am getting...
Code: [Select]
/root/lazarus1_8/ide/sourcefilemanager.pas(6450,29) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6452,71) Error: (5038) identifier idents no member "DesignPPI"
/root/lazarus1_8/ide/sourcefilemanager.pas(6454,88) Error: (5038) identifier idents no member "DesignPPI"
... etc....  etc .....
Apparently it looks like fpc 3.0.3 is the cause of the error... the poster says that with 3.0.2 the error goes away... but this seems to contradict what it is possible to read on an SVN page, where it is declared that fpc 3.0.3 is needed, because of a bug in 3.0.2 ...

Just update your 3.0.3...
Title: Re: Error compiling one of the examples
Post by: Ondrej Pokorny on June 16, 2017, 01:32:14 pm
Since 1.8.0 has not been released and you found problem with 1.8.0RC2

It's not a problem with 1.8.0RC2. Actually it is no real problem. He uses a new revision of Lazarus fixes_1_8 but an old revision of FPC fixes_3_0 (=old revision of 3.0.3).

The rules are: if you are using an SVN branch, you have to stay updated on that branch. He didn't update FPC.
Title: Re: Error compiling one of the examples
Post by: ermeneuta on June 17, 2017, 10:45:44 pm
Just update your 3.0.3...
Could you please suggest where to find the trunk and the branches of fpc ?
I looked in the official site of free pascal :   https://www.freepascal.org/
but found no traces of 3.0.3  ...

TNX

Al
Title: Re: Error compiling one of the examples
Post by: Ondrej Pokorny on June 21, 2017, 02:45:29 pm
Just update your 3.0.3...
Could you please suggest where to find the trunk and the branches of fpc ?
I looked in the official site of free pascal :   https://www.freepascal.org/
but found no traces of 3.0.3  ...

http://wiki.freepascal.org/Installing_Lazarus (http://wiki.freepascal.org/Installing_Lazarus)
In particular: https://svn.freepascal.org/svn/fpc/branches/fixes_3_0/ (https://svn.freepascal.org/svn/fpc/branches/fixes_3_0/)
TinyPortal © 2005-2018