Recent

Author Topic: Weird problem installing packages  (Read 400 times)

LittleBritaly

  • New Member
  • *
  • Posts: 22
Weird problem installing packages
« on: September 26, 2020, 08:48:17 pm »
Lazarus 2.0.10, FPC 3.2.0, on Sierra

If i try and install a package (just as an example, zeoslib), the required packages are compiled, installed and the ide is rebuilt.

Lazarus then launches, except there is no Lazarus bar across the top (File, Edit, Search etc).

Everything else is there, including the newly installed package on the toolbar, but in this state it is useless.

Therefore I click the close buton and relaunch Lazarus as normal, it starts, but the packages i just installed are no longer there.

Does anyone have a clue as to what is wrong ?

One more thing i have just noticed is that if i go back and seach in the installed packages for the package i've just installed, it shows up as being installed, even though it's toolbar is not there.

« Last Edit: September 26, 2020, 08:57:13 pm by LittleBritaly »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1046
  • Former Delphi 1-7, 10.2 User
Re: Weird problem installing packages
« Reply #1 on: September 27, 2020, 02:54:03 am »
Issue 1 - No Lazarus menu bar

The only time I have experienced this has been when starting the Lazarus  executable from a terminal with "./lazarus". Using "open lazarus.app" instead, does display the menu bar.

I've not had it happen after installing a package and Lazarus restarts itself, so that's a little odd.

Issue 2 - No package installed

Lazarus is installed in a non-user-writable directory. When you recompile it to add a package, it cannot write to the original directory, so it writes the new Lazarus executable to the .lazarus (dot lazarus) directory in your home directory.

Of course, when you restart Lazarus using the icon in Applications or Finder, you are restarting the original unaltered executable and not the newly compiled one which includes the package.

Look in your .lazarus directory and use sudo to overwrire the original lazarus executable with the version found in your .lazarus directory.

[I recently lodged a bug for this issue: https://bugs.freepascal.org/view.php?id=37753]
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (Parallels VM)

LittleBritaly

  • New Member
  • *
  • Posts: 22
Re: Weird problem installing packages
« Reply #2 on: September 27, 2020, 08:37:11 am »
Thank you for your help.

To try to ensure ths wasn't a corrupt installation, i deleted /Library/Lazarus and ~/.lazarus/bin/lazarus, reinstalled Lazarus,  then tried installing packages again, with the exact same result, I'm asked if i want to rebuild the ide, I answer yes, then once rebuilt Lazarus relaunches, only there is no menu bar.

My only option is to close Lazarus (by clicking on the x in the toolbar).

I then followed your advice and from a terminal as a normal user, I ran this command.

cp ~/.lazarus/bin/lazarus /Library/Lazarus/

I can then start Lazarus as normal from Launchpad and the newly installed packages show up.

I DID NOT do this as root or sudo and so far it seems to work, but will report back if i do have issues.

I was not given the option to install into a different directory, the installer jumps from Licence to Installation type, bypassing the Destination Select option.

There is a "Change Install Location" button on the "Installation Type" screen, but this only allows me to select a disk to install to.

Thank you for your help, very much appreciated.



 

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1046
  • Former Delphi 1-7, 10.2 User
Re: Weird problem installing packages
« Reply #3 on: September 27, 2020, 09:11:06 am »
Excellent - glad to hear it's now working for you.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (Parallels VM)

 

TinyPortal © 2005-2018