Opened 3 years ago

Last modified 9 months ago

#64035 assigned defect

fpc @ fpc-3.2.0_1 build fails

Reported by: jariperttunen Owned by: kamischi (Karl-Michael Schindler)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: cjones051073 (Chris Jones), wahspilihp (Philip Shaw), conradwt (Conrad Taylor)
Port: fpc

Description (last modified by ryandesign (Ryan Carsten Schmidt))

macOS Monterey 12.0.1
Xcode 13.1 (13A1030d)
MacPorts 2.7.1

main.log

:info:build Exit code: 2
:error:build Failed to build fpc: command execution failed
:debug:build Error code: CHILDSTATUS 87405 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"

Attachments (2)

main.log (2.1 MB) - added by jariperttunen 3 years ago.
fpc build log
main.2.log (2.1 MB) - added by ShadSterling (Shad Sterling) 3 years ago.

Change History (14)

comment:1 Changed 3 years ago by cjones051073 (Chris Jones)

The above tells us nothing much. Please attach the complete build log from a clean build attempt.

comment:2 Changed 3 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:3 Changed 3 years ago by cjones051073 (Chris Jones)

Milestone: MacPorts Future

Changed 3 years ago by jariperttunen

Attachment: main.log added

fpc build log

comment:4 Changed 3 years ago by jariperttunen

fpc build log (/opt/local/var/macports/.../fpc/main.log) added.
Clean build attempt:

sudo port clean fpc
sudo port install fpc
Last edited 15 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 3 years ago by wahspilihp (Philip Shaw)

Cc: wahspilihp added

comment:6 Changed 3 years ago by ShadSterling (Shad Sterling)

Having the same problem on macOS 12.2.1 (21D62)

I think the problem is pointer misalignment in pas2js:

:info:build        Compiling pas2js/pas2js.pp
:info:build        Linking pas2js/bin/x86_64-darwin/pas2js
:info:build        Compiling pas2js/pas2jslib.pp
:info:build        Linking pas2js/bin/x86_64-darwin/libpas2jslib.dylib
:info:build The installer encountered the following error:
:info:build External command "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/compiler/ppcx64 -Tdarwin -FEpas2js/bin/x86_64-darwin -FUpas2js/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/rtl/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-json/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-base/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/univint/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/rtl-objpas/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-js/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-passrc/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/pastojs/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/paszlib/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/hash/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-process/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-web/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-db/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-xml/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/iconvenc/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/rtl-extra/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/ibase/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/mysql/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/odbc/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/oracle/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/postgres/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/sqlite/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-net/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fcl-fpcunit/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/libtar/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/openssl/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/fastcgi/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/httpd22/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/httpd24/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/libmicrohttpd/units/x86_64-darwin/ -Fu/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/packages/webidl/units/x86_64-darwin/ -Ur -Xs -O2 -n -ap -v0 -XR/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -dx86_64 -dRELEASE -viq pas2js/pas2jslib.pp" failed with exit code 256. Console output:
:info:build Target OS: Darwin for x86_64
:info:build Compiling pas2js/pas2jslib.pp
:info:build Assembling pas2jslib
:info:build Linking pas2js/bin/x86_64-darwin/libpas2jslib.dylib
:info:build ld: warning: pointer not aligned at address 0x294B67 (_RTTI_$SYSTEM_$$_char_pointer + 15 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/rtl/units/x86_64-darwin/system.o)

... 5064 more "pointer not aligned" warnings ...

:info:build ld: warning: pointer not aligned at address 0x30EDA1 (_RTTI_$TERMIO_$$_TERMIOS + 9 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_fpc/fpc/work/fpcbuild-3.2.2/fpcsrc/rtl/units/x86_64-darwin/termio.o)
:info:build ld: unaligned pointer(s) for architecture x86_64
:info:build An error occurred while linking 
:info:build Error: Error while linking
:info:build Fatal: There were 1 errors compiling module, stopping

Changed 3 years ago by ShadSterling (Shad Sterling)

Attachment: main.2.log added

comment:8 Changed 3 years ago by kencu (Ken)

Intel apparently supports unaligned pointers, and fpc uses that to save space.

But xcode warns about it, so the link fails on the warning not being a clean link command.

The solution is at present turn off warnings.

So if all that is accurate, turning off warnings should do it..

comment:9 Changed 15 months ago by kamischi (Karl-Michael Schindler)

As little as I know, this is a problem of Xcode 8, which is resolved with Xcode 9. As such it may only affect 10.11, El Capitan. Maybe someone can try -Wl,-max_default_common_align, value with Xcode 8. or -Wl,-w to switch off all warnings.

comment:10 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: conradwt added
Description: modified (diff)

Karl-Michael, both logs in this ticket are from macOS 12 Monterey and the one in duplicate #67958 is from macOS 13 Ventura.

comment:11 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from karl-michael.schindler@… to kamischi

comment:12 Changed 9 months ago by kamischi (Karl-Michael Schindler)

The current version (3.2.2_1) fixes this. The issue can be closed.

Note: See TracTickets for help on using tickets.