Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 869686 - media-libs/coin: new wayland/EGL capability
Summary: media-libs/coin: new wayland/EGL capability
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Maciej Mrozowski
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-11 09:50 UTC by brankob
Modified: 2023-11-20 15:06 UTC (History)
2 users (show)

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


Attachments
my new ebuild (coin-9999-r4.ebuild,2.36 KB, patch)
2022-09-11 09:51 UTC, brankob
Details | Diff
patch for git-repo(master) (0001-coin-egl.patch,42.24 KB, patch)
2022-09-11 09:52 UTC, brankob
Details | Diff
simple "Hello, world" test of the issue (coin_example.tar.gz,10.00 KB, application/gzip)
2022-09-11 11:24 UTC, brankob
Details

Note You need to log in before you can comment on or make changes to this bug.
Description brankob 2022-09-11 09:50:39 UTC
It started as a bug #861722, whichh later resolved to be coin's issue. 
Coin wouldn't work with Wayland well, because it was still going through GLX instead of EDL for 3D stuff. This made applications like FreeCad crash atz the moment that user tried to open or start a new project.

Upstream was preparing the patch to add a  config option COIN_USE_EGL, but that never materialized. So I took the submitted patches, applied them myself to my local git repo copy and fixed an issue that made compile to fail.
So, now it works, for me.

I'm attaching the patch for their git-repo(master) branch and my ebuild.
BTW ebuild uses my local branch (EGIT_REPO_BRANCH), which I set to "mine" IIRC and which includes the patch.

coinf makes FreeCad ( and other dependent apps) crash when tehy try to use 3D API at runtime.






Reproducible: Always

Steps to Reproduce:
1. start FreeCAD
2. try opening any example or starting new project
3.
Actual Results:  
application immediatelly crashes
Comment 1 brankob 2022-09-11 09:51:29 UTC
Created attachment 804613 [details, diff]
my new ebuild
Comment 2 brankob 2022-09-11 09:52:08 UTC
Created attachment 804616 [details, diff]
patch for git-repo(master)
Comment 3 brankob 2022-09-11 11:24:22 UTC
Created attachment 804655 [details]
simple "Hello, world" test of the issue

Since FreeCad and its dependencies take forever to compile just to test the coin issue, here is trivial test that pretty much just opens empty window.

It crashes with "old" coin library.
Comment 4 Nowa Ammerlaan gentoo-dev 2023-03-28 08:20:15 UTC
Just hit the same issue in FreeCAD. 

Fedora carries this patch which presumably also fixes the problem: https://src.fedoraproject.org/rpms/Coin4/blob/rawhide/f/coin-no_glx.patch (haven't tested this myself yet).

Arch is currently packaging a snapshot release of this commit: 04c19005bfd124d980e8946cb5bc1fc2b37bda29 

Would it be possible to do something similar (patch or snapshot) in Gentoo so we can easily launch FreeCAD in wayland sessions without having to force the use of Xwayland with "QT_QPA_PLATFORM=xcb"?
Comment 5 Larry the Git Cow gentoo-dev 2023-11-20 12:43:55 UTC
The bug has been referenced in the following commit(s):

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

commit c33fc13a54a8050b2f8869f464709a9432e2dbf9
Author:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
AuthorDate: 2023-11-20 12:39:53 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2023-11-20 12:43:42 +0000

    media-libs/coin: add 4.0.1
    
    Tried the patch from [1] which claims to fix running freecad under wayland.
    Unfortunately this just breaks the whole thing for me and it runs neither
    under X nor wayland.
    
    EAPI bumped to 8, doxygen moved to BDEPEND and upstreamed
    patches have been dropped.
    
    Will try to bump freecad next, and maybe add a workaround there so this bug
    at least stops bothering people.
    
    [1] https://forum.freecad.org/viewtopic.php?t=33359#p354412
    
    Bug: https://bugs.gentoo.org/869686
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 media-libs/coin/Manifest          |   1 +
 media-libs/coin/coin-4.0.1.ebuild | 104 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2023-11-20 15:06:23 UTC
The bug has been referenced in the following commit(s):

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

commit 59d9b399367d52b2ff249acaf1445ab4c098795e
Author:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
AuthorDate: 2023-11-20 15:00:41 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2023-11-20 15:06:04 +0000

    media-gfx/freecad: bump to 0.21.2
    
    - /usr/bin/freecad is no longer a symlink, instead it is a wrapper
    that ensure freecad is executed in xwayland. It still crashes in
    native wayland mode.
    
    - dropped opencascade dependency restriction
    
    - adjusted configure phase for qt6 compatibility. The qt6 flag is still
    masked for now as there is still some problem when building for qt6
    
    - added python3.12: this requires qt6 since there will likely be no
    further python compatibility updates for shiboken2/pyside2
    
    - only depend on qtdesigner if USE=designer
    
    Bug: https://bugs.gentoo.org/869686
    Closes: https://bugs.gentoo.org/916386
    Closes: https://bugs.gentoo.org/917262
    Co-authored-by: Jörg Habenicht <j.habenicht@gmx.de>
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 media-gfx/freecad/Manifest                         |   1 +
 ...ad-0.21.1-Gentoo-specific-don-t-check-vcs.patch |  16 +
 media-gfx/freecad/freecad-0.21.2.ebuild            | 364 +++++++++++++++++++++
 media-gfx/freecad/freecad-9999.ebuild              |  99 ++++--
 profiles/base/package.use.mask                     |   7 +
 5 files changed, 458 insertions(+), 29 deletions(-)