Recent

Author Topic: Lazarus and FPC from SVN - NSExtensionContext and mtpcpu errors  (Read 483 times)

Hansaplast

  • Hero Member
  • *****
  • Posts: 589
  • Tweaking4All.com
    • Tweaking4All
Lazarus and FPC from SVN - NSExtensionContext and mtpcpu errors
« on: December 10, 2019, 12:48:36 pm »

I just updated FPC and Lazarus from SVN and ran into a few issues.
Lazarus 2.1.0 r62054M, FPC 3.3.1 43670, x86_64-darwin-cocoa.
I deleted the entire FPC directory before getting the latest version from SVN.
I'm not sure if these are specific for my setup or not, and thought I'd share them here before making a bug report.




1) in "../lazarus/components/multithreadprocs/mtpcpu.pas": Expected pcint found pchar
I (temporary) fixed it as such by modifying line 79 from:


Code: Pascal  [Select][+][-]
  1. fpsysctl(pchar(@mib), 2, @t, @len, Nil, 0);
to
Code: Pascal  [Select][+][-]
  1. fpsysctl(pcint(@mib), 2, @t, @len, Nil, 0);




2) in "../fpc/packages/cocoaint/src/foundation/NSExtensionContext.inc": operator missing
Which I temporary fixed by changing line 3 from:


Code: Pascal  [Select][+][-]
  1. {$if defined(__OBJC2__)defined(interface)defined(NSExtensionContext)defined(NSObject)}
to
Code: Pascal  [Select][+][-]
  1. {$if defined(__OBJC2__) and defined(interface) and defined(NSExtensionContext) and defined(NSObject)}




Is there anyone that confirm these and/or correct my quick fixed to do it the right way?

Xor-el

  • Sr. Member
  • ****
  • Posts: 408
Re: Lazarus and FPC from SVN - NSExtensionContext and mtpcpu errors
« Reply #1 on: December 10, 2019, 12:59:59 pm »

I just updated FPC and Lazarus from SVN and ran into a few issues.
Lazarus 2.1.0 r62054M, FPC 3.3.1 43670, x86_64-darwin-cocoa.
I deleted the entire FPC directory before getting the latest version from SVN.
I'm not sure if these are specific for my setup or not, and thought I'd share them here before making a bug report.


1) in "../lazarus/components/multithreadprocs/mtpcpu.pas": Expected pcint found pchar
I (temporary) fixed it as such by modifying line 79 from:


Code: Pascal  [Select][+][-]
  1. fpsysctl(pchar(@mib), 2, @t, @len, Nil, 0);
to
Code: Pascal  [Select][+][-]
  1. fpsysctl(pcint(@mib), 2, @t, @len, Nil, 0);




2) in "../fpc/packages/cocoaint/src/foundation/NSExtensionContext.inc": operator missing
Which I temporary fixed by changing line 3 from:


Code: Pascal  [Select][+][-]
  1. {$if defined(__OBJC2__)defined(interface)defined(NSExtensionContext)defined(NSObject)}
to
Code: Pascal  [Select][+][-]
  1. {$if defined(__OBJC2__) and defined(interface) and defined(NSExtensionContext) and defined(NSObject)}




Is there anyone that confirm these and/or correct my quick fixed to do it the right way?

For Q1.

No need to add pcint, this below is ok (at least if you use $MODE DELPHI like I do)

Code: Pascal  [Select][+][-]
  1. fpsysctl(@mib, 2, @t, @len, Nil, 0);

Hansaplast

  • Hero Member
  • *****
  • Posts: 589
  • Tweaking4All.com
    • Tweaking4All
Re: Lazarus and FPC from SVN - NSExtensionContext and mtpcpu errors
« Reply #2 on: December 10, 2019, 01:04:10 pm »
Thanks Xor-el  :)

Xor-el

  • Sr. Member
  • ****
  • Posts: 408
Re: Lazarus and FPC from SVN - NSExtensionContext and mtpcpu errors
« Reply #3 on: December 10, 2019, 01:18:43 pm »
Thanks Xor-el  :)

You are welcome.
I hope you are aware of the fix that went into the mtcpu unit recently to resolve a bug reported recently here https://bugs.freepascal.org/view.php?id=36325.
Do well to confirm that the fix is available in your version of Lazarus trunk.

Hansaplast

  • Hero Member
  • *****
  • Posts: 589
  • Tweaking4All.com
    • Tweaking4All
Re: Lazarus and FPC from SVN - NSExtensionContext and mtpcpu errors
« Reply #4 on: December 10, 2019, 01:52:21 pm »
I've updated from SVN this morning (r62054M), so I hope the fix you mentioned is in that.
I'm not using that particular unit (mtcpu) as far as I know; hence the reality check here in the forum before posting a bug report  :D

 

TinyPortal © 2005-2018