Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macos ARM M1: invalid type cast in uCEFv8Handler unit #406

Open
TimKieu opened this issue Feb 24, 2022 · 2 comments
Open

Macos ARM M1: invalid type cast in uCEFv8Handler unit #406

TimKieu opened this issue Feb 24, 2022 · 2 comments
Labels

Comments

@TimKieu
Copy link

TimKieu commented Feb 24, 2022

Hi,
I am back to build and test for Macos silicon Arm CPU.
Context:

  • IDE Delphi 11 on Windows 11 ARM virtual on Macbook M1 => cross compiler: Delphi x64 on Windows Arm then link Macos SDK on M1
  • Demo source: FMXExternalPumpBrowser
  • Build error message in the uCEFv8Handler unit:
    [dccosxarm64 Error] uCEFv8Handler.pas(732): E2089 Invalid typecast
    ud.SetValueByIndex(1, TCefv8ValueRef.NewInt(Integer(v.AsInterface)));

[dccosxarm64 Error] uCEFv8Handler.pas(866): E2250 There is no overloaded version of 'Synchronize' that can be called with these arguments
TThread.Synchronize(nil, procedure begin
ret := pr.GetValue(val);
end);
...

@TimKieu
Copy link
Author

TimKieu commented Feb 24, 2022

This issue can be fixed as this way:
Line 732 Replace: ud.SetValueByIndex(1, TCefv8ValueRef.NewInt(Integer(v.AsInterface)));
By: ud.SetValueByIndex(1, TCefv8ValueRef.NewInt(Integer(Pointer(v.AsInterface))));

salvadordf added a commit that referenced this issue Feb 25, 2022
@salvadordf
Copy link
Owner

Hi,

I don't have a Mac computer and I can't test this but I recently added a new TARGET_64BITS conditional to fix issues building apps in Raspberry Pi OS 64 bits which also has an ARM CPU.

I forgot to update the conditionals in that unit and perhaps this was causing the build issue you describe.

Please, download CEF4Delphi again and see if this build issue is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants