Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-02

Problems with Lazarus

7 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Johann Spies

My endeavour to return to Pascal is getting to the point of frustration:

1. Although I found that sometimes I have to tell Lazarus to scan the fpcsource to be able to find installed units, it still happens that from time to time I cannot compile something because a unit cannot be found.

Today it is "*Can't find unit AvgLvlTree ... check if package LazUtils is in the dependencies"

I have read the wiki and FAQ about this type of problems but that did not fpc and lazarus cannot find the unit despite the fact that I did a rerun of fpcmkcfg adn despite that the following shows the unit is there:

locate -i avglvltree
/home/js/.lazarus/lib/LazUtils/lib/x86_64-linux/avglvltree.o /home/js/.lazarus/lib/LazUtils/lib/x86_64-linux/avglvltree.ppu /usr/share/lazarus/1.0.6/components/lazutils/avglvltree.pas /usr/share/lazarus/1.0.6/components/lazutils/lib/x86_64-linux/avglvltree.o /usr/share/lazarus/1.0.6/components/lazutils/lib/x86_64-linux/avglvltree.ppu /usr/share/lazarus/1.0.6/docs/xml/lazutils/avglvltree.xml /usr/share/lazarus/1.0.6/test/lazutils/testavglvltree.pas js at artikel ~/p/pascal> sudo fpcmkcfg > /tmp/fpc.cfg

*2. My second problem is not that serious but Lazarus as an editor is extremely slow. It reminds me of the reason why I do not use Eclipse for other projects and normally prefer Emacs or Vim. Unfortunately the fpc-ide is not debug-enabled and I do not know how to enable it. I have recompiled the sources and according to what I understand of the configuration in the sources debug should be enabled.

There must be some way to get around these type of frustrations. Any help?

Regards
Johann

PS. I am working with Lazarus 1.0.6 and fpc-2.6.0-7 on Debian. I have downloaded the packages from the Lazarus site and removed all standard Debian freepascal-related packages from my system.

Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130219/ea3c09d5/attachment.html>

Reply by email

Martin Schreiber
to Johann Spies
Johann Spies wrote
My endeavour to return to Pascal is getting to the point of frustration:

BTW there is another IDE with integrated debugging for FPC available which maybe can fulfill your needs.

Martin

Reply by email

Chavoux Luyt
to Johann Spies: My endeavour to return to Pascal is getting to the point of frustration: 1. Although I…

Hi Johann

I have had similar issues in the past. I would really be nice if (like Delphi) there was a setting in the Tools/Options window where you could set (or at least see) the paths to all the units used by Lazarus as well as a separate setting for the paths to all the units used by the current project. Nothing stops Lazarus from reading and writing this information from the .cfg file. B.T.W. since I finally got a bunch of 3D components installed in Lazarus and did not want to go through all the trouble of re-installing them, I am still using Lazarus 1.0 RC1, with fpc-2.6.0 on a Debian-based system (at least until I run into a problem where I really need an update).

As an alternative, try running fp-2.6.0 from the commandline. I am not sure if it will solve your problem with the missing unit/path, but if you ever used the original Borland Turbo Pascal, you will feel it is much faster than Lazarus. I think for the kind of project you are looking at, it might be the better choice.

Cheers
Chavoux

Johann Spies wrote 57 lines
My endeavour to return to Pascal is getting to the point of frustration: 1. Although I found that sometimes I have to tell Lazarus to scan the fpcsource to be able to find installed units, it still happens that from time to time I cannot compile something because a unit cannot be found. Today it is "*Can't find unit AvgLvlTree ... check if package LazUtils is in the dependencies" I have read the wiki and FAQ about this type of problems but that did not help at all. Both fpc and lazarus cannot find the unit despite the fact that I did a rerun of fpcmkcfg adn despite that the following shows the unit is there: locate -i avglvltree /home/js/.lazarus/lib/LazUtils/lib/x86_64-linux/avglvltree.o /home/js/.lazarus/lib/LazUtils/lib/x86_64-linux/avglvltree.ppu /usr/share/lazarus/1.0.6/components/lazutils/avglvltree.pas /usr/share/lazarus/1.0.6/components/lazutils/lib/x86_64-linux/avglvltree.o /usr/share/lazarus/1.0.6/components/lazutils/lib/x86_64-linux/avglvltree.ppu /usr/share/lazarus/1.0.6/docs/xml/lazutils/avglvltree.xml /usr/share/lazarus/1.0.6/test/lazutils/testavglvltree.pas js at artikel ~/p/pascal> sudo fpcmkcfg > /tmp/fpc.cfg *2. My second problem is not that serious but Lazarus as an editor is extremely slow. It reminds me of the reason why I do not use Eclipse for other projects and normally prefer Emacs or Vim. Unfortunately the fpc-ide is not debug-enabled and I do not know how to enable it. I have recompiled the sources and according to what I understand of the configuration in the sources debug should be enabled. There must be some way to get around these type of frustrations. Any help? Regards Johann PS. I am working with Lazarus 1.0.6 and fpc-2.6.0-7 on Debian. I have downloaded the packages from the Lazarus site and removed all standard Debian freepascal-related packages from my system. -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130219/faf567ea/attachment.html>

