Forum > macOS / Mac OS X

Compile Error (Darain/AArch64)

<< < (2/3) > >>

Grahame Grieve:
I chased it down. It's this line:

        so := TFslDecimal.ValueOf(sl).Subtract(TFslDecimal.ValueOf(sr)).AsString

in this routine

function TMXmlDocument.opMinus(left, right: TFslList<TMXmlNode>): TFslList<TMXmlNode>;
var
  sl, sr, so: String;
  dl, dr : TFslDecimal;
begin
  result := TFslList<TMXmlNode>.Create;
  try
    if (left.Count <> 1) or (right.Count <> 1) then
      // nothing
    else
    begin
      sl := evaluateString(left);
      sr := evaluateString(right);
      if StringIsInteger32(sl) and StringIsInteger32(sr) then
        so := IntToStr(StringToInteger32(sl) - StringToInteger32(sr))
      else if StringIsDecimal(sl) and StringIsDecimal(sr) then
        so := TFslDecimal.ValueOf(sl).Subtract(TFslDecimal.ValueOf(sr)).AsString
      else
        so := sl.Replace(sr, '');
    end;
    result.Add(TMXmlString.Create(so));
    result.link;
  finally
    result.free;
  end;
end;             

in https://github.com/grahamegrieve/fhirserver/blob/master/library/fsl/fsl_xml.pas

If I replace that line with this, which is identical but uses two local variables, no problems

        dl := TFslDecimal.ValueOf(sl);
        dr := TFslDecimal.ValueOf(sr);
        so := dl.Subtract(dr).AsString;

Grahame Grieve:
Well, at least, that's one line that causes it. That line used to compile on Mac M1, btw

FPK:

--- Quote from: Jonas Maebe on September 13, 2021, 06:26:47 pm ---On Darwin you need to add -Xg in addition to -gl (and then copy the ppca64.dSYM directory from the compiler directory next to the ppca64 binary). This will also require trunk, or a fairly recent version of the fixes branch.

--- End quote ---

The copying shouldn't be needed anymore except if the crash is in ppc3 (because if ppc3 is compiled with this name, the compare of the executables will fail), see https://gitlab.com/freepascal.org/fpc/source/-/commit/b3bf183fd37dcb46c4a89fc48005cb68dbed4a50 and friends.

Jonas Maebe:

--- Quote from: Grahame Grieve on September 18, 2021, 08:04:25 am --- btw, this is fairly straight forward to reproduce: get the GitHub repo

--- End quote ---
Which github repo? I don't see any mentioned in your messages.

Jonas Maebe:

--- Quote from: FPK on September 18, 2021, 10:59:03 am ---
--- Quote from: Jonas Maebe on September 13, 2021, 06:26:47 pm ---On Darwin you need to add -Xg in addition to -gl (and then copy the ppca64.dSYM directory from the compiler directory next to the ppca64 binary). This will also require trunk, or a fairly recent version of the fixes branch.

--- End quote ---

The copying shouldn't be needed anymore except if the crash is in ppc3 (because if ppc3 is compiled with this name, the compare of the executables will fail), see https://gitlab.com/freepascal.org/fpc/source/-/commit/b3bf183fd37dcb46c4a89fc48005cb68dbed4a50 and friends.

--- End quote ---
I meant you need to copy the .dSYM bundle to the installation directory, because afaik our Makefiles don't do that with "make install".

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version