Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833443 - media-gfx/hugin-2021.0.0: crash on wayland
Summary: media-gfx/hugin-2021.0.0: crash on wayland
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-02-16 00:02 UTC by Kobboi
Modified: 2023-09-30 18:35 UTC (History)
3 users (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 Kobboi 2022-02-16 00:02:15 UTC
Some popup appears to send debug info, but then the application exits.

This is mentioned on their website (http://hugin.sourceforge.net/releases/2021.0.0/en.shtml)

"Hugin does not run native on Wayland because of a bug in the underlying wxWidgets library.

The source code contains a workaround which forces the usage of the XWayland emulation layer. This workaround has be activated during compiling by adding -DUSE_GDKBACKEND_X11=on to the CMake command line."

This is a one-liner ebuild fix and I confirm that it works.

Currently unclear if this can be added unconditionally



Reproducible: Always
Comment 1 Argantonivs 2022-08-24 21:42:21 UTC
Sorry, Kobboi, could you please tell me where in the ebuild or in what way that line has to be added for Hugin to work?
I know almost nothing about ebuild editing, and installing wxGTK version 3.2 Hugin still doesn't work. I decided to try and download an 3.2 ebuild from an overlay and install it, since the ebuild in portage is still 3.0, and see if a recent version solved the bug, but it didn't.

So, I would be grateful if you could tell me what to do with that line "-DUSE_GDKBACKEND_X11=on". Paste it inside the ebuild and try to "ebuild [...] digest" doesn't work, as I supposed.
Comment 2 Bernd Feige 2022-08-25 06:16:18 UTC
(In reply to Argantonivs from comment #1)
> Sorry, Kobboi, could you please tell me where in the ebuild or in what way
> that line has to be added for Hugin to work?
> I know almost nothing about ebuild editing, and installing wxGTK version 3.2
> Hugin still doesn't work. I decided to try and download an 3.2 ebuild from
> an overlay and install it, since the ebuild in portage is still 3.0, and see
> if a recent version solved the bug, but it didn't.
> 
> So, I would be grateful if you could tell me what to do with that line
> "-DUSE_GDKBACKEND_X11=on". Paste it inside the ebuild and try to "ebuild
> [...] digest" doesn't work, as I supposed.

It's entered in the "mycmakeargs" list in the ebuild.
Here is the one-line patch.

*** /usr/portage/media-gfx/hugin/hugin-2021.0.0.ebuild	2022-03-01 01:09:54.000000000 +0100
--- /gentoo/overlay/media-gfx/hugin/hugin-2021.0.0.ebuild	2022-08-25 08:14:11.698511060 +0200
***************
*** 75,80 ****
--- 75,81 ----
  	local mycmakeargs=(
  		-DBUILD_HSI=$(usex python)
  		-DENABLE_LAPACK=$(usex lapack)
+ 		-DUSE_GDKBACKEND_X11=on
  	)
  	cmake_src_configure
  }
Comment 3 Argantonivs 2022-08-29 00:21:12 UTC
(In reply to Bernd Feige from comment #2)
> (In reply to Argantonivs from comment #1)
> > Sorry, Kobboi, could you please tell me where in the ebuild or in what way
> > that line has to be added for Hugin to work?
> > I know almost nothing about ebuild editing, and installing wxGTK version 3.2
> > Hugin still doesn't work. I decided to try and download an 3.2 ebuild from
> > an overlay and install it, since the ebuild in portage is still 3.0, and see
> > if a recent version solved the bug, but it didn't.
> > 
> > So, I would be grateful if you could tell me what to do with that line
> > "-DUSE_GDKBACKEND_X11=on". Paste it inside the ebuild and try to "ebuild
> > [...] digest" doesn't work, as I supposed.
> 
> It's entered in the "mycmakeargs" list in the ebuild.
> Here is the one-line patch.
> 
> *** /usr/portage/media-gfx/hugin/hugin-2021.0.0.ebuild	2022-03-01
> 01:09:54.000000000 +0100
> --- /gentoo/overlay/media-gfx/hugin/hugin-2021.0.0.ebuild	2022-08-25
> 08:14:11.698511060 +0200
> ***************
> *** 75,80 ****
> --- 75,81 ----
>   	local mycmakeargs=(
>   		-DBUILD_HSI=$(usex python)
>   		-DENABLE_LAPACK=$(usex lapack)
> + 		-DUSE_GDKBACKEND_X11=on
>   	)
>   	cmake_src_configure
>   }


Very kind of you. The letters look a bit blurry, but I guess that must be another poor implementation of Wayland in KDE Plasma that will be solved one of these lustrums, xD. At least it works now. \o/

Many thanks.
Comment 4 Midgard 2022-12-18 15:51:00 UTC
Hi, could the patch in the comments above be applied to the ebuild in the repository so that Hugin runs out of the box on Wayland systems? Many thanks.
Comment 5 Andreas Sturmlechner gentoo-dev 2022-12-25 22:31:44 UTC
Still required for 2022.0.0?
Comment 6 Kobboi 2022-12-28 19:12:14 UTC
(In reply to Andreas Sturmlechner from comment #5)
> Still required for 2022.0.0?

Still crashing, yes
Comment 7 Kobboi 2022-12-28 19:13:05 UTC
I can test+PR if you want.
Comment 8 Chris Mayo 2023-02-12 18:13:45 UTC
x11-libs/wxGTK-3.2.1 is in the tree now, so can just build Hugin with that.
Except Fast Panorama preview window needs glew built for EGL.

Updated ebuilds for both:
https://github.com/gentoo/gentoo/pull/29559

Suspect they are not quite ready for the tree yet. But initial running of Hugin suggest they work.
Comment 9 Chris Mayo 2023-02-13 19:50:21 UTC
Building glew for EGL would break other applications in the tree.

But, I do think Hugin with wxGTK-3.2.1 fixes this bug.
Comment 10 Chris Mayo 2023-02-23 19:18:26 UTC
Even with glew built for EGL there are still issues with Wayland.

GDK_BACKEND=x11 still seems the way to go for now.
Comment 11 Midgard 2023-09-03 19:26:03 UTC
Could we just apply the -DUSE_GDKBACKEND_X11=on patch until we switch to wxGTK-3.2? As is, Hugin is broken out of the box for all Wayland users who don't find their way to this bug report, and Wayland is kind of mainstream now...

(And I have to edit /var/db/repos/gentoo/media-gfx/hugin/hugin-*.ebuild and rebuild every time Hugin gets rebuilt. Which is why I'm reminded to comment here, hehe.)
Comment 12 Larry the Git Cow gentoo-dev 2023-09-22 14:54:55 UTC
The bug has been referenced in the following commit(s):

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

commit 20c2df020d62adfe6cc523773e1098c82e54c16e
Author:     Rafael Kitover <rkitover@gmail.com>
AuthorDate: 2023-09-20 18:53:07 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-22 14:54:05 +0000

    x11-libs/wxGTK: explain reason for disabling EGL
    
    Explain the rationale for disabling the EGL wxGLCanvas in the ebuild
    comments.
    
    Bug: https://bugs.gentoo.org/833443
    Bug: https://bugs.gentoo.org/911120
    Signed-off-by: Rafael Kitover <rkitover@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/32452
    Signed-off-by: Sam James <sam@gentoo.org>

 x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
Comment 13 Larry the Git Cow gentoo-dev 2023-09-23 20:08:31 UTC
The bug has been closed via the following commit(s):

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

commit 92729a9da9d9a66f3b6984b2df12e9d93eea6c7b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-23 20:06:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-23 20:06:48 +0000

    media-gfx/hugin: disable Wayland backend
    
    As noted in the bug, this is broken w/ wxgtk-3.0. Just go for the X backend
    for now until we can move to wxgtk-3.2, but we can't quite do that yet because
    of issues w/ egl+wayland.
    
    Closes: https://bugs.gentoo.org/833443
    Signed-off-by: Sam James <sam@gentoo.org>

 media-gfx/hugin/hugin-2022.0.0-r1.ebuild | 103 +++++++++++++++++++++++++++++++
 media-gfx/hugin/hugin-9999.ebuild        |   4 ++
 2 files changed, 107 insertions(+)