Reply by email

Mattias Gaertner
to Johann Spies: My endeavour to return to Pascal is getting to the point of frustration: 1. Although I…
Show quoted text 25 lines
My endeavour to return to Pascal is getting to the point of frustration: 1. Although I found that sometimes I have to tell Lazarus to scan the fpcsource to be able to find installed units, it still happens that from time to time I cannot compile something because a unit cannot be found. Today it is "*Can't find unit AvgLvlTree ... check if package LazUtils is in the dependencies" I have read the wiki and FAQ about this type of problems but that did not help at all. Both fpc and lazarus cannot find the unit despite the fact that I did a rerun of fpcmkcfg adn despite that the following shows the unit is there: locate -i avglvltree /home/js/.lazarus/lib/LazUtils/lib/x86_64-linux/avglvltree.o /home/js/.lazarus/lib/LazUtils/lib/x86_64-linux/avglvltree.ppu /usr/share/lazarus/1.0.6/components/lazutils/avglvltree.pas /usr/share/lazarus/1.0.6/components/lazutils/lib/x86_64-linux/avglvltree.o /usr/share/lazarus/1.0.6/components/lazutils/lib/x86_64-linux/avglvltree.ppu /usr/share/lazarus/1.0.6/docs/xml/lazutils/avglvltree.xml /usr/share/lazarus/1.0.6/test/lazutils/testavglvltree.pas js at artikel ~/p/pascal> sudo fpcmkcfg > /tmp/fpc.cfg

A common mistake is to add too many paths to the unit search paths ("Other unit files"), so the compiler finds multiple units with the same name.
Your Lazarus project should only contain search paths of your own directories, not to the LCL, not to the FPC sources and not to any other package. For most projects this means the "Other unit files" is empty.
Make sure your fpc.cfg contains only -Fu lines pointing to directories containing ppu files, no directory with sources (.pas,.pp).

You can clean up using menu item Run / Clean up Build files. This will delete the ppu files created by experiments or former configuration mistakes.

Show quoted text 16 lines
*2. My second problem is not that serious but Lazarus as an editor is extremely slow. It reminds me of the reason why I do not use Eclipse for other projects and normally prefer Emacs or Vim. Unfortunately the fpc-ide is not debug-enabled and I do not know how to enable it. I have recompiled the sources and according to what I understand of the configuration in the sources debug should be enabled. There must be some way to get around these type of frustrations. Any help? Regards Johann PS. I am working with Lazarus 1.0.6 and fpc-2.6.0-7 on Debian. I have downloaded the packages from the Lazarus site and removed all standard Debian freepascal-related packages from my system.

On some Linux the QT version is faster. Unfortunately there is no debian package for that. But compiling it is easy.

Mattias

Reply by email

Sven Barth
to Johann Spies: My endeavour to return to Pascal is getting to the point of frustration: 1. Although I…
Johann Spies wrote 8 lines
My endeavour to return to Pascal is getting to the point of frustration: 1. Although I found that sometimes I have to tell Lazarus to scan the fpcsource to be able to find installed units, it still happens that from time to time I cannot compile something because a unit cannot be found. Today it is "/Can't find unit AvgLvlTree ... check if package LazUtils is in the dependencies"

Did you do what the message told you and added LazUtils (or alternatively LCL if you want to develop GUI applications) to the dependencies? To do this go to Project => Project Inspector => + => Dependency => "select LazUtils / LCL from combobox" => OK

2. My second problem is not that serious but Lazarus as an editor is extremely slow. It reminds me of the reason why I do not use Eclipse for other projects and normally prefer Emacs or Vim. Unfortunately the fpc-ide is not debug-enabled and I do not know how to enable it. I have recompiled the sources and according to what I understand of the configuration in the sources debug should be enabled.

From my experience Lazarus is much faster than Eclipse (especially on my less powerful computer). Also the features Lazarus provides (integrated debugging, refactoring, code completion) are much more powerful than what emacs and vim provide.

Regards,
Sven

Reply by email

Mattias Gaertner
to Chavoux Luyt: Hi Johann I have had similar issues in the past. I would really be nice if (like Delphi)…
Show quoted text 5 lines
Hi Johann I have had similar issues in the past. I would really be nice if (like Delphi) there was a setting in the Tools/Options window where you could set (or at least see) the paths to all the units used by Lazarus

