Recent

Author Topic: Cannot Build Trunk 61921 On Mac  (Read 1006 times)

emhartner

  • New Member
  • *
  • Posts: 32
Cannot Build Trunk 61921 On Mac
« on: September 25, 2019, 04:07:06 am »
Lazarus v2.1.0 r61921
fpc v3.3.1 r43062

I have the same issue even when starting from scratch with both fpc and Lazarus.

I'm using the following to build Lazarus:
make LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigide

Here is the error I'm receiving:
/Users/eric/freepascal/lazarus/components/macroscript/emsselftest.pas(296,26) Error: (4001) Incompatible types: got "TPoint2" expected "TPoint"
emsselftest.pas(816) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
make[2]: *** [editormacroscript.ppu] Error 1
make[1]: *** [bigide] Error 2
make: *** [bigidecomponents] Error 2

Thank you,
Eric

VTwin

  • Hero Member
  • *****
  • Posts: 799
  • Former Turbo Pascal 3 user
Re: Cannot Build Trunk 61921 On Mac
« Reply #1 on: September 25, 2019, 05:12:16 pm »
I have been getting the same error, currently at 61922.
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.7 fixes svn 62300 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)
fpc 3.0.4

emhartner

  • New Member
  • *
  • Posts: 32
Re: Cannot Build Trunk 61921 On Mac
« Reply #2 on: September 27, 2019, 01:22:42 pm »
Hi VTWin,
The error persists today for me even on 61930.  Have you found a workaround?

Thank you.

VTwin

  • Hero Member
  • *****
  • Posts: 799
  • Former Turbo Pascal 3 user
Re: Cannot Build Trunk 61921 On Mac
« Reply #3 on: September 27, 2019, 03:42:09 pm »
No, sorry, I do not have a workaround. I use the more stable fixes branch on Cocoa for my work, and the trunk only if I am asked to test a patch. The trunk can be unstable, if you do not need it then try the fixes branch.
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.7 fixes svn 62300 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)
fpc 3.0.4

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5801
    • wiki
Re: Cannot Build Trunk 61921 On Mac
« Reply #4 on: September 27, 2019, 06:23:08 pm »
Lucky I've seen this.... I don't usually follow Cocoa. But this is EditorMacro...

Could you open the EditorMacroScript package and in all its units search for
  {$DEFINE NeedTPointFix }
and remove/disable it?

Then it should rebuild, but the question is if the package will work. Check in the Menu:
Tools > Option > Editor Macro script
It should say "scripting active"

Let me know the results please.

If you have time, you can also check if the example from https://wiki.lazarus.freepascal.org/Editor_Macros_PascalScript#Example works.

Thanks.




If anyone happens to build trunk for carbon, could you test the same steps? Remove the define (units EmsScriptClasses and EmsSelfTest), rebuild and check if pascal script macros work.
Thanks
« Last Edit: September 27, 2019, 06:27:49 pm by Martin_fr »

VTwin

  • Hero Member
  • *****
  • Posts: 799
  • Former Turbo Pascal 3 user
Re: Cannot Build Trunk 61921 On Mac
« Reply #5 on: September 28, 2019, 04:31:14 pm »
I found 2 occurrences in:

EMScriptClasses
EMSSelfTest

changed both:

Code: Pascal  [Select]
  1. {$IFDEF darwin}
  2.   {$DEFINE NeedTPointFix }
  3. {$ENDIF}

to:

Code: Pascal  [Select]
  1. {$IFDEF darwin}
  2.   {.$DEFINE NeedTPointFix }
  3. {$ENDIF}

Lazaus now builds on Cocoa, after second restart, under:

Preferences (IDE Options) > Editor Macro Script > Status

"Scripting active."

Thanks Martin!
« Last Edit: September 28, 2019, 04:38:03 pm by VTwin »
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.7 fixes svn 62300 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)
fpc 3.0.4

emhartner

  • New Member
  • *
  • Posts: 32
Re: Cannot Build Trunk 61921 On Mac
« Reply #6 on: September 29, 2019, 03:39:27 pm »
This works for me as well.

Many thanks Martin!

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5801
    • wiki
Re: Cannot Build Trunk 61921 On Mac
« Reply #7 on: September 29, 2019, 04:15:50 pm »
Could either of you do me the favour an test it on 32 bit, please?  (It will compile, but will scripting be active?)
Thanks

emhartner

  • New Member
  • *
  • Posts: 32
Re: Cannot Build Trunk 61921 On Mac
« Reply #8 on: September 29, 2019, 06:47:11 pm »
Hi Martin,
I'm not sure how to test scripting.  I'd be happy to do it if you could point me to an article on this.  Otherwise, I hope that VTWin can help.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5801
    • wiki
Re: Cannot Build Trunk 61921 On Mac
« Reply #9 on: September 29, 2019, 07:19:50 pm »
Check in the Menu:
Tools > Option > Editor Macro script
It should say "scripting active"

Also there is a wiki page, with an example script (but that is not that important)
Quote
If you have time, you can also check if the example from https://wiki.lazarus.freepascal.org/Editor_Macros_PascalScript#Example works.
Menu View > "Editor Macros ..."

A new Macro can be created by recording (e.g. record a single cursor up keystroke). Then it can be edited (paste the example).

Not sure if I changed my Keymap, or if this are the defaults (and not sure if the keymap on Mac has the same anyway)
Shift-Ctrl-R  Record / Stop Record
Shift-Ctrl-P  Play (current)  // Also Pause, if currently recording

In any case pascal script macros follow the same concept as normal macros (normal macros are always part of the IDE / PascalScript are BigIDE).
https://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Macros

emhartner

  • New Member
  • *
  • Posts: 32
Re: Cannot Build Trunk 61921 On Mac
« Reply #10 on: September 30, 2019, 04:36:10 am »
Hi Martin,
I've confirmed that scripting works fine with 32 bit carbon on Mac.  As I was missing ppc386 from my 3.3.1 fpc folder, I used the 3.0.4 version of ppc386 to build Lazarus.  I hope that this is fine.

Lazarus 2.1.0 r61947M FPC 3.0.4 i386-darwin-carbon

Regards

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5801
    • wiki
Re: Cannot Build Trunk 61921 On Mac
« Reply #11 on: September 30, 2019, 01:16:15 pm »
Thanks for confirming. Yes 3.0.4 is fine.

I committed the fix to svn.