Recent

Author Topic: lazbuild on macos does not work  (Read 1895 times)

Weja

  • Newbie
  • Posts: 2
lazbuild on macos does not work
« on: August 13, 2021, 12:34:26 pm »
Hello,

I try to compile a Lazarus project with the command line tool lazbuild (2.0.12) on macos (Mojave, Catalina) but it does not work. The same project can be compiled with lazbuild on windows and linux. It also compiles on macos when I use the Lazarus IDE (2.0.12). Any suggestions? Maybe some configuration files are wrong or file permissions?

Here is the output of lazbuild:
Code: Text  [Select][+][-]
  1. /Applications/Lazarus/lazbuild $LAZ_PROJECT_FILE --build-mode=Release_mac_gui
  2. Hint: (lazarus) Missing state file of LCL 2.0.12: /Applications/Lazarus/lcl/units/x86_64-darwin/carbon/LCL.compiled
  3. Error: (lazarus) unable to create package output directory "/Applications/Lazarus/lcl/units/x86_64-darwin/carbon" of package "LCL 2.0.12"
  4. Hint: (lazarus) normal output directory of package LCL 2.0.12 is not writable: "/Applications/Lazarus/lcl/units/x86_64-darwin/carbon/"
  5. TParsedCompilerOptions.SetOutputDirectoryOverride New=/Users/grun-laz/.lazarus/lib/units/x86_64-darwin/carbon
  6. Hint: (lazarus) Last compile was incomplete for LCL 2.0.12
  7.   State file="/Users/grun-laz/.lazarus/lib/units/x86_64-darwin/carbon/LCL.compiled"
  8. Info: (lazarus) Execute Title="Compile package LCL 2.0.12"
  9. Info: (lazarus) Working Directory="/Applications/Lazarus/lcl/interfaces/"
  10. Info: (lazarus) Executable="/usr/local/bin/fpc"
  11. Info: (lazarus) Param[0]="-MObjFPC"
  12. Info: (lazarus) Param[1]="-Scghi"
  13. Info: (lazarus) Param[2]="-O1"
  14. Info: (lazarus) Param[3]="-gw"
  15. Info: (lazarus) Param[4]="-gl"
  16. Info: (lazarus) Param[5]="-l"
  17. Info: (lazarus) Param[6]="-vewnhibq"
  18. Info: (lazarus) Param[7]="-vm5044"
  19. Info: (lazarus) Param[8]="-Fi/Applications/Lazarus/lcl/interfaces/carbon"
  20. Info: (lazarus) Param[9]="-Fi/Applications/Lazarus/lcl/interfaces/carbon/objc"
  21. Info: (lazarus) Param[10]="-Fi/Applications/Lazarus/lcl/interfaces/carbon/pascocoa/appkit"
  22. Info: (lazarus) Param[11]="-Fi/Applications/Lazarus/lcl/interfaces/carbon/pascocoa/foundation"
  23. Info: (lazarus) Param[12]="-Fu/Applications/Lazarus/lcl/interfaces/carbon"
  24. Info: (lazarus) Param[13]="-Fu/Applications/Lazarus/lcl/interfaces/carbon/objc"
  25. Info: (lazarus) Param[14]="-Fu/Applications/Lazarus/lcl/interfaces/carbon/pascocoa/appkit"
  26. Info: (lazarus) Param[15]="-Fu/Applications/Lazarus/lcl/interfaces/carbon/pascocoa/foundation"
  27. Info: (lazarus) Param[16]="-Fu/Applications/Lazarus/packager/units/x86_64-darwin"
  28. Info: (lazarus) Param[17]="-Fu/Applications/Lazarus/components/lazutils/lib/x86_64-darwin"
  29. Info: (lazarus) Param[18]="-Fu/Applications/Lazarus/lcl/units/x86_64-darwin"
  30. Info: (lazarus) Param[19]="-Fu/Applications/Lazarus/lcl/interfaces/"
  31. Info: (lazarus) Param[20]="-FU/Users/grun-laz/.lazarus/lib/units/x86_64-darwin/carbon"
  32. Info: (lazarus) Param[21]="-dcarbon"
  33. Info: (lazarus) Param[22]="lcl.pas"
  34. Hint: (11030) Start of reading config file /etc/fpc.cfg
  35. Hint: (11031) End of reading config file /etc/fpc.cfg
  36. Free Pascal Compiler version 3.2.0 [2020/05/31] for x86_64
  37. Copyright (c) 1993-2020 by Florian Klaempfl and others
  38. (1002) Target OS: Darwin for x86_64
  39. (3104) Compiling lcl.pas
  40. (3104) Compiling ./carbon/alllclintfunits.pas
  41. (3104) Compiling ./carbon/carbonbars.pp
  42. /Applications/Lazarus/lcl/interfaces/./carbon/carbonbars.pp(16,2) Error: (2023) User defined: only cpu i386 is supported
  43. (3104) Compiling ./carbon/carbonprivate.pp
  44. (3104) Compiling ./carbon/carbondef.pp
  45. /Applications/Lazarus/lcl/interfaces/./carbon/carbondef.pp(187,1) Fatal: (10026) There were 1 errors compiling module, stopping
  46. Fatal: (1018) Compilation aborted
  47. Error: /usr/local/bin/ppcx64 returned an error exitcode
  48. Error: (lazarus) Compile package LCL 2.0.12: stopped with exit code 1
  49. Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Exit code 1"
  50.  

 Thank you for any help!

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1540
Re: lazbuild on macos does not work
« Reply #1 on: August 13, 2021, 12:43:07 pm »
Have a look at:
https://wiki.freepascal.org/lazbuild

Quote
--widgetset=<widgetset> or --ws=<widgetset>
override the project widgetset. e.g. gtk, gtk2, qt, win32, or carbon.

So, use --ws=cocoa

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1983
  • Former Delphi 1-7, 10.2 user
Re: lazbuild on macos does not work
« Reply #2 on: August 13, 2021, 01:07:06 pm »
This issue has been reported for Lazarus 2.2.0 RC1 - https://forum.lazarus.freepascal.org/index.php/topic,55339.msg413498.html#msg413498 so should be fixed in the official release.
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

Weja

  • Newbie
  • Posts: 2
Re: lazbuild on macos does not work
« Reply #3 on: August 16, 2021, 12:01:00 pm »
Thank you for the fast replies.

Quote
--widgetset=<widgetset> or --ws=<widgetset>
override the project widgetset. e.g. gtk, gtk2, qt, win32, or carbon.

So, use --ws=cocoa

works for me

 

TinyPortal © 2005-2018