Lazarus

Installation => Linux => Topic started by: Chronos on October 26, 2017, 10:49:24 pm

Title: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Chronos on October 26, 2017, 10:49:24 pm
After upgrade to Xubuntu 17.10 amd64. Even removed previous packages and purged configuration and installed cleanly default packages without help.
Lazarus version: 1.8.0~rc4+dfsg-1
FPC version: 3.0.2+dfsg-5ubuntu1
Removed ~/.lazarus directory.

Still Build Lazarus IDE with Normal profile fails:
Quote
lazarus.pp(1,1) Fatal: Cannot find lazcontroldsgn used by Lazarus. Check if package LazControlDsgn creates lazcontroldsgn.ppu, check nothing deletes this file and check that no two packages have access to the unit source..

What is best way to resolve this issue?
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: JuhaManninen on October 26, 2017, 11:23:08 pm
What is best way to resolve this issue?
Just install package components/lazcontrols/design/lazcontroldsgn.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Chronos on October 27, 2017, 07:51:35 am
Problem is that this package is already "installed". It is listed in menu Package - Install/Uninstall packages... on left side.
If I open this package manually and click to Use - Install, then same error appears. If I click to Compile package, then it compiles itself.
Then if I click to package Use - Install or Tools - Build Lazarus then it compiles ok. But after lazarus restarts itself, the problem is there again. So something is bad.
Also I checked version in About dialog and reported date is 2017-10-23 and not today. So I am not sure if correct version is started. Probably yes, just date is incorrect. I see new compiled version in ~/.lazarus/bin/lazarus
Lazarus is started from main menu using: startlazarus-1.8.0 %f

But if it isn't problem with ~/.lazarus directory then what else can affect lazarus configuration.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Chronos on October 28, 2017, 11:27:44 pm
Somebody probably messed up lcl packages for Ubuntu. Because according idemake.cfg there should be directory -Fu/usr/lib/lazarus/1.8.0/components/lazcontrols/design/lib/x86_64-linux/gtk2 but such directory doesn't exist.
Even required file lazcontroldsgn.ppu doesn't exist anywhere in apt database:
apt-file search lazcontroldsgn.ppu returns none such package.

Question is why Lazarus is not able to recompile such package by itself inside ~/.lazarus/units/x86_64-linux/gtk2 ? In fact if I compile package manually it is generated to ~/.lazarus/lib/LazControlDsgn/lib/x86_64-linux/gtk2/ Then new line is added to idemake.cfg as -Fu~/.lazarus/lib/LazControlDsgn/lib/x86_64-linux/gtk2 but this remains only for one IDE compilation. Next run it disappears and error comes back.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: jerrylaz on November 28, 2017, 04:00:23 am
Hi All,

I am having the same problem as Chronos.
I am using Ubuntu ver 17.10 running lazarus installed from repo...

EDIT:

PROBLEM SOLVED!!
And thanks goes to Martin_fr from another thread http://forum.lazarus.freepascal.org/index.php?topic=32779.0

You need to install the  package lazcontroldsgn.lpk from /lazarus/components/lazcontrols/design.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Chronos on November 28, 2017, 09:40:47 am
Hi All,
PROBLEM SOLVED!!
And thanks goes to Martin_fr from another thread http://forum.lazarus.freepascal.org/index.php?topic=32779.0

You need to install the  package lazcontroldsgn.lpk from /lazarus/components/lazcontrols/design.

No, unfortunately this doesn't solve problem permanently but just for one rebuild. The issue is still valid after next restart of Lazarus.
Any other idea how to solve it?
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Raf20076 on January 31, 2018, 09:02:33 am
IT IS SERIOUS PROBLEM  WHICH IS NOT SOLVED YET! >:(

I have got the same problem

Quote
You need to install the  package lazcontroldsgn.lpk from /lazarus/components/lazcontrols/design. -
This doesn't work at all.

I was trying to install sptktoolbar and I have got this error

Quote
Lazarus.pp(1,1) Fatal: Cannot find lazcontroldsgn used by Lazarus. Check if package LazControlDsgn creates lazcontroldsgn.ppu, check nothing deletes this file and check that no two packages have access to the unit source..

I am using Debian Stretch (32bit) 9.3 and lxde graphic environment. Lazarus is from Debian repo backports 1.8+dfsg-1-bpo9+1

Any Ideas?
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Raf20076 on January 31, 2018, 10:50:13 am
I solved it 8-)
I solves it  8-)
in lazarus first install the  package lazcontroldsgn.lpk from /lazarus/components/lazcontrols/design. Close Lazarus.

I copied files
LazControlDsgn.compiled  lazcontroldsgn.ppu  registerlazcontrols.o
lazcontroldsgn.o    lazcontrols.res     registerlazcontrols.ppu
from
/home/debian/.lazarus/lib/LazControlDsgn/lib/i386-linux/gtk2 (debian - is my username)
into
/usr/lib/lazarus/1.8.0/components/lazcontrols/lib/i386-linux/gtk2

