Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654776 - dev-cpp/glibmm-2.52.1: error: cannot convert ‘GPrivate’ {aka ‘_GPrivate’} to ‘GPrivate*’ {aka ‘_GPrivate*’} in return GPrivate* gobj() { return gobject_; }dev-cpp/glibmm-2.52.1:
Summary: dev-cpp/glibmm-2.52.1: error: cannot convert ‘GPrivate’ {aka ‘_GPrivate’} to ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PATCH
: 654772 655274 661226 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-05-03 21:38 UTC by lekto
Modified: 2019-02-23 17:06 UTC (History)
9 users (show)

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


Attachments
build.log (build.log,23.73 KB, text/x-log)
2018-05-03 21:38 UTC, lekto
Details
emerge --info (emerge.info,5.34 KB, application/x-info)
2018-05-03 21:39 UTC, lekto
Details
glibmm-2.52.1-gcc-8.patch (glibmm-2.52.1-gcc-8.patch,332 bytes, patch)
2018-05-04 07:10 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lekto 2018-05-03 21:38:26 UTC
Created attachment 529678 [details]
build.log

In file included from /var/tmp/portage/dev-cpp/glibmm-2.52.1/work/glibmm-2.52.1/glib/glibmm.h:90,
                 from /var/tmp/portage/dev-cpp/glibmm-2.52.1/work/glibmm-2.52.1/glib/glibmm/bytes.cc:4:
/var/tmp/portage/dev-cpp/glibmm-2.52.1/work/glibmm-2.52.1/glib/glibmm/threads.h: In member function ‘GPrivate* Glib::Threads::Private<T>::gobj()’:
/var/tmp/portage/dev-cpp/glibmm-2.52.1/work/glibmm-2.52.1/glib/glibmm/threads.h:660:29: error: cannot convert ‘GPrivate’ {aka ‘_GPrivate’} to ‘GPrivate*’ {aka ‘_GPrivate*’} in return
   GPrivate* gobj() { return gobject_; }
                             ^~~~~~~~
Comment 1 lekto 2018-05-03 21:39:28 UTC
Created attachment 529680 [details]
emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2018-05-04 07:08:44 UTC
I wonder why it did not fail before. Maybe gcc-8 mecame stricter about type-checking template classes. This tweak makes it compile for gcc-8:

diff --git a/glib/glibmm/threads.h b/glib/glibmm/threads.h
index 5350a99..cc48c01 100644
--- a/glib/glibmm/threads.h
+++ b/glib/glibmm/threads.h
@@ -657,7 +657,7 @@ public:
    */
   inline void replace(T* data);
 
-  GPrivate* gobj() { return gobject_; }
+  GPrivate* gobj() { return &gobject_; }
 
 private:
   GPrivate gobject_;
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2018-05-04 07:10:36 UTC
Created attachment 529692 [details, diff]
glibmm-2.52.1-gcc-8.patch
Comment 4 Ivan 2018-05-04 09:04:09 UTC
Thanks for the patch, it works for me.

Once applied to dev-cpp/glibmm it also indirectly helps to successfully build and merge following packages: 

dev-cpp/atkmm 
dev-cpp/pangomm 
=dev-cpp/gtkmm-2.24.5 
=dev-cpp/gtkmm-3.22.2 
dev-cpp/gconfmm 
dev-cpp/libglademm
sys-block/gparted
media-sound/paprefs 
media-sound/pavumeter 
media-sound/pavucontro

I guess you can avoid a lot of bugreports if you push that patch into Gentoo Portage tree.
Comment 5 lekto 2018-05-04 13:02:31 UTC
Patch works for me too.
Comment 6 Jan Kundrát 2018-05-05 09:06:33 UTC
This has been fixed upstream [1]. What I do not understand is how come that this has never been a problem before -- that code was clearly wrong all the time. Perhaps it's some compiler-version-detection which suddenly forces that code to be compiled for the first time?

Anyway, they also have a funny release process where they ship just some .hg file in git, but .h file in a tarball. One should patch both.

I'll send a pull request once my rebuild-the-world-after-gcc-4.9-to-gcc-8.1 proceeds far enough to unbreak Git :).

[1] https://bugzilla.gnome.org/show_bug.cgi?id=791711
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2018-05-06 22:16:21 UTC
*** Bug 654772 has been marked as a duplicate of this bug. ***
Comment 8 Hendrik v. Raven 2018-05-12 08:14:11 UTC
*** Bug 655274 has been marked as a duplicate of this bug. ***
Comment 9 Ivan 2018-05-18 02:52:31 UTC
<offtop> 
> rebuild-the-world-after-gcc-4.9-to-gcc-8.1

That sounds almost like "definition of having fun" :-D

</offtop>
Comment 10 Larry the Git Cow gentoo-dev 2018-05-22 12:17:39 UTC
The bug has been closed via the following commit(s):

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

commit 85e6e0e04ae19670b071820947d941e521d1200e
Author:     Jan Kundrát <jkt@kde.org>
AuthorDate: 2018-05-05 08:59:52 +0000
Commit:     Gilles Dartiguelongue <eva@gentoo.org>
CommitDate: 2018-05-22 12:17:03 +0000

    dev-cpp/glibmm: Fix build with GCC 8
    
    Patch taken from upstream and adapted to actually touch the pregenerated
    file shipped with the release tarbal as well. That code appears to have
    been always wrong, with no chance to build. This probably means that GCC
    8 is suddenly being detected in some other way, making the code use that
    include file which was previously apparently kept unused. But anyway,
    upstream killed that include in a later release, so let's just let this
    build and watch the eventual breakage.
    
    Upstream says:
    
    > Fixed in the glibmm-2-54 branch. No fix is necessary in the master
    > branch. The threads.hg and threads.h files don't exist there.
    
    Closes: https://bugs.gentoo.org/654776
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=791711
    Closes: https://github.com/gentoo/gentoo/pull/8324

 .../glibmm/files/glibmm-fix-threads-gobject.patch  | 34 ++++++++++++++++++++++
 dev-cpp/glibmm/glibmm-2.52.1.ebuild                |  6 ++++
 2 files changed, 40 insertions(+)
Comment 11 rnddim 2018-06-17 04:34:28 UTC
This fix really should have resulted in a revision bump, and I'd still recommend a 2.52.1-r1 version of the ebuild, since I couldn't even get past the configuration of inkscape (bug #655274) until I found out about this problem and then manually remerged glibmm-2.52.1.
Comment 12 Alex Xu (Hello71) 2018-07-03 02:17:26 UTC
*** Bug 658708 has been marked as a duplicate of this bug. ***
Comment 13 Mart Raudsepp gentoo-dev 2018-07-16 18:35:50 UTC
*** Bug 661226 has been marked as a duplicate of this bug. ***
Comment 14 Mart Raudsepp gentoo-dev 2018-07-16 18:39:06 UTC
There's a "revbump" by now, in the form of a bump to 2.54.1. I'd hope that goes stable before gcc8 (but glib 2.54 is NOT a stable candidate as of yet due to python-single usage that's not solved yet with split packages; however I think glibmm-2.54 works with glib-2.52... but gcc8 stable is probably rather far away anyways)