Recent

Author Topic: Please fix this  (Read 7117 times)

guest48180

  • Guest
Please fix this
« on: May 23, 2018, 05:05:44 pm »
After leaving Lazarus for a while and messing with Code::Blocks, I came back to Lazarus. Just something about object Pascal. But, when I installed Lazarus, it had a problem. I couldn't add packages. I even posted about it and no one cared to offer up an answer.  So I left to play with C++ again, giving the Laz team time to fix this issue. Just came back again and got this when I tried to install a package:
Code: Pascal  [Select][+][-]
  1. lazarus.pp(1,1) Fatal: Cannot find lazcontroldsgn used by Lazarus.

I didn't install Lazarus and FPC from the repo. I used deb http://ftp.debian.org/debian stretch-backports main to install them. And even ran Lazarus using startlazarus. From my term window, I got this to go with the Messages error I just showed:
Code: Pascal  [Select][+][-]
  1. TIDEFPCParser.ImproveMsgUnitNotFound FindUnitInAllUsesSections failed due to syntax errors or lazcontroldsgn is not used in /usr/lib/lazarus/1.8.2/ide/lazarus.pp

I like using Lazarus, but not being able to add packages kinda sucks. I see where this is a well-documented issue. Can't this be fixed?

Josh

  • Hero Member
  • *****
  • Posts: 1270
Re: Please fix this
« Reply #1 on: May 23, 2018, 05:13:17 pm »
Hi
When I tried. I used fpxupdeluxe to install lazarus and this worked fine.

Fpcupdeluxe can install various Lazarus versions, in various folders..

https://github.com/newpascal/fpcupdeluxe/releases

Maybe worth trying.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Please fix this
« Reply #2 on: May 23, 2018, 05:35:06 pm »
1) Which package do you try to install.

2) LazControlDsgn is part of the distribution.
So you either:
- have an incomplete distribution
  find your install folder, there should be a folder
    <your install path> /components/lazcontrols/design
    with the package LazControlDsgn.lpk in it

- if you have this folder, you probably have a corrupt config.
 (assuming linux) backup the folder ~/.lazarus and then remove it
 start the IDE, fill out the setup dialog as needed and see if it works

- if you do not want to delete your conf, you can check pathes in environmentoptions.xml in your conf.
OR
 you can go to menu packages > open package ... then select the package from the above folder, and try if it helps (you may need to do that for other packages too)

guest48180

  • Guest
Re: Please fix this
« Reply #3 on: May 23, 2018, 06:39:42 pm »
Quote
1) Which package do you try to install.
sqlite3laz 0.4

Quote
2) LazControlDsgn is part of the distribution.
I know.

Quote
find your install folder, there should be a folder
    <your install path> /components/lazcontrols/design
    with the package LazControlDsgn.lpk in it
See attached pic.

Quote
you can go to menu packages > open package ... then select the package from the above folder, and try if it helps (you may need to do that for other packages too)
Same error given as noted in previous post.

Where can I get nightly builds? Maybe that works. I sure hope so. I remember when I started using Lazarus in 2012 how smooth it was, Best IDE ever. And now I can't even add packages. AND this is an issue that's been going on for some time, according to the various posts I've read. A lot of passing the buck in those. I run Linux Mint 18.3. I got Lazarus and FPC from the stretch backport provided to me from Thaddy. All I want is a tool that works.

Zvoni

  • Hero Member
  • *****
  • Posts: 2300
Re: Please fix this
« Reply #4 on: May 23, 2018, 07:00:37 pm »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Please fix this
« Reply #5 on: May 23, 2018, 07:30:07 pm »
Strange...

I can only provide generic tips how to deal with this, as I do not get that error.

Errors like this can be caused, after updating fpc. The message window has a context menu, which offers to copy "All/Original Messages to clipboard". There may be other hints in those messages, such as a wrong ppu version.

Building the IDE on linux (if you do not build as root) does create ppu files in ~/.lazarus/ (well in some subfolder in there). Maybe they did not get updated.
You can try to delete them, or in the Tools menu "Configure Build Lazarus" select "clean all".