Go to your home directory and type ls -a
You will see .lazarus directory
type cd .lazarus/lib/LazControlDsgn/lib/i386-linux/gtk2
type ls
You will see files
LazControlDsgn.compiled  lazcontroldsgn.ppu  registerlazcontrols.o
lazcontroldsgn.o    lazcontrols.res     registerlazcontrols.ppu
the copy then one by one into /usr/lib/lazarus/1.8.0/components/lazcontrols/lib/i386-linux/gtk2
type
cp LazControlDsgn.compiled /usr/lib/lazarus/1.8.0/components/lazcontrols/lib/i386-linux/gtk2
cp lazcontroldsgn.ppu /usr/lib/lazarus/1.8.0/components/lazcontrols/lib/i386-linux/gtk2
cp registerlazcontrols.o /usr/lib/lazarus/1.8.0/components/lazcontrols/lib/i386-linux/gtk2
cp lazcontroldsgn.o /usr/lib/lazarus/1.8.0/components/lazcontrols/lib/i386-linux/gtk2
cp lazcontrols.res /usr/lib/lazarus/1.8.0/components/lazcontrols/lib/i386-linux/gtk2
cp registerlazcontrols.ppu /usr/lib/lazarus/1.8.0/components/lazcontrols/lib/i386-linux/gtk2
Start your Lazarus. Now you can install components

look at https://forum.lazarus.freepascal.org/index.php/topic,39894.0.html



Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Thaddy on January 31, 2018, 01:39:01 pm
If you needed to go through all these hoops and loops YOU were doing something seriously wrong!
And -btw- fpc 3.0.4 and Lazarus 1.8 are in stretch-backports.
Don't consider the above posting as serious advice.  But I am glad your investigative nature solved the problem for you. 8-)
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Raf20076 on January 31, 2018, 02:32:08 pm
Thanks Thaddy
I saw that since October 2017 no one gave any answers to Chronos, how to solve the problem. Now the same problem happened to me, so I have decided to sort it out, successfully. If you know better solution to this problem, you are welcome.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: del on January 31, 2018, 10:22:28 pm
FWIW I had the same problem a couple of weeks ago. And I solved it with a piecemeal installation of the controls package. Then it found another similar problem - just kicking the can down the road. I was trying to use the Synaptic Package Manager (Mint) to install FPC / Lazarus out of deb files. Couldn't make it work. So I just double clicked on the deb files and let them do the installing.

Got the files from here:

https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%201.8.0/

I got a "code red" warning about a package conflict after I installed the FPC deb. But I ignored it and installed the FPC source (success - green) and Lazarus (success - green). Bingo. Lazarus with its Cheetah icon appears in the start menu.

Click on it and off we go. This is my favorite way of installing Lazarus on my machines. EVERYTHING works - AnchorDockingDsgn: install, recompile IDE, NO errors / warnings. OnlinePackageManager: install, recompile IDE, NO errors / warnings. You're ready to rock in less than 10 minutes.  8-)
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: JuhaManninen on February 01, 2018, 10:18:16 am
Some people may experience the problems because they start "lazarus" binary directly instead of using "startlazarus".
Lazarus is installed in a write protected directory, thus a new rebuilt binary is placed in the local config directory. Startlazarus uses it when it is available.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Raf20076 on February 01, 2018, 11:30:28 am
Quote
Lazarus is installed in a write protected directory, thus a new rebuilt binary is placed in the local config directory. Startlazarus uses it when it is available.

Maybe I should start Lazarus from terminal as super user (after su command)
su
lazarus
and then install package lazcontroldsgn.lpk from /lazarus/components/lazcontrols/design then rebuild Lazarus.
Perhaps LazControlDsgn directory then will be installed in /usr/lib/lazarus/1.8.0/components/lazcontroldsgn/lib/i386-linux/gtk2 and then the line -Fu/usr/lib/LazControlDsgn/lib/i386-linux/gtk2 could be added automatically to idemake.cfg file. see here http://forum.lazarus.freepascal.org/index.php/topic,39894.0.html  ?
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: JuhaManninen on February 01, 2018, 12:50:08 pm
Maybe I should start Lazarus from terminal as super user (after su command)
su
lazarus
No! Run "startlazarus" as I wrote. It will start the correct binary.

Quote
and then install package lazcontroldsgn.lpk from /lazarus/components/lazcontrols/design then rebuild Lazarus.
Perhaps LazControlDsgn directory then will be installed in /usr/lib/lazarus/1.8.0/components/lazcontroldsgn/lib/i386-linux/gtk2 and then the line -Fu/usr/lib/LazControlDsgn/lib/i386-linux/gtk2 could be added automatically to idemake.cfg file. see here http://forum.lazarus.freepascal.org/index.php/topic,39894.0.html  ?
Non of that is needed. I don't know why a simple thing turned into so complex issue in your computer.
You could try with a clean configuration by removing or renaming the local config dir (~/.lazarus).

If the problems continue, you may want to remove the Lazarus installation completely from write protected /usr directory and get the sources directly from SVN into your home dir. Then build with "make". Then you can start the "lazarus" binary directly because it is not write protected. A rebuild will always happen in-place.
When using the fixes_1_8 SVN branch you always get the latest bug fixes as an extra bonus.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: torumyax on February 21, 2018, 10:59:01 pm
I'm having the exact same problem on Ubuntu 17.10(fresh install). The first thing I did was to install lazarus and try to rebuild the IDE. Then I got this error.

Code: Pascal  [Select][+][-]
  1. lazarus.pp(1,1) Fatal: Cannot find lazcontroldsgn used by Lazarus. Check if package LazControlDsgn creates lazcontroldsgn.ppu, check nothing deletes this file and check that no two packages have access to the unit source..
  2.  

I also getting this error when messing around with "option"
Code: Pascal  [Select][+][-]
  1. The Lazarus directory "/usr/lib/lazarus/" does not look correct:
  2. directory lcl not found

I might have mistakingly sudo'ed to startlazarus right after "sudo apt install lazarus"..

I'll try reinstalling lazarus and report back.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: torumyax on February 22, 2018, 12:32:30 am
OK, I gave up and downloaded the official files from
https://www.lazarus-ide.org/

Code: Pascal  [Select][+][-]
  1. $ sudo apt install ./lazarus-project_1.8.0-1_amd64.deb
  2. $ sudo apt install ./fpc-src_3.0.4-2_amd64.deb
  3. $ sudo apt install ./fpc_3.0.4-2_amd64.deb

exit, start new terminal, and

$ startlazarus
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: torumyax on February 22, 2018, 12:41:54 am
I hope this will be fixed soon because I've been advertising at my blog and somewhere else that this cool looking lazarus can be installed with just one line "sudo apt install lazarus".
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: guest48180 on April 08, 2018, 12:28:21 am
I just installed the Lazarus 1.8.2 w/fpc 3.0.4 and I can't install packages either.

Some people may experience the problems because they start "lazarus" binary directly instead of using "startlazarus".
Lazarus is installed in a write protected directory, thus a new rebuilt binary is placed in the local config directory. Startlazarus uses it when it is available.
I used startlazarus and I still got the error and still couldn't install packages.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: guest48180 on April 08, 2018, 03:34:52 am
Here's some output that I hope helps the devs fix this issue:

Code: Pascal  [Select][+][-]
  1. slyde@slyde-HP-Pavilion-Desktop-PC-570-p0xx ~ $ sudo startlazarus
  2.  is a file
  3. TLazarusManager.Run starting /usr/lib/lazarus/1.8.2/lazarus ...
  4. Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/slyde/.lazarus"
  5. Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
  6. Looking for code tools config file:  "/home/slyde/.lazarus/codetoolsoptions.xml"
  7. NOTE: codetools config file not found - using defaults
  8. Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False
  9. TComponentTreeView.SetSelection: Updating component node values.
  10. TLazSourceFileManager.LoadLFM Creating designer for hidden component of /usr/lib/lazarus/1.8.2/components/rtticontrols/examples/examplegrid1.pas
  11. TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner
  12. NOTE: Window with stalled focus found!, faking focus-out event
  13. NOTE: Window with stalled focus found!, faking focus-out event
  14. WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message: TTreeView
  15. Hint: closing unneeded package "sqlite3laz"
  16. Note: (lazarus) renamed file "/usr/lib/lazarus/1.8.2/lazarus" to "/usr/lib/lazarus/1.8.2/lazarus.old"
  17. Info: (lazarus) Execute Title="Build IDE"
  18. Info: (lazarus) Working Directory="/usr/lib/lazarus/1.8.2/"
  19. Info: (lazarus) Executable="/usr/bin/make"
  20. Info: (lazarus) Param[0]="idepkg"
  21. Info: (lazarus) Param[1]="-w"
  22. TIDEFPCParser.ImproveMsgUnitNotFound FindUnitInAllUsesSections failed due to syntax errors or lazcontroldsgn is not used in /usr/lib/lazarus/1.8.2/ide/lazarus.pp

After starting Lazarus, I tried to add the sqlite3laz package and rebuild the IDE.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: JuhaManninen on April 08, 2018, 10:36:01 am
I hope this will be fixed soon because I've been advertising at my blog and somewhere else that this cool looking lazarus can be installed with just one line "sudo apt install lazarus".
Yes I hope so, too, but this is a wrong forum to complain about it. With "sudo apt install ..." the packages come from the distribution's repository. Their packages are faulty. Complain in their forum please.

I just installed the Lazarus 1.8.2 w/fpc 3.0.4 and I can't install packages either.
Did you use packages provided by Lazarus project or by your distribution (Ubuntu or whatever)?

Quote
Here's some output that I hope helps the devs fix this issue: ...
If the packages are from your distribution's repository, how are Lazarus developers supposed to fix them?

BTW, the .deb packages provided by Lazarus project are not guaranteed to work in every distro version either because they come with different library and binutil etc. versions and the dependencies may not match.
In that case I recommend getting and building Lazarus from SVN. It is very easy once FPC is installed from the distro's repo.
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Laurie on May 19, 2018, 03:18:46 pm
Lazarus and free pascal are great...I have them on a Windows machine as well as RPi.
But I have hit the same problem with Ubuntu 18.04: Lazarus IDE will not build. It dies with following error:

"lazarus.pp(1,1) Fatal: Cannot find lazcontroldsgn used by Lazarus. Check if package LazControlDsgn creates lazcontroldsgn.ppu, check nothing deletes this file and check that no two packages have access to the unit source.."

This was on a clean install from bare metal ! This is what I did.
1. Reformatted and partitioned a new SSD.
2. Installed Ubuntu 18.04 LTS from CD by booting from CD on a Toshiba Laptop Tecra A9.
3. Downloaded lazarus_1.8.2+dfsg-3_all.deb and installed it. No problems.
4. Started Lazarus...no problems.
5. Immediately rebuilt the Lazarus IDE...error as outlined above.

I'm not sure where to go from here.
I don't wish to fiddle with a work around.
Perhaps I need to go back to Ubuntu 16 until a fix comes?
Any advice would be greatly appreciated.
Laurie
Title: Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: alex256 on July 04, 2018, 04:07:04 pm
Hello,

I was trying to rebuild Lazarus from sources in Debian repos to find where the issue is.

At first, I noticed that components/lazcontrols/design/lib is just not installed. After adding it to debian/lcl-gtk2.install and rebuilding the package, rebuilding the IDE became OK, but adding some packages (e.g SpartaDockedFormEditor) gives the similar error (cannot find sparta_mdi used by lazarus).

I started to search the difference between the Debian version and the original deb package and found the difference.lpks in Debian repos have this line:

Code: [Select]
<AutoUpdate Value="Manually"/>

and the lines in debian/rules which adds this:

Code: [Select]
# Mark package as manually compilable and install them
for package in `find -name '*.lpk'` ; \
do \
${MKDIR} `dirname "${LIB_DIR}/$${package}"` ; \
sed -e 's@\(\W*\)<CompilerOptions>.*@\1<AutoUpdate Value="Manually"/>\n&@' "$${package}" > "${LIB_DIR}/$${package}" ; \
done

What is more interesting, the debian/rules file in the original Lazarus sources also have these lines, but the deb package from lazarus website doesn't mark lpks as "<AutoUpdate Value="Manually" />"


Related Debian bugs:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896702
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898310
Title: SOLVED Re: Fatal: Cannot find lazcontroldsgn used by Lazarus.
Post by: Laurie on July 07, 2018, 02:02:58 pm
SOLVED
I solved this on another post,  below is the text of that post.
https://forum.lazarus.freepascal.org/index.php/topic,41264.msg287107.html#msg287107

FINALLY..I now seem to have a solution for this irritating problem.
I hope this helps those still unable to add packages. This is my solution.....
1 Open a terminal with CTRL-ALT T
2. In the terminal start Lazarus with "sudo startlazarus"
3. From the top line menu select Package | Open loaded package
4. Scroll down the list of packages and open LazControlDsgn package
5. When the package window opens, Click on " Compile" on the top line if the window
6. Then click "Use" (next to compile)  and select install. (This is very important to do)
7. From the "Tools" menu on the top line menu, select "Build Lazarus with Profile: Normal IDE"
And that should do it !! :D

Lazarus should then build and find the LazcontrolDsgn compiled package. Once the IDE is built, shut down Lazarus and the terminal and re-start Lazarus normally.
Now you should be able to add other packages and rebuild the IDE like previously.  The only problem that I've noted is that Lazarus does not re-start automatically after the rebuild.
You don't have to use "sudo" to start Lazarus again. I suspect that the original problem might have been a permissions issue in lazarus not finding the compiled LazControlDsgn compiled unit, so (possibly ?) using "sudo startlazarus" the first time allowed the compiled unit/package to be saved in a protected directory? Only a guess.
Now...how to allow Lazarus to re-start automatically after rebuilding the IDE ???  :-\
HTH.

Laurie
TinyPortal © 2005-2018