Subject: bug#52382: GNU Emacs 28.0.90 does not build on macOS Monterey, Version 12.0.1, because bootstrapping fails

From: Peter Dyballa <[email-masked]>
Date: Thu, 9 Dec 2021 01:39:43 +0100

Hello!

Configuration was this (again, see the different value for PATH compared with my previous eMail):

	env LANG=C PATH=/usr/bin:/opt/local/bin:/usr/local/texlive/2021/bin/universal-darwin:/usr/local/gnupg-2.2/bin:/usr/local/bin:/bin:/sbin:/usr/sbin:/opt/local/sbin:/usr/local/sbin:/opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin:/opt/X11/bin ./configure --without-libsystemd --without-pop --without-sound --without-gpm --without-dbus --without-selinux --without-imagemagick --with-ns --with-dumping=unexec --disable-ns-self-contained --with-x-toolkit=athena --x-libraries=/opt/X11/lib --x-includes=/opt/local/include --enable-locallisppath=/Library/Application\ Support/Emacs/calendar28:/Library/Application\ Support/Emacs --with-file-notification=yes CPPFLAGS=-I/opt/local/include CFLAGS="-g -H -pipe -fPIC -fno-common -Os -arch x86_64 -fomit-frame-pointer" LDFLAGS="-v -arch x86_64 -Wl,-bind_at_load -Wl,-t -L /opt/local/lib" PKG_CONFIG_PATH=/opt/local/libexec/openssl3/lib/pkgconfig:/opt/local/lib/pkgconfig:/opt/local/share/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig CC=clang CXX=clang++

(--with-dumping=unexec is used because I want to build NS variant with --disable-ns-self-contained and then X11 variant)

The failure happens here:

	gmake[2]: Leaving directory '/Users/pete/Quellen/Emacs_CVS/emacs-28.0.90/lisp'
	./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(68633,0x1087f5600) malloc: Non-aligned pointer 0x1078219f8 being freed
	temacs(68633,0x1087f5600) malloc: *** set a breakpoint in malloc_error_break to debug
	gmake[1]: *** [Makefile:852: bootstrap-emacs] Abort trap: 6
	gmake[1]: Leaving directory '/Users/pete/Quellen/Emacs_CVS/emacs-28.0.90/src'
	gmake: *** [Makefile:449: src] Error 2

The compiler used was this the one from Xcode 13.1, Apple clang version 13.0.0 (clang-1300.0.29.3).

--
Greetings

  Pete

’Twas a woman who drove me to drink, and I never had the courtesy to thank her for it.
				— W.C. Fields