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
Created attachment 804613 [details, diff] my new ebuild
Created attachment 804616 [details, diff] patch for git-repo(master)
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.
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"?
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(+)
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(-)