Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2023-10

Re: Alignment issue on macOS 13 with Xcode 15 and up

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Karl-Michael Schindler
Show quoted text 20 lines
Am 04.10.2023 um 12:00 schrieb Date: Tue, 3 Oct 2023 12:25:33 +0200 From: Karl-Michael Schindler To: Subject: [fpc-devel] Alignment issue on macOS 13 with Xcode 15 and up Message-ID: Content-Type: text/plain; charset=us-ascii Hi. There is an alignment issue on macOS 13 with Xcode 15 and up. As much as I understand this commit on the main branch https://gitlab.com/freepascal.org/fpc/source/-/commit/51fdbb5524512dc3279d0cca38d44b38160b8111 fixes it. I propose that this patch is also applied to the 3.2.2-fixes branch and is also included in the 3.2.4 release. Greetings - Michael.

Actually, the patch is not sufficient to fix the issue. When building the 3.2.2 version on macOS 13 arm with the command line tools from Xcode 15 it breaks with:

… many, many ld warnings about pointer alignment similar to the next 3 ld: warning: pointer not aligned at _THREADVARLIST_$CHARSET+0xC from /opt/local/var/macports/build/_Users_michael_Developer_macports-ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/rtl/units/x86_64-darwin/charset.o ld: warning: pointer not aligned at _THREADVARLIST_$CHARSET+0x24 from /opt/local/var/macports/build/_Users_michael_Developer_macports-ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/rtl/units/x86_64-darwin/charset.o ld: warning: pointer not aligned at _THREADVARLIST_$FPWIDESTRING+0xC from /opt/local/var/macports/build/_Users_michael_Developer_macports-ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/rtl/units/x86_64-darwin/fpwidestring.o ld: pointer not 4-byte aligned at __DATA_CONST+0x9A6, fix alignment or disable chained fixups An error occurred while linking pp.pas(252,36) Error: Error while linking pp.pas(252,36) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
make[3]: *** [ppc] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_Users_michael_Developer_macports-ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/compiler' make[2]: *** [cycle] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_Users_michael_Developer_macports-ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/compiler' make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_Users_michael_Developer_macports-ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc' make: *** [build-stamp.aarch64-darwin] Error 2

With the command line tools of Xcode 14 it runs through without any warning nor error. Would a patch from this commit (https://gitlab.com/freepascal.org/fpc/source/-/blob/82dd70e72f3ab33b1b8737f743e1cdd009d9c8a1/compiler/x86_64/cpupara.pas) help?

Michael.

Reply by email

Giuliano Colla
to Karl-Michael Schindler

Il 04/10/23 12:19, Karl-Michael Schindler via fpc-devel ha scritto:

With the command line tools of Xcode 14 it runs through without any warning nor error. Would a patch from this commit (https://gitlab.com/freepascal.org/fpc/source/-/blob/82dd70e72f3ab33b1b8737f743e1cdd009d9c8a1/compiler/x86_64/cpupara.pas) help?

By googling around I found a lot of complaints of Mac users about XCode 15 incompatibilities with previous versions, and weird errors. Maybe it would be wise to wait that Apple fixes Xcode 15 before patching fpc. One might be forced to revert the patch.

Giuliano

Do not do to others as you would have them do to you.They might have different tastes.

Reply by email