Building a project like dev-libs/gjs with dev-libs/glib-2.74.2 and sys-devel/gcc-12.2.1_p20221008 gives this compilation error: /usr/include/glib-2.0/glib/ghash.h:165:38: error: invalid conversion from ‘gconstpointer’ {aka ‘const void*’} to ‘const char*’ [-fpermissive] 165 | #define g_str_equal(v1, v2) (strcmp ((gconstpointer) (v1), (gconstpointer) (v2)) == 0) | ^~~~~~~~~~~~~~~~~~~~ | | | gconstpointer {aka const void*} Reproducible: Always Steps to Reproduce: - Update to dev-libs/glib-2.74.2 - Build dev-libs/gjs-1.74.1 Actual Results: Compile-time error. Expected Results: Successful build. Upstream error is here: https://gitlab.gnome.org/GNOME/glib/-/issues/2820 Upstream will fix this in 2.74.3 on 12/22/2022. I don't want my world update to be stuck that long though.
Created attachment 837335 [details, diff] Implements the suggested fix from upstream Signed-off-by: Alexandra Parker <alex.iris.parker@gmail.com>
(In reply to Alexandra Parker from comment #1) > Created attachment 837335 [details, diff] [details, diff] > Implements the suggested fix from upstream Works fine and also fixes both 883093 & 883133
*** Bug 883227 has been marked as a duplicate of this bug. ***
*** Bug 883133 has been marked as a duplicate of this bug. ***
*** Bug 883093 has been marked as a duplicate of this bug. ***
*** Bug 883217 has been marked as a duplicate of this bug. ***
*** Bug 883151 has been marked as a duplicate of this bug. ***
*** Bug 883145 has been marked as a duplicate of this bug. ***
*** Bug 883119 has been marked as a duplicate of this bug. ***
*** Bug 883229 has been marked as a duplicate of this bug. ***
*** Bug 883231 has been marked as a duplicate of this bug. ***
*** Bug 883233 has been marked as a duplicate of this bug. ***
*** Bug 883309 has been marked as a duplicate of this bug. ***
*** Bug 883311 has been marked as a duplicate of this bug. ***
*** Bug 883257 has been marked as a duplicate of this bug. ***
*** Bug 883277 has been marked as a duplicate of this bug. ***
*** Bug 883253 has been marked as a duplicate of this bug. ***
*** Bug 883255 has been marked as a duplicate of this bug. ***
*** Bug 883331 has been marked as a duplicate of this bug. ***
on possibility of a mask: needs someone to abidiff a downgrade to see if it's problematic, I hope/suspect they don't add new symbols (versioned) on point releases
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15d4c35b62e142eedcb2570b78560af0eb7e51cf commit 15d4c35b62e142eedcb2570b78560af0eb7e51cf Author: David Seifert <soap@gentoo.org> AuthorDate: 2022-11-27 18:26:53 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2022-11-27 18:26:53 +0000 profiles: mask dev-libs/glib-2.74.2 due to C++ breakage * 2.74.2 hasn't added any new symbols, hence we can safely mask it. Bug: https://bugs.gentoo.org/883223 Signed-off-by: David Seifert <soap@gentoo.org> profiles/package.mask | 5 +++++ 1 file changed, 5 insertions(+)
*** Bug 883341 has been marked as a duplicate of this bug. ***
Created attachment 837843 [details] Compilation failed for gjs-1.74.1 with glib-2.74.2 Reproduction of bug 883223
Created attachment 837845 [details] Compilation succesfull for gjs-1.74.1 with glib-2.74.2-r1 Succesfull compiled gjs after fix glib-2.74.2-r1 https://github.com/gentoo/gentoo/pull/28458
*** Bug 883373 has been marked as a duplicate of this bug. ***
The patch is better than a mask; in C++ terms it is a nested reinterpret_cast which, technically, isn't necessary; changing (gconstptr) to (const char*) should be sufficient, but so far as I can see it is totally harmless until upstream comes up with a real fix to deal with g++ (it is, I believe, g++ specific; those guys have always gone in for excessive warnings of this type.) In the past I've done this with a macro to use either (type) or static_cast<type> as appropriate.
New fix by upstream 33 minutes ago: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3094/diffs?commit_id=6c39f08f371da68a4ff104ca2b9f1cd5e38b6cdf Added to PR for glib-2.74.2-r1.ebuild https://github.com/gentoo/gentoo/pull/28458
(In reply to John Bowler from comment #26) > The patch is better than a mask; in C++ terms it is a nested > reinterpret_cast which, technically, isn't necessary; changing (gconstptr) > to (const char*) should be sufficient, but so far as I can see it is totally > harmless until upstream comes up with a real fix to deal with g++ (it is, I > believe, g++ specific; those guys have always gone in for excessive warnings > of this type.) > > In the past I've done this with a macro to use either (type) or > static_cast<type> as appropriate. We usually prefer to use patches which are merged upstream unless something is obviously correct, especially given this is in headers. Indeed, upstream seem likely to merge something different. A mask doesn't really do any harm here anyway.
Patch merged upstream https://gitlab.gnome.org/GNOME/glib/-/commit/5f945e5464b45fc674f436077e9761523caa76f0 Updated in PR https://github.com/gentoo/gentoo/pull/28458
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6c0f08982143db8227d208391f6ed62f974c53c commit c6c0f08982143db8227d208391f6ed62f974c53c Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2022-12-01 15:28:34 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2022-12-01 15:44:01 +0000 dev-libs/glib: Version bump to 2.74.3 Closes: https://bugs.gentoo.org/883223 Signed-off-by: Matt Turner <mattst88@gentoo.org> dev-libs/glib/Manifest | 1 + dev-libs/glib/glib-2.74.3.ebuild | 287 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 288 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da492e33f9ad0d1cf09c4c643737755999fa7425 commit da492e33f9ad0d1cf09c4c643737755999fa7425 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-12-02 03:23:49 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-12-02 03:27:32 +0000 dev-libs/glib: drop 2.74.2 (broken) Will keep the mask for a little bit for folks who still have it installed as a prompt to upgrade. Bug: https://bugs.gentoo.org/883223 Signed-off-by: Sam James <sam@gentoo.org> dev-libs/glib/Manifest | 1 - dev-libs/glib/glib-2.74.2.ebuild | 287 --------------------------------------- 2 files changed, 288 deletions(-)