Subject: bug#41103: Today's Emacs won't build on my (a little non-standard) system

From: akater <[email-masked]>
Date: Wed, 06 May 2020 01:51:13 +0000

I'm using uclibc-based Gentoo.  There's been a uclibc update recently
that raised some issues for me but I mention it only for completeness;
this looks like an indepndent issue: 

> Dumping under the name bootstrap-emacs.pdmp
> dumping fingerprint:
> 67aacf1623988ccfad67fb74359f6a16c36eb0d53162bdbea9ff90b756bae3be
> Dump complete
> Byte counts: header=80 hot=13444056 discardable=111072 cold=9331728
> Reloc counts: hot=940383 discardable=4355
> make -C ../lisp compile-first EMACS="../src/bootstrap-emacs"
> make[2]: Entering directory
> '/var/tmp/portage/app-editors/emacs-28.0.9999/work/emacs/lisp'
> EMACSLOADPATH= '../src/bootstrap-emacs' -batch --no-site-file
> --no-site-lisp --eval '(setq load-prefer-newer t)'  -f
> batch-byte-compile emacs-lisp/macroexp.el
> EMACSLOADPATH= '../src/bootstrap-emacs' -batch --no-site-file
> --no-site-lisp --eval '(setq load-prefer-newer t)'  -f
> batch-byte-compile emacs-lisp/cconv.el
> *** stack smashing detected ***: ../src/bootstrap-emacs terminated
> make[2]: *** [Makefile:296: emacs-lisp/macroexp.elc] Killed
> make[2]: *** Waiting for unfinished jobs....
> *** stack smashing detected ***: ../src/bootstrap-emacs terminated
> make[2]: *** [Makefile:296: emacs-lisp/cconv.elc] Killed
> make[2]: Leaving directory
> '/var/tmp/portage/app-editors/emacs-28.0.9999/work/emacs/lisp'
> make[1]: *** [Makefile:819: bootstrap-emacs.pdmp] Error 2
> make[1]: Leaving directory
> '/var/tmp/portage/app-editors/emacs-28.0.9999/work/emacs/src'
> make: *** [Makefile:424: src] Error 2
> * ERROR: app-editors/emacs-28.0.9999::akater failed (compile phase):
> *   emake failed

The gist of the issue is

> *** stack smashing detected ***: ../src/bootstrap-emacs terminated

I'm using what's called “a hardened profile” (for the reference:
default/linux/amd64/17.0/uclibc/hardened) information on uclibc profile
is actually sparse and outdated at places but hardened profiles usually
provide hardened toolchain which includes stack smashing protection.

I'll provide more feedback if necessary.