Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914368 - app-editors/emacs-29.1-r1 segfaults with gcc 13 and libgccjit
Summary: app-editors/emacs-29.1-r1 segfaults with gcc 13 and libgccjit
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 915000
  Show dependency tree
 
Reported: 2023-09-17 22:18 UTC by dysthesis
Modified: 2023-10-01 08:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,524.70 KB, text/plain)
2023-09-17 22:18 UTC, dysthesis
Details
emerge --info '=app-editors/emacs-29.1-r1::gentoo' (emacs-info,18.08 KB, text/plain)
2023-09-17 22:18 UTC, dysthesis
Details
emerge -pqv '=app-editors/emacs-29.1-r1::gentoo' (emacs-pqv,614 bytes, text/plain)
2023-09-17 22:19 UTC, dysthesis
Details
emerge --info gcc (gcc-info,19.19 KB, text/plain)
2023-09-17 22:20 UTC, dysthesis
Details
emerge -pqv gcc (gcc-pqv,555 bytes, text/plain)
2023-09-17 22:20 UTC, dysthesis
Details
environment (gcc,204 bytes, text/plain)
2023-09-17 22:55 UTC, dysthesis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dysthesis 2023-09-17 22:18:05 UTC
Created attachment 870822 [details]
build.log

I'm using an LLVM profile, but defined a GCC environment to build Emacs with.
Comment 1 dysthesis 2023-09-17 22:18:44 UTC
Created attachment 870823 [details]
emerge --info '=app-editors/emacs-29.1-r1::gentoo'
Comment 2 dysthesis 2023-09-17 22:19:23 UTC
Created attachment 870824 [details]
emerge -pqv '=app-editors/emacs-29.1-r1::gentoo'
Comment 3 dysthesis 2023-09-17 22:20:09 UTC
Created attachment 870825 [details]
emerge --info gcc
Comment 4 dysthesis 2023-09-17 22:20:31 UTC
Created attachment 870826 [details]
emerge -pqv gcc
Comment 5 dysthesis 2023-09-17 22:55:03 UTC
Created attachment 870827 [details]
environment
Comment 6 Ulrich Müller gentoo-dev 2023-09-18 08:35:53 UTC
Questions:
1. Is this reproducible?
2. Does it also occur with -O2 instead of -O3 and without -flto in CFLAGS?
Comment 7 dysthesis 2023-09-20 05:34:08 UTC
(In reply to Ulrich Müller from comment #6)
> Questions:
> 1. Is this reproducible?
> 2. Does it also occur with -O2 instead of -O3 and without -flto in CFLAGS?

Quite frankly, I'm not sure. However, it is fixed now after I recompiled GCC with the GCC environment instead of Clang.
Comment 8 Ulrich Müller gentoo-dev 2023-09-20 06:21:27 UTC
For the record, the file where it fails is ja-dic.el which is by far the largest elisp file:
$ wc /usr/share/emacs/29.1/lisp/leim/ja-dic/ja-dic.el
 148654  353920 4798823 /usr/share/emacs/29.1/lisp/leim/ja-dic/ja-dic.el

The file is also trivial, so my guess is that the problem is not with Emacs but with gcc or clang.

*** This bug has been marked as a duplicate of bug 20600 ***
Comment 9 Larry the Git Cow gentoo-dev 2023-09-20 12:51:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=589d9bedff04817f4c3f0fdbbcebcc9ded593575

commit 589d9bedff04817f4c3f0fdbbcebcc9ded593575
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-09-20 12:49:49 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-09-20 12:50:18 +0000

    app-editors/emacs: New use flag small-ja-dic
    
    Bug: https://bugs.gentoo.org/914368
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-editors/emacs/emacs-29.1-r2.ebuild   | 576 +++++++++++++++++++++++++++++++
 app-editors/emacs/emacs-29.1.9999.ebuild |   3 +-
 app-editors/emacs/emacs-30.0.9999.ebuild |   3 +-
 app-editors/emacs/metadata.xml           |   2 +
 4 files changed, 582 insertions(+), 2 deletions(-)
Comment 10 Ulrich Müller gentoo-dev 2023-09-20 12:55:05 UTC
I've added a USE flag small-ja-dic which exposes the --with-small-ja-dic "generate a smaller-size Japanese dictionary" configure option. This might serve as a workaround if the problem should reappear.