[Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B

Bo Berglund bo.berglund at gmail.com
Sat Aug 17 10:03:43 CEST 2019


On Fri, 16 Aug 2019 23:57:51 +0200, Martin Frb via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>On 16/08/2019 23:34, Bo Berglund via lazarus wrote:
>> On Fri, 16 Aug 2019 23:02:57 +0200, Martin Frb via lazarus
>> <lazarus at lists.lazarus-ide.org> wrote:
>>
>>> That is on a new install. Not on an update, correct?
>> It is a new x64 install on Windows 7-x64 using the official installer
>> downloaded via the link in the release message. I installed a
>> secondary installation so I can keep the old for a while.
>>
>> Given I used the "official" installer it should contain "everything"
>> needed for all enabled functions and yet it does not.
>It looks I missed something? I got that you get an error on rasbi/arm.
>
>I did not get what issue happens on win64? What is missing?
>
>
>>
>> On Arm (Raspberry Pi units 2-3-4) I always use svn to get the sources
>> and install using my established script for Linux. I did so a few days
>> ago on an RPi4 I got a month ago.
>>
>> But the same dialog on first start as always on RPi...
>I understand the frustration. But I currently cannot test myself on 
>rasberry. And I don't know when I will have the time to change that.

It is really not a very big issue, since it goes away after first
start of Lazarus after the installation. It does not show up after IDE
rebuild following a package installation for example.
And because of the disabling I have never ever used it, whatever it
is.

But since I saw the pop-up again when dealing with 2.0.4 on both RPi
and Windows I thought I would mention it....

On Windows I used the official installer and on RPi I used svn to get
the sources and compiled myself. Same result.

>I thought I had recently answered to a similar mail about rasbi, 
>including some pointers. But I cannot find that mail....

Here is where the GMane news mirror of this mail list is so very
useful. I have a complete archive starting Sept 2003 of the Lazarus
and freepascal lists in my newsreader's cached data, so I can search
and find anything without even being on-line....
Your reply a month ago below.

>So questions here again:
>
>1)
>Does editor macro work (self test passed / enabled in global options), 
>if you remove the following changeset:
>https://github.com/User4martin/pascalscript/commit/269faf94db7be08f243aa1b1f55b28624e0692d5
>
>Ideally also run the testcase in the componet/pascalscript dir. But I 
>leave that optional.
>
>2) Does it work if the IDE (or relevant packages) are compiled with:
>-dPasMacroNoNativeCalls
>
>(That does not affect the test in the pascalscript dir)
>
>3) If both are applied?


I don't even know what the macro system is used for or how to invoke
it since on *every* Lazarus install I have done I have encountered the
dialog that disables it...
So I cannot test. But it seems I can program OK in the IDE without it.


Here is your first reply in this thread taken from my news archive:
------------------ 2019-07-09 -------------------------------------

On 09/07/2019 19:03, Bo Berglund via lazarus wrote:
> I have just installed fpc 3.0.4 + Lazarus 2.0.2 from svn sources on a
> pristine Raspberry Pi4B with 4GB RAM.
>
> But now (again) on a first ever start of the newly installed Lazarus I
> am greeted by a pop-up dialog:
>
>       Error in EditorMacroScript
>
> It was a while now since I last installed on the bare metal from svn
> but still this problem pops up. It has done that every time I can
> remember and I even posted here back in 2016 about it.
>
> Apparently nothing has been done, and I do not know what the
> pascalscript really does in the IDE so I cannot say if I will be hit
> with some unexplainable error down the road.
>
Yep nothing has been done since.... (Except for me hoping, that one
day 
I have the time prioritized to install Laz on a RP myself....)
Well the underlying PasScript was updated (not sure if in 2.0.x but in
trunk). But that seems to have done little for arm.

The error happens once only, the result is stored and EMS disabled.
There is an entry in the Tools > Options to enable it again (or check 
the xml files in your conf)

PasScript sometimes needs to call code from the project (i.e. binary
code).
For this it needs to pass params, in the correct registers/stack.
Since 
that can change (calling convention), the IDE performs a selftest.

It finds that PS does not work on your platform.

There is an alternative calling mechanism. I did not test that yet.
Compile the IDE with:
   -dPasMacroNoNativeCalls
Then enable the test again.

---------
Before you try that define, check if the following patch (currently 
applied) is actually needed
https://github.com/User4martin/pascalscript/commit/269faf94db7be08f243aa1b1f55b28624e0692d5

It is something that is not in the original. Not sure though if
correct 
or not.

You can also test this patch (or its absence) by running the testcase
in 
the PascalScript package.

------------------------------------------------------------------


-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list