Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906315 - app-editors/emacs: automagic(ish) valgrind dependency
Summary: app-editors/emacs: automagic(ish) valgrind dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-14 07:40 UTC by Sam James
Modified: 2023-05-14 09:31 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-14 07:40:47 UTC
Emacs currently checks for the Valgrind headers and sets HAVE_VALGRIND_VALGRIND_H accordingly, without a USE=valgrind.

However, as of https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=638ef457876c14b9d713e2fa991f5db3ad53c4f9, this doesn't actually do anything at all - no annotations for Valgrind - unless -D_USE_VALGRIND=1 (or some other non-CPP-false value) is in *FLAGS.

Could we add a USE=valgrind with:
1. export ac_cv_header_valgrind_valgrind_h=$(usex valgrind)
2. append-cppflags -DUSE_VALGRIND=$(usex valgrind)
please?

Unfortunately, without this, you can't really use Valgrind on Emacs at all because of its heavy internal allocator usage.

There's a slight runtime penalty to having USE=valgrind on here but it's the same as all of the other USE=valgrind packages, i.e. it doesn't force Valgrind to be used, but adds annotations to ensure it works when run under it.
Comment 1 Larry the Git Cow gentoo-dev 2023-05-14 09:31:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=937aee1b335b4cc58d2d2da130f6200b68299a39

commit 937aee1b335b4cc58d2d2da130f6200b68299a39
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-05-14 09:28:25 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-05-14 09:31:05 +0000

    app-editors/emacs: Add valgrind support
    
    Closes: https://bugs.gentoo.org/906315
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-editors/emacs/emacs-25.3-r18.ebuild     | 5 ++++-
 app-editors/emacs/emacs-26.3-r15.ebuild     | 5 ++++-
 app-editors/emacs/emacs-27.2-r13.ebuild     | 5 ++++-
 app-editors/emacs/emacs-28.2-r8.ebuild      | 8 ++++++--
 app-editors/emacs/emacs-28.3_rc1-r2.ebuild  | 8 ++++++--
 app-editors/emacs/emacs-29.0.90.ebuild      | 8 ++++++--
 app-editors/emacs/emacs-29.0.9999-r1.ebuild | 8 ++++++--
 app-editors/emacs/emacs-30.0.9999.ebuild    | 8 ++++++--
 app-editors/emacs/metadata.xml              | 2 ++
 9 files changed, 44 insertions(+), 13 deletions(-)