This shows the paths from the installed packages:
Tools / Configure Build Lazarus / Information

as well as a separate setting for the paths to all the units used by the current project.

This shows all paths passed to the compiler:
Project / Project Options / Show Options

This shows the paths from used packages:
Project / Project Options / Inherited

Analog exists for packages.

Your fpc.cfg adds more paths. See View / IDE Internals / FPC Info.

You can see the search paths for a single unit in Source / Unit Information.

Nothing stops Lazarus from reading and writing this information from the .cfg file.

The compiler reads its cfg file and the IDE reads the information from the compiler. The cfg is global, effects everything and is specific to your machine.
Lazarus projects and packages are meant to work cross platform. There is no reason for Lazarus to write something to the fpc.cfg.

Show quoted text 74 lines
B.T.W. since I finally got a bunch of 3D components installed in Lazarus and did not want to go through all the trouble of re-installing them, I am still using Lazarus 1.0 RC1, with fpc-2.6.0 on a Debian-based system (at least until I run into a problem where I really need an update). As an alternative, try running fp-2.6.0 from the commandline. I am not sure if it will solve your problem with the missing unit/path, but if you ever used the original Borland Turbo Pascal, you will feel it is much faster than Lazarus. I think for the kind of project you are looking at, it might be the better choice. Cheers Chavoux On 19 February 2013 10:17, Johann Spies wrote: > My endeavour to return to Pascal is getting to the point of frustration: > > 1. Although I found that sometimes I have to tell Lazarus to scan the > fpcsource to be able to find installed units, it still happens that from > time to time I cannot compile something because a unit cannot be found. > > Today it is "*Can't find unit AvgLvlTree ... check if package LazUtils is > in the dependencies" > > I have read the wiki and FAQ about this type of problems but that did not > help at all. > > Both fpc and lazarus cannot find the unit despite the fact that I did a > rerun of fpcmkcfg adn despite that the following shows the unit is there: > > > locate -i avglvltree > /home/js/.lazarus/lib/LazUtils/lib/x86_64-linux/avglvltree.o > /home/js/.lazarus/lib/LazUtils/lib/x86_64-linux/avglvltree.ppu > /usr/share/lazarus/1.0.6/components/lazutils/avglvltree.pas > /usr/share/lazarus/1.0.6/components/lazutils/lib/x86_64-linux/avglvltree.o > > /usr/share/lazarus/1.0.6/components/lazutils/lib/x86_64-linux/avglvltree.ppu > /usr/share/lazarus/1.0.6/docs/xml/lazutils/avglvltree.xml > /usr/share/lazarus/1.0.6/test/lazutils/testavglvltree.pas > js at artikel ~/p/pascal> sudo fpcmkcfg > /tmp/fpc.cfg > > > *2. My second problem is not that serious but Lazarus as an editor is > extremely slow. It reminds me of the reason why I do not use Eclipse for > other projects and normally prefer Emacs or Vim. Unfortunately the fpc-ide > is not debug-enabled and I do not know how to enable it. I have recompiled > the sources and according to what I understand of the configuration in the > sources debug should be enabled. > > There must be some way to get around these type of frustrations. Any help? > > Regards > Johann > > > PS. I am working with Lazarus 1.0.6 and fpc-2.6.0-7 on Debian. I have > downloaded the packages from the Lazarus site and removed all standard > Debian freepascal-related packages from my system. > > > -- > Because experiencing your loyal love is better than life itself, > my lips will praise you. (Psalm 63:3) > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > >

Reply by email

Johann Spies
to Mattias Gaertner

On 19 February 2013 11:31, Mattias Gaertner wrote:

Thanks Mattias, Chavoux, Martin and Sven.

I have learnt from your advice.

Following Sven's instructions on how to add LazUtils helped for my first problem.

Obviously I do not know about Lazarus itself and will have to work through some tutorials.

As an alternative, try running fp-2.6.0 from the commandline. I am not

sure

I have tried but it does not have the debugger enabled.

This shows all paths passed to the compiler:

Show quoted text 23 lines
Project / Project Options / Show Options This shows the paths from used packages: Project / Project Options / Inherited Analog exists for packages. Your fpc.cfg adds more paths. See View / IDE Internals / FPC Info. You can see the search paths for a single unit in Source / Unit Information. > Nothing stops Lazarus from reading and writing this information > from the .cfg file. The compiler reads its cfg file and the IDE reads the information from the compiler. The cfg is global, effects everything and is specific to your machine. Lazarus projects and packages are meant to work cross platform. There is no reason for Lazarus to write something to the fpc.cfg.

I will keep your answers as part of my documentation.

Thanks again.

Regards
Johann

Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130219/66000c49/attachment.html>

Reply by email