Summary: | >=sys-devel/gcc-14: bad malloc alignment causes Emacs build failure (app-editors/emacs-29.4 fails to compile on hppa: Memory exhausted--use M-x save-some-buffers then exit and restart Emacs) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | matoro <matoro_gentoo> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gnu-emacs, hppa, matoro_gentoo, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | HPPA | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=916519 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77691 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115750 |
||
Whiteboard: | fixed in 14.1.1_p20240706 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 914580, 941869 | ||
Attachments: |
build.log and emerge --info
build.log and emerge --info |
Created attachment 896532 [details]
build.log and emerge --info
For comparison, build with gcc-13.
My notes suggest it might be -ffold-mem-offsets which is a new pass in GCC 14. We had a few problems with it on HPPA. I thought they were all fixed... (In reply to Sam James from comment #2) > My notes suggest it might be -ffold-mem-offsets which is a new pass in GCC > 14. We had a few problems with it on HPPA. I thought they were all fixed... Tried with -fno-fold-mem-offsets, no luck. Thanks, I'll poke more. Just upgrading the machine first. 0ee3266b3dec4d984d43c79e2b3e649256e3eaaa is the first bad commit commit 0ee3266b3dec4d984d43c79e2b3e649256e3eaaa Author: John David Anglin <danglin@gcc.gnu.org> Date: Thu Oct 5 20:05:00 2023 +0000 Delete MALLOC_ABI_ALIGNMENT define from pa32-linux.h 2023-10-05 John David Anglin <danglin@gcc.gnu.org> * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Delete. gcc/config/pa/pa32-linux.h | 5 ----- 1 file changed, 5 deletions(-) bisect found first bad commit -- If that's right (not yet confirmed), that's interesting, as we had discussion about it on the glibc side. See https://inbox.sourceware.org/libc-alpha/668d1c2d-1b02-bea8-d5a7-ea8a044f3f97@bell.net/. Emailed Dave & Helge for some help. I'm looking in the Emacs source but I don't see anywhere they would rely on this... Dave has fixed this in GCC. It'll be in the next 14/15 snapshots. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5540fdcede357cfa08ef6c83699bb5b4c72a982 commit e5540fdcede357cfa08ef6c83699bb5b4c72a982 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-07-06 22:45:06 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-07-06 22:45:06 +0000 sys-devel/gcc: add 14.1.1_p20240706 Bug: https://bugs.gentoo.org/935027 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-14.1.1_p20240706.ebuild | 55 +++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) Fixed. |
Created attachment 896531 [details] build.log and emerge --info This is present for both stable and unstable emacs versions. Works with gcc-13, but when using gcc-14, it fails to compile with: Loading loadup.el (source)... Dump mode: pbootstrap Using load-path (/var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4/lisp /var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4/lisp/emacs-lisp /var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4/lisp/progmodes /var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4/lisp/language /var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4/lisp/international /var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4/lisp/textmodes /var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4/lisp/vc) Loading emacs-lisp/debug-early... Loading emacs-lisp/byte-run... Loading emacs-lisp/backquote... Loading subr... Loading keymap... Memory exhausted--use M-x save-some-buffers then exit and restart Emacs make[2]: *** [Makefile:923: bootstrap-emacs.pdmp] Error 255 make[2]: Leaving directory '/var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4/src' make[1]: *** [Makefile:544: src] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4' make[1]: Entering directory '/var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4' *** *** "make all" failed with exit status 2. *** *** You could try to: *** - run "make bootstrap", which might fix the problem *** - run "make V=1", which displays the full commands invoked by make, *** to further investigate the problem *** make[1]: *** [Makefile:414: advice-on-failure] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-editors/emacs-29.4/work/emacs-29.4' make: *** [Makefile:370: all] Error 2