Lazarus

Programming => Operating Systems => macOS / Mac OS X => Topic started by: LittleBritaly on September 26, 2020, 08:48:17 pm

Title: Weird problem installing packages
Post by: LittleBritaly 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.

Title: Re: Weird problem installing packages
Post by: trev 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]
Title: Re: Weird problem installing packages
Post by: LittleBritaly 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.



 
Title: Re: Weird problem installing packages
Post by: trev on September 27, 2020, 09:11:06 am
Excellent - glad to hear it's now working for you.
TinyPortal © 2005-2018