Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 836392 - app-editors/emacs: ebuild issue involving PGTK and toolkit-scroll-bars
Summary: app-editors/emacs: ebuild issue involving PGTK and toolkit-scroll-bars
Status: RESOLVED FIXED
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:
 
Reported: 2022-03-30 04:25 UTC by sunox9
Modified: 2022-03-30 07:19 UTC (History)
1 user (show)

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 sunox9 2022-03-30 04:25:06 UTC
I compiled Emacs-29 with PGTK (USE=-X gtk) and without toolkit-scroll-bars, and whenever I went to drag the scroll bar with my mouse it crashed Emacs.

I submitted the bug to Emacs, and the dev I spoke with resolved it by disallowing this configuration. The thread for that bug report is here, though it seems to include only the first and last message: https://lists.gnu.org/archive/html/emacs-bug-tracker/2022-03/msg00569.html

They asked me to ask the Gentoo developers to similarly disallow this configuration in the ebuild, and also to disallow PGTK by default as "it should not be used with X". This is a quote of their explanation of the issue, and their request:

'''
This is because the PGTK port assumes toolkit scroll bars are
always available, but compiling without them causes the wrong code to be
enabled in keyboard.c, which then aborts upon "unexpected" scroll bar
events.

I will update the configure script to disallow this specific
configuration, but in the meantime, please tell the Gentoo developers to
fix their build script.

Please tell them to also turn PGTK off by default, people shouldn't be
using it on X.
'''

Please let me know if I can provide anything else. 

Reproducible: Always

Steps to Reproduce:
1.Compile emacs with PGTK and without 'toolkit-scroll-bars'
2.run 'emacs -Q'
3.try to drag scroll bar with mouse
Actual Results:  
Emacs crashes

Expected Results:  
The contents of the window scroll up or down.
Comment 1 sunox9 2022-03-30 04:26:21 UTC
Sorry, but I just found the full bug report thread: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54629
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-30 04:31:35 UTC
Thanks for the report. I'm pretty sure pgtk is off by default though.

ulm put a fair amount of thought into the logic and it's only on with USE="gtk -X":
># Emacs supports these window systems:
># X11, pure GTK (without X11), or Nextstep (Aqua/Cocoa).
># General GUI support is enabled by the "gui" USE flag, then
># the window system is selected as follows:
>#   "aqua" -> Nextstep
>#   "gtk -X" -> pure GTK
>#   otherwise -> X11
># For X11 there is the further choice of toolkits GTK, Motif,
># Athena (Lucid), or no toolkit. They are enabled (in order of
># preference) with the "gtk", "motif", "Xaw3d", and "athena" flags.

from https://gitweb.gentoo.org/repo/gentoo.git/tree/app-editors/emacs/emacs-29.0.9999.ebuild#n214.
Comment 3 Ulrich Müller gentoo-dev 2022-03-30 06:32:06 UTC
Indeed we currently have this (for the USE="gui gtk -X" case):

    elif use gtk && ! use X; then
        einfo "Configuring to build with pure GTK (without X11) support"
        # [...]
        myconf+=" $(use_with toolkit-scroll-bars)"

IIUC it needs to be changed to an unconditional --with-toolkit-scroll-bars.
Comment 4 Larry the Git Cow gentoo-dev 2022-03-30 07:18:43 UTC
The bug has been closed via the following commit(s):

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

commit badb974e4774dc877ff652fc712114c9d1b5f6d9
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2022-03-30 07:17:27 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2022-03-30 07:18:37 +0000

    app-editors/emacs: Always enable toolkit-scroll-bars with pure GTK
    
    Closes: https://bugs.gentoo.org/836392
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-editors/emacs/emacs-29.0.9999.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Ulrich Müller gentoo-dev 2022-03-30 07:19:11 UTC
Thanks for reporting!