LazBuild defaults to Carbon, lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- ChrisR · 2021-07-28 20:42 I can create a new project with Lazarus on macOS: Project/NewProject menu item, select "Application". When I choose run, it happily compiles a Cocoa 64-bit application. Now I use lazbuild from the command line: $ lazbuild project1.lpi ... Free Pascal Compiler version 3.3.1 [2021/06/08] for aarch64 Copyright (c) 1993-2021 by Florian Klaempfl and others (1002) Target OS: Darwin for AArch64 (3104) Compiling lcl.pas (3104) Compiling ./carbon/alllclintfunits.pas (3104) Compiling ./carbon/carbonbars.pp /Users/chrisrorden/src/lazarus/lcl/interfaces/./carbon/carbonbars.pp(1 6,2) Error: (2023) User defined: only 32 bit cpu is supported (3104) Compiling ./carbon/carbonprivate.pp (3104) Compiling ./carbon/carbondef.pp /Users/chrisrorden/src/lazarus/lcl/interfaces/./carbon/carbondef.pp(18 7,1) Fatal: (10026) There were 1 errors compiling module, stopping Fatal: (1018) Compilation aborted Error: /usr/local/bin/ppca64 returned an error exitcode Error: (lazarus) Compile package LCL 2.3: stopped with exit code 1 Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Exit code 1" Error: (lazbuild) Project dependencies of /Users/chrisrorden/src/a1/project1.lpi Note that it attempts to build to the Carbon widget set, which does not support 64-bit code. TO successfully compile on my ARM-based Apple Silicon Mac I must explicitly request the Cocoa widgetset: $ lazbuild --ws=cocoa project1.lpi will compile correctly. I think that lazbuild should target Cocoa by default, this would match the defaults of Lazarus and it does not seem that carbon is actively maintained anymore. Regardless, Cocoa is required for a 64-bit compile. p.s. I am using trunk, but I think this behavior is consistent with all versions. ---------------------------------------------------------------------- trev · 2021-07-29 01:08 I'd log a bug, but you may have to wait until the GitLab move is completed successfully. If it occurs with Lazarus 2.2 RC1, then you could post in the Lazarus Release Candidate 1 of 2.2.0 thread - simply link to your post here to avoid too much x-posting with a short description.