Forum > Packages and Libraries

Pascal Script Exception: This code is not supported on this CPU at the moment!

(1/1)

fedkad:
I am trying to run Pascal Script under Lazarus 2.3.0 (beta) aarch64-linux-gtk2. Since there is no binary of Lazarus available for that platform, I just did:


--- Code: ---sudo apt install ./Downloads/fpc-laz_3.2.2-210709_amd64.deb
sudo apt install ./Downloads/fpc-src_3.2.2-210709_amd64.deb
git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus
cd lazarus
git fetch
git pull
make clean bigide
--- End code ---

During run time I get the above mentioned error message. This comes from file uPSRuntime.pas:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$ifndef FPC}{$IFDEF Delphi6UP}  {$IFDEF CPUX64}    {$include x64.inc}  {$ELSE}  {$include x86.inc}  {$ENDIF}{$ELSE}  {$include x86.inc}{$ENDIF}{$else}{$IFDEF Delphi6UP}  {$if defined(cpu86)}    {$include x86.inc}  {$elseif defined(cpupowerpc) and defined(cpu32) and defined(darwin)}    {$include powerpc.inc}  {$elseif defined(cpuarm)}    {$include arm.inc}  {$elseif defined(CPUX86_64)}    {$include x64.inc}  {$else}    {$WARNING Pascal Script is not supported for your architecture at the moment!}    function TPSExec.InnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;    begin      raise exception.create('This code is not supported on this CPU at the moment!');      Result := True;    end;  {$ifend}{$ELSE}{$include x86.inc}{$ENDIF}{$endif} 
Is there any hope updating this file for aarch64?

Martin_fr:
There is a limited workaround.... (IIRC / not tested)

Instead of

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  AExec.RegisterDelphiFunction(@MyFunc, 'MessageDlg', cdRegister); use

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  AExec.RegisterFunctionName('MessageDlg',             @ExecBasicHandler, Pointer(CONST_ID_FOR_MsgDlg), nil); 
See  components\macroscript\emscriptclasses.pas for examples.
Not sure on official docs.

However, also see https://github.com/remobjects/pascalscript/pull/210

Navigation

[0] Message Index

Go to full version