-------------
If that does not help:
Go to the "Configure Build Lazarus"
specify the option -va
and build (probably ok WITHOUT clean all)
Then copy "All/Original Messages to clipboard".
And paste the last 200 lines as attachment to the forum.

-va causes the compiler to make a note of every location it tried to find a file. Maybe that give a hint.
In addition you may try
  find ~/.lazarus -name '*.ppu' | grep -i lazcontroldsgn
or similar to see if a ppu exists and what its name is.

Also check for differences in the upper/lower case. Maybe that gives a hint.

guest48180

  • Guest
Re: Please fix this
« Reply #6 on: May 23, 2018, 09:03:10 pm »
I uninstalled Lazarus and FPC and autoremoved lingering files. Then reinstalled everything again. I started lazarus through the terminal (startlazarus) and tried to add lazcontroldsgn.lpk. And Lazarus crashed! Again, this isn't a repo copy of Lazarus and FPC. I got this from stretch-backports. I'm not the only one having this issue, so there has to be something not right somewhere. Here's a copy of the crash for the Laz team.


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Please fix this
« Reply #7 on: May 23, 2018, 10:16:27 pm »
I understand the frustration.

The problem with a scenario like this is: Most time those who experience the issue are happy once it works for them. Then there is not enough info to fix the origin. Sometimes it is also a factor outside the IDE (in which case ideally a better error message would be implemented, but that also depends on enough feedback).

To add upfront: The development team has different people for different parts, different OS, .... I am likely not the one who maintains whatever code is involved. But if I get enough info, to pin point it, I help adding it to the bugtracker, so an improvement can be worked on.
Unfortunately with the size of the project it can prove a lot of work to get the info.

Additionally: stretch-backports is not maintained by the Lazarus team. No one from the team knows how they build the package. Though I doubt that this is the cause of the problem.

----------------------
From the log it looks like you run into a 2nd error (different from the original issue).

It looks like it did compile the IDE. There should be a file "lazarus" in /home/slyde/.lazarus/ (or /home/slyde/.lazarus/bin - I am not perfectly sure, I occasionally use linux, but my main machine is windows).

If you use "startlazarus" it should start the new IDE. If you start "lazarus" this will not work. [1]

At least the log says
Quote
Hint: (lazarus) TMainIDE.DoRestart
And that only happens either after a successful rebuild, or if you select it from the menu. Since there is no error regarding the build, I assume the former.
Is this correct, or did you trigger the restart in any other way?

This means we don't know why it did not find the file before.
But you said you did try lazarus before. So it is possible an old file was there. And such old files can apparently sometimes cause the "not found" error.

---------------------
The crash happens while the IDE tries to close down.

Unfortunately the log doesnt have enough info on what exactly went wrong.

If you can build your IDE with  -gl  in the options ("Configure Build Lazarus"),  then next time it happens the log may have more info.

Also how did you start the rebuild? From "Configure Build Lazarus", or from "add packages" or ...?

Did you do any other stuff in the IDE, while the IDE was rebuilding, more to the point  at the time it crashed?
The only thing that your log indicates is: At the time of the restart, the IDE was reacting to a menu-item or toolbar-button having been clicked.

=========
[1]
The reason you need startlazarus is that the install is done as root, and not writeable to your user.
SO the original lazarus can not be overwritten by you. The replacement goes into your user folder. startlazarus will find it there.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4458
  • I like bugs.
Re: Please fix this
« Reply #8 on: May 23, 2018, 11:02:01 pm »
The problem is with Ubuntu and Mint packages as explained in a recent post here:
 https://forum.lazarus.freepascal.org/index.php/topic,41264.msg286655.html#msg286655

You should report the problem in Mint's forum or bug tracker. Lazarus developers do not control their package repository as you may understand.
You have at least 2 choices now:
  • Use a better Linux distro. Mint used to be very good but not so any more. For example Manjaro has the latest versions of FPC / Lazarus and they work. Recommended!
  • Get the Lazarus fixes branch from SVN as explained in the above post. It is extremely easy once FPC is installed.

Fpcupdeluxe would be an overkill for such a simple task (svn co ... + make).
It is more usefull if you want different versions of FPC.
« Last Edit: May 23, 2018, 11:15:00 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Please fix this
« Reply #9 on: May 24, 2018, 01:36:15 am »
I must admit I am always a bit puzzled as to why users insist on using the distribution package maintainers versions of Lazarus.

The Lazarus maintainers versions, such as http://sourceforge.net/projects/lazarus/files/ is aways either at the same level or, more often, ahead. And, my experience here only, always works cleanly "out of the box" (as long as you are not leaving old config files lying around).

I tend to install using dpkg and then apt to resolve dependencies but as most distributions now seem to have gdebi it would make more sense, it resolves dependencies as you go. So -

download from above link (and keep)
gdebi fpc_3.0.4-3_amd64.deb
gdebi  fpc-src_3.0.4-3_amd64.deb
gdebi lazarus-project_1.8.4-0_amd64.deb

There is some GUI tool that pops up if you double click in a file manager but I don't know if it resolves dependencies.

So, simple summary, get your files from the Lazarus SourceForge site, install them with gdebi and do so in the correct order. Will take less time than reading this thread.

 Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

guest48180

  • Guest
Re: Please fix this
« Reply #10 on: May 24, 2018, 01:46:03 am »
Sounds good, Davo. I'll do it right after I chunk Mint in the trash and install Manjaro.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4458
  • I like bugs.
Re: Please fix this
« Reply #11 on: May 24, 2018, 10:08:08 am »
Sounds good, Davo. I'll do it right after I chunk Mint in the trash and install Manjaro.
No. Davo's advice applies to distros using .deb packages like Ubuntu and Mint.
It was me who recommended Manjaro. It has a different package format. Its repository has the latest versions of SW with only 1-2 weeks delay and everything just works.
So, now you have at least 3 choices:
  • Use Manjaro.
  • Get .deb packages provided by Lazarus project and install them into your Mint as explained by Davo.
  • Get the fixes branch from SVN.
People have so many installation problems with Ubuntu and Mint. :(
What should we do?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
Re: Please fix this
« Reply #12 on: May 24, 2018, 11:32:27 am »
Linux Mint users need to start posting into the Linux Mint Forum and suggesting:
1) An improvement is needed.
2) The source should be obtained from  http://sourceforge.net/projects/lazarus/files/

I'll start a thread later today when I have a few moments.
[Edit: Done. See https://forums.linuxmint.com/viewtopic.php?f=47&t=269997]
« Last Edit: May 24, 2018, 04:38:30 pm by Windsurfer »

guest48180

  • Guest
Re: Please fix this
« Reply #13 on: May 24, 2018, 09:37:13 pm »
So I got switched over to Manjaro, installed Lazarus/FPC, stated Lazarus and just ran the form it opens when you initially run start Lazarus. And this is what I got:

Code: Pascal  [Select][+][-]
  1. Compile Project, Target: /home/slyde/tmp/project1: Success, Warnings: 2
  2. project1.lpr(20,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
  3. project1.lpr(20,1) Warning: "crtendS.o" not found, this will probably cause a linking failure

The form opened, but I havent ever seen these warnings before.

Thaddy

  • Hero Member
  • *****
  • Posts: 14159
  • Probably until I exterminate Putin.
Re: Please fix this
« Reply #14 on: May 24, 2018, 09:46:08 pm »
That warning can be resolved by providing the path to your GNU C directory. Example:
fpc -Fl/usr/lib/gcc/arm-linux-gnueabihf/6.3.0

I really do not understand why that has not been fixed in a generic way, it is definitely not important but this is how to solve it,
Use the highest or default version of that path.(/usr/lib/gcc/)
Code: Bash  [Select][+][-]
  1. pi@raspberrypi:~ $ whereis gcc
  2. gcc: /usr/bin/gcc /usr/lib/gcc

As far as I am concerned this can be removed altogether. And it is usually harmless.

Unless you are using a very old nix. "Probably" should be interpreted as "may"....
And it should be a note, not a warning.
« Last Edit: May 24, 2018, 10:04:20 pm by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018