Trying to build freePascal v3.2.2 cloned from GitHub
Note, that I have tried v3.2.2, v3.3.1 and v3.2.4-rc1 all versions have this error
Compiling on MacOS Sequoia 15.6.1, Xcode 26.0.1, command line tools installed
Compiling ./rtl-objpas/src/inc/rtti.pp
External command "/Users/xxxx/code/Pascal/Software/fpc-3.2.2/compiler/ppcx64 -Tdarwin -FUrtl-objpas/units/x86_64-darwin/ -Fu/Users/robertbooth/code/Pascal/Software/fpc-3.2.2/rtl/units/x86_64-darwin/ -Furtl-objpas/src/inc -Furtl-objpas/src/common -Firtl-objpas/src/inc -Firtl-objpas/src/darwin -Firtl-objpas/src/x86_64 -Firtl-objpas/src/common -Ur -Xs -O2 -n -XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/ -dx86_64 -dRELEASE -XX -CX -Sc -viq rtl-objpas/BuildUnit_rtl_objpas.pp" failed with exit code 256. Console output:
Target OS: Darwin for x86_64
Compiling rtl-objpas/BuildUnit_rtl_objpas.pp
Compiling ./rtl-objpas/src/inc/system.uitypes.pp
Assembling system.uitypes
Compiling ./rtl-objpas/src/inc/strutils.pp
Writing Resource String Table file: strutils.rsj
Assembling strutils
Compiling ./rtl-objpas/src/inc/widestrutils.pp
Assembling widestrutils
Compiling ./rtl-objpas/src/common/varutils.pp
Assembling varutils
Compiling ./rtl-objpas/src/inc/convutils.pp
Assembling convutils
Compiling ./rtl-objpas/src/inc/dateutils.pp
Assembling dateutils
Compiling ./rtl-objpas/src/inc/stdconvs.pp
Writing Resource String Table file: stdconvs.rsj
Assembling stdconvs
Compiling ./rtl-objpas/src/inc/variants.pp
Writing Resource String Table file: variants.rsj
Assembling variants
Compiling ./rtl-objpas/src/inc/fmtbcd.pp
Assembling fmtbcd
Compiling ./rtl-objpas/src/inc/nullable.pp
Compiling ./rtl-objpas/src/inc/rtti.pp
Writing Resource String Table file: rtti.rsj
Assembling rtti
rtti.pp(4361) Error: Error while assembling exitcode 1
rtti.pp(4361) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
rtl-objpas/units/x86_64-darwin/rtti.s:12:1: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
_$RTTI$_Lj102:
^
rtl-objpas/units/x86_64-darwin/rtti.s:6:1: error: previous .cfi_startproc was here
.cfi_startproc
^
The installer encountered the following error:
Compilation of "BuildUnit_rtl_objpas.pp" failed
make[2]: *** [smart] Error 1
make[1]: *** [packages_smart] Error 2
make: *** [build-stamp.x86_64-darwin] Error 2
-----------------------------
Looking at the assembly of the packages/rtl-objpas/units/x86_64-darwin/rtti.s the following code is the issue
.globl _$RTTI$_Lj102
_$RTTI$_Lj102:
The label _$RTTI$_Lj102 is defined as a global variable
error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
This code is from the "procedure RawThunk; assembler; nostackframe;" line number 961 of rtti.pp