Subject: 28.0.90; on macOS High Sierra, Version 10.13.6, and macOS Monterey, Version 12.0.1, unexec fails

From: Peter Dyballa <[email-masked]>
Date: Sun, 12 Dec 2021 19:34:27 +0100

Hello!

Configuring GNU Emacs 28.0.90 on both Macs à la

or

and setting CC or CXX also as gcc/g++ and rearranging PATH that Apple's/Xcode's Clang compiler is used, all compilations finish in a temacs crash à la:

	./temacs --batch  -l loadup --temacs=bootstrap
	Loading loadup.el (source)...
	Dump mode: bootstrap
	Using load-path (/Users/pete/Quellen/Emacs_CVS/emacs-28.0.90/lisp /Users/pete/Quellen/Emacs_CVS/emacs-28.0.90/lisp/emacs-lisp /Users/pete/Quellen/Emacs_CVS/emacs-28.0.90/lisp/progmodes /Users/pete/Quellen/Emacs_CVS/emacs-28.0.90/lisp/language /Users/pete/Quellen/Emacs_CVS/emacs-28.0.90/lisp/international /Users/pete/Quellen/Emacs_CVS/emacs-28.0.90/lisp/textmodes /Users/pete/Quellen/Emacs_CVS/emacs-28.0.90/lisp/vc)
	Loading emacs-lisp/byte-run...
	Loading emacs-lisp/backquote...
	Loading subr...
	Loading version...
	Loading widget...
	Loading custom...
	Loading emacs-lisp/map-ynp...
	Loading international/mule...
	Loading international/mule-conf...
	temacs(39512,0x10fc71600) malloc: Non-aligned pointer 0x1078175f8 being freed
	temacs(39512,0x10fc71600) malloc: *** set a breakpoint in malloc_error_break to debug
	gmake[1]: *** [Makefile:852: bootstrap-emacs] Abort trap: 6

On macOS Monterey only Apple's/Xcode Clang 13 is available (GCC10 and GCC11 are not yet prepared), on macOS High Sierra MacPorts compiled GCC9, GCC10 and GCC11 as well as Clang 11 and 13 + Apple's/Xcode's Clang 10 are available. All these compilers fail building src/emacs when configured --with-dumping=unexec – and I need to different methods of dumping when I want to used X11 version and the NS variant with --disable-ns-self-contained.

Retrying with LDFLAGS="-v -arch x86_64 -Wl,-t -L /opt/local/lib" makes no difference.

--
Greetings

  Pete

Remember, "Advance too fast, you catch up with death. But advance too slow, death catches up with *you*."