Recent

Author Topic: Lazarus Release Candidate 1 of 3.0  (Read 55007 times)

Tomki

  • New Member
  • *
  • Posts: 35
Re: Lazarus Release Candidate 1 of 3.0
« Reply #165 on: October 14, 2023, 12:14:20 pm »
OK - any hint how I can cleanup the previous install?
The installation of Beta 3 worked fine after I deleted everything I could find from the previous installation. So I don't know why a recompile of the IDE doesn't find the files.
I searched the file manually and found it on "/Users/thomas/.lazarus/lib/DateTimeCtrls/lib/x86_64-darwin/cocoa/datetimepicker.ppu". How can I tell Lazarus that it's there?

Also in RC2 the same problem with DateTimePicker remains. This is really annoying.

dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 1 of 3.0
« Reply #166 on: October 14, 2023, 01:02:02 pm »
Tomki, I am unsure about your mention of Beta3 and RC2, this thread is about RC1.

Anyway, the problem you are having is one of the reasons many people will tell you to build Lazarus from source, don't install and do set an explicit path to the config dir, --pcp=....

The content you see in ~/.lazarus is part, effectively, of an old config, its not usable by a new install. So, when you do a new install, set its config directory somewhere different from ~/.lazarus using the --pcp switch. I believe (but have not confirmed as yet, that if you start Lazarus from the Finder with a double click on the lazarus.app dir it ignores the content of the lazarus.cfg, and that can hold a --pcp=... line. So, perhaps the best way is to have a script that starts Lazarus, something like (from memory, mistakes possible) -

Code: Text  [Select][+][-]
  1. #!/bin/bash
  2. LAZARUS=lazarus-main
  3. open "$HOME/bin/Lazarus/$LAZARUS"/lazarus.app --args "--pcp=$HOME/bin/Lazarus/Configs/$LAZARUS"

Note that I keep my Lazarus builds in ~/bin/Lazarus and I have a directory in there called Configs. No hidden directories here. I give each Lazarus config the same name as its Lazarus install. That way, its dead easy to remove a complete install by deleting both the Lazarus directory and its corresponding Config dir.

I think you might do a lot better discussing your problems in the MacOS section of the forum, your problems do not seem to be about RC1, more a general install issue.

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

Tomki

  • New Member
  • *
  • Posts: 35
Re: Lazarus Release Candidate 1 of 3.0
« Reply #167 on: October 15, 2023, 08:41:58 am »
Hi Davo
Thanks for your quick reply!
I am referring to the install packages for MacOS RC1 as well as RC2. I am not an expert, who would be able to dig into the system as much as I might have to do. So I download the pkg and dmg files from sourceforge and install them. That‘s what they are there for.
However that‘s what causes the the problem with DateTimePicker on recompile after I installed additiomal packages (like ZEOS) with the online package manager. It‘s appears to be only this one litte bug that persists. Recompile always fails at this point.
I am unsure about how to install lazarus from source - otherwise I would have tried before. Is there a comprhensive toutorial for that?
Thanks for your help
Thomas

TRon

  • Hero Member
  • *****
  • Posts: 2538
Re: Lazarus Release Candidate 1 of 3.0
« Reply #168 on: October 15, 2023, 09:19:43 am »
I am unsure about how to install lazarus from source - otherwise I would have tried before. Is there a comprhensive toutorial for that?

Provided that you have all dependencies installed and have a working (standalone) and good configured Free Pascal compiler:

- Navigate your browser to https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/
- Select the directory that matches your preferred release of Lazarus
- Download either the zip or tar.gz file
- Extract the archive to a temp location
- then build Lazarus:
Code: [Select]
cd <temp location>/Lazarus
make distclean all LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigide
Note: Change the LCL_PLATFORM and CPU_TARGET as per your preference/host

- Wait for make to finish.
- Copy the contents of the Lazarus directory to where you wish your Lazarus "to be installed" (that really is the installation and you could even opt to build Lazarus in your 'installation' directory if you so wish to do so)

Use the instructions provided by dbannon to start Lazarus, please don't forget the --pcp option

That is about it for being a comprehensive tutorial.

fwiw probably even less than 2 cents: I agree with dbannon that this does not belong in this thread as there are better places to discuss these kind of things even though you are correct that it is confusing about the availability of different release candidates. Which is even more reason to not discuss RC2 related issues in this RC1 dedicated thread. The issues you mention are usually caused by the convenience of a ready to go installation package (which has to account for all circumstances and therefor not geared towards individual needs/requirements)

btw: (practice and preach, I know  :-[ ) doesn't the Lazarus mac installation package make use of the startlazarus executable ?
« Last Edit: October 15, 2023, 09:32:08 am by TRon »

dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 1 of 3.0
« Reply #169 on: October 18, 2023, 12:35:20 am »
......
btw: (practice and preach, I know  :-[ ) doesn't the Lazarus mac installation package make use of the startlazarus executable ?
As far as I know, startlazarus is only necessary if you have your install in root space. It hids all the complicated details going on when you rebuild, moving, effectively, your install into user space, in your PCP directory. If you install Lazarus into  user space, you can write directory there and its heaps simpler. 'lazarus' is all you need.

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

TRon

  • Hero Member
  • *****
  • Posts: 2538
Re: Lazarus Release Candidate 1 of 3.0
« Reply #170 on: October 18, 2023, 01:27:35 am »
As far as I know, startlazarus is only necessary if you have your install in root space.
That is exactly why I asked  :)

Quote
If you install Lazarus into  user space, you can write directory there and its heaps simpler. 'lazarus' is all you need.
Yes, I know. fwiw I still prefer to use startlazarus because if Lazarus failed to build correctly then startlazarus will automatically restore the previous working version. At least afaik it is startlazarus that responsible for doing that.

But, that is actually besides the point. sorry for the digression.

Reason to ask is where do the dmg install packages for macos install Lazarus ? My knowledge on that topic is none and I wondered if some of the issues that some macos users report stem from the fact that lazarus is installed to a otherwise protected directory and runs into issue because of not using startlazarus, using the lazarus executable instead.


dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 1 of 3.0
« Reply #171 on: October 18, 2023, 11:16:41 am »
.....
Reason to ask is where do the dmg install packages for macos install Lazarus ? My knowledge on that topic is none and I wondered if some of the issues that some macos users report stem from the fact that lazarus is installed to a otherwise protected directory and runs into issue because of not using startlazarus, using the lazarus executable instead.

Don't know, I only ever build Lazarus from source. Especially so on MacOS. But maybe you are right, I'd expect it to end up in a read only directory if installed from a dmg.

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

Tomki

  • New Member
  • *
  • Posts: 35
Re: Lazarus Release Candidate 1 of 3.0
« Reply #172 on: October 24, 2023, 01:02:53 pm »
I am unsure about how to install lazarus from source - otherwise I would have tried before. Is there a comprhensive toutorial for that?

Provided that you have all dependencies installed and have a working (standalone) and good configured Free Pascal compiler:

- Navigate your browser to https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/
- Select the directory that matches your preferred release of Lazarus
- Download either the zip or tar.gz file
- Extract the archive to a temp location
- then build Lazarus:
Code: [Select]
cd <temp location>/Lazarus
make distclean all LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigide
Note: Change the LCL_PLATFORM and CPU_TARGET as per your preference/host

- Wait for make to finish.
- Copy the contents of the Lazarus directory to where you wish your Lazarus "to be installed" (that really is the installation and you could even opt to build Lazarus in your 'installation' directory if you so wish to do so)

Use the instructions provided by dbannon to start Lazarus, please don't forget the --pcp option

That is about it for being a comprehensive tutorial.

fwiw probably even less than 2 cents: I agree with dbannon that this does not belong in this thread as there are better places to discuss these kind of things even though you are correct that it is confusing about the availability of different release candidates. Which is even more reason to not discuss RC2 related issues in this RC1 dedicated thread. The issues you mention are usually caused by the convenience of a ready to go installation package (which has to account for all circumstances and therefor not geared towards individual needs/requirements)

btw: (practice and preach, I know  :-[ ) doesn't the Lazarus mac installation package make use of the startlazarus executable ?


OK - Done so far. After cleaning up the old installation, I made a fresh install of fpc and fps-source; downloaded the Lazarus ZIP file and unzipped it.
Also, compiling Lazarus with the make worked. According TRons advice I copied everything in the following folder (macOS): "/Users/Thomas/Lazarus"
(However, there is no folder "Configs/")

What I cannot relate to are Davo's instructions
LAZARUS=lazarus-main
open "$HOME/bin/Lazarus/$LAZARUS"/lazarus.app --args "--pcp=$HOME/bin/Lazarus/Configs/$LAZARUS"

I'm sorry, but again, I am just not familiar with these system internals.
Could anyone please tell me how to proceed?
Thanks very much
Thomas

Tomki

  • New Member
  • *
  • Posts: 35
Re: Lazarus Release Candidate 1 of 3.0
« Reply #173 on: October 24, 2023, 01:07:16 pm »
If I open "startlazarus" I get the following error message from Terminal:

Last login: Tue Oct 24 13:03:39 on ttys000
/Users/thomas/Lazarus/startlazarus ; exit;                                     
thomas@Pro-von-Thomas ~ % /Users/thomas/Lazarus/startlazarus ; exit;
Info: (startlazarus) [TLazarusManager.Run] starting /Users/thomas/Lazarus/lazarus.app ...
Info: (startlazarus) [TLazarusManager.Run] exe=/usr/bin/open Params=[-a
/Users/thomas/Lazarus/lazarus.app
--args
--no-splash-screen
--force-new-instance
]
The application /Users/thomas/Lazarus/lazarus.app cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3863, _LSFunction=_LSOpenStuffCallLocal}

If I open "lazarus" the IDE starts up, but I have no menu bar at all.  :(

TRon

  • Hero Member
  • *****
  • Posts: 2538
Re: Lazarus Release Candidate 1 of 3.0
« Reply #174 on: October 24, 2023, 02:16:12 pm »
If I open "startlazarus" I get the following error message from Terminal:
Can you elaborate on what "open" means in your case ?

According to the wiki it should be:
Code: [Select]
open <full_path_required?/>startlazarus.app --args "--pcp=<your unique to this version of Lazarus configuration directory>
As you can see I do not know or am able to verify some of the details.

Quote
The application /Users/thomas/Lazarus/lazarus.app cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3863, _LSFunction=_LSOpenStuffCallLocal}
Besides the fact that I seem to have missed the --pcp option in the output the above quoted part of the message is more or less clear. Startlazarus seem unable to locate the lazarus.app executable. Again I miss the details / environment to further investigate why exactly that is happening to/for you.

So you happen to have dtruss available on your machine so that you could try and run the open command through dtruss (or perhaps open itself is able to display some detailed output) ? Something like dtruss (I use strace on linux) would allow you to investigate where the command is looking (which directories) to find the files it needs and why the opening of files and libraries fails.
« Last Edit: October 24, 2023, 02:20:19 pm by TRon »

Tomki

  • New Member
  • *
  • Posts: 35
Re: Lazarus Release Candidate 1 of 3.0
« Reply #175 on: October 24, 2023, 04:02:20 pm »
"open" means doubleclick in the finder... 
What is the unique " Lazarus configuration directory"? What needs to be in there or what do I have to look for? Do I have to create it - since there is no such directory created during build?!
The "make" process went normal as far as I can tell, so everything should be in place.
This might be a very minor problem, I'm just to stupid to solve it  :'(

TRon

  • Hero Member
  • *****
  • Posts: 2538
Re: Lazarus Release Candidate 1 of 3.0
« Reply #176 on: October 24, 2023, 04:52:15 pm »
"open" means doubleclick in the finder... 

Quote
What is the unique " Lazarus configuration directory"?
Some directory, you decide wherever, that keeps track of all your Lazarus settings. Hence, specific for this particular version of Lazarus especially if/when you use multiple installations.

Quote
What needs to be in there or what do I have to look for?
There does not have to be anything inside it. Even stronger, on/for a new fresh install of Lazarus make sure the directory itself is empty, completely empty and does not contain any files whatsoever. Did I already mention it needs to be empty because if not then I just mention that it must be empty. So whatever you do, make sure it is empty  :D

See also: https://wiki.lazarus.freepascal.org/pcp

Quote
Do I have to create it - since there is no such directory created during build?!
On Linux Lazarus and startlazarus will create that directory for you in case it does not exist. On MacOS ? I have no idea.

The important part to realize there is whenever you omit the --pcp option that lazarus will search and store the configuration files into a default storage location. And it will do, using the same directory, for every Lazarus version that you install. Mixing configuration between different versions of Lazarus can become problematic, especially when your old(er) installation already had additional(3th party)  components installed in the IDE.

Quote
This might be a very minor problem, I'm just to stupid to solve it  :'(
It probably is but my knowledge on how macos (desktop) solve things is not available so all I can rely on is your feedback.

I do know that using the finder dialog in Linux has similar issues with not providing the pcp option as by default that also tries to launch the executable from the path (that is why I prefer a shortcut) but at least there I can solve it by overriding the executable by a) removing any path to lazarus and b) adding a shortcut to the finder utility so that finder will always use my special crafted shortcut (which contains the --pcp option) and c) use the .lazarus.cfg file inside the lazarus directory (but according to dbannon that solution does not seem to work for macos and finder).
« Last Edit: October 24, 2023, 04:57:12 pm by TRon »

dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 1 of 3.0
« Reply #177 on: October 25, 2023, 01:13:05 pm »
What I cannot relate to are Davo's instructions
LAZARUS=lazarus-main
open "$HOME/bin/Lazarus/$LAZARUS"/lazarus.app --args "--pcp=$HOME/bin/Lazarus/Configs/$LAZARUS"

Sorry Tomki, those lines would go in a script normally, an executable script. If you don't mind a lot of typing, you could just type in -
Code: Bash  [Select][+][-]
  1. $> open "$HOME/bin/Lazarus/lazarus-main/lazarus.app --args "--pcp=$HOME/bin/Lazarus/Configs/lazarus-main"
Its a long command line and therefore prone to mistakes. So, unix people in particular like to make little scripts that remember all the hard stuff for us.

The important thing here is that you open lazarus.app (or startlazarus.app) not just lazarus (or startlazarus). This is a Mac thing, hard, from what little I know about Mac, to tell the difference between 'lazarus' and 'lazarus.app' in the Finder because Mac likes to hide the extension (much the same as Windows). I suspect that is your problem. Don't forget, that command line suits me, I have my Lazarus installs down in a $HOME/bin/Lazarus and I make a directory $HOME/bin/Lazarus/Configs - understanding that, you can see what you need to change in that command line to suit your locations.

When Lazarus opens up without its menus and you cannot use the mouse, its usually (always ?) because you have launched the binary (lazarus or startlazarus) and NOT the correct lazarus.app or startlazarus.app.

And, yes, as TRon suggests, I think that starting Lazarus from the Finder might not be a good idea because -
  • Hard to tell the difference between lazarus and lazarus.app
  • Hard to set the config directory, --pcp=


I like to use a the little scripts for that reason. But I do understand its not the way Mac users think.

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

Andrew1020

  • Newbie
  • Posts: 1
Re: Lazarus Release Candidate 1 of 3.0
« Reply #178 on: November 25, 2023, 01:34:22 pm »
I believe the Lazarus/FPC team have done a good job.  But this is what I wanted to say that you guys know already -

a.  Lazarus/FPC/Delphi has no garbage collector, and
b.  Embarcadero is aware that its CE is not competitive (with no updates unlike similar products from Microsoft and JetBrains), and
c.  Its Professional Edition is too expensive.

Well, I will probably use Delphi first until the license expires, and then continue with Lazarus/FPC for "hobbyist purpose".  And yes, I have been introduced to Turbo Pascal before.

AG

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11458
  • FPC developer.
Re: Lazarus Release Candidate 1 of 3.0
« Reply #179 on: November 25, 2023, 02:41:37 pm »
a.  Lazarus/FPC/Delphi has no garbage collector, and

Well yes, that is why I use them :-)

The other Delphi bits are not on topic here. Lazarus is free, and used in professional settings. (including by me).


 

TinyPortal © 2005-2018