Bug 1540795

Summary: invalid code under gcc8
Product: [Fedora] Fedora Reporter: Orcan Ogetbil <oget.fedora>
Component: glibmm24Assignee: Kalev Lember <klember>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: debarshir, karlthered, klember, mattias.ellert, opensource
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibmm24-2.54.1-2.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-02 15:58:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orcan Ogetbil 2018-02-01 03:00:59 UTC
When building muse-3.0.2 with gcc8, the build failed due to glibmm-2.4/glibmm.h header containing invalid code
https://koji.fedoraproject.org/koji/taskinfo?taskID=24606627

   In file included from /usr/include/glibmm-2.4/glibmm.h:90,
                    from /usr/include/gtkmm-2.4/gtkmm/stockid.h:26,
                    from /usr/include/gtkmm-2.4/gtkmm/iconset.h:35,
                    from /usr/include/gtkmm-2.4/gtkmm/style.h:46,
                    from /usr/include/gtkmm-2.4/gtkmm/rc.h:31,
                    from /usr/include/gtkmm-2.4/gtkmm/widget.h:48,
                    from /usr/include/gtkmm-2.4/gtkmm/container.h:30,
                    from /usr/include/gtkmm-2.4/gtkmm/bin.h:31,
                    from /usr/include/gtkmm-2.4/gtkmm/window.h:33,
                    from /builddir/build/BUILD/muse-3.0.2/muse/lv2Gtk2Support/lv2Gtk2Support.cpp:6:
   /usr/include/glibmm-2.4/glibmm/threads.h: In member function 'GPrivate* Glib::Threads::Private<T>::gobj()':
   /usr/include/glibmm-2.4/glibmm/threads.h:660:29: error: cannot convert 'GPrivate' {aka '_GPrivate'} to 'GPrivate*' {aka '_GPrivate*'} in return
      GPrivate* gobj() { return gobject_; }

See for reference:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83165

If there is a way to file this bug upstream please let me know.

Comment 1 Orcan Ogetbil 2018-02-01 03:13:45 UTC
I found that the following upstream commit removes "the deprecated threads API"

https://github.com/GNOME/glibmm/commit/db75f338fb1

It is an API breaking change.
Should we backport this change downstream in rawhide?

Comment 2 Mattias Ellert 2018-02-02 15:29:41 UTC
It looks like a typo (a missing &). The other 4 gobj() methods say "return &gobject":

$ grep 'gobj() {' /usr/include/glibmm-2.4/glibmm/threads.h
  GMutex* gobj() { return &gobject_; }
  GRecMutex* gobj() { return &gobject_; }
  GRWLock* gobj() { return &gobject_; }
  GCond* gobj() { return &gobject_; }
  GPrivate* gobj() { return gobject_; }

Comment 3 Kalev Lember 2018-02-02 15:58:31 UTC
Thanks, should be fixed in glibmm24-2.54.1-2.fc28 that changes it to "return &gobject_"

Comment 4 Orcan Ogetbil 2018-02-03 00:43:43 UTC
Thanks. Makes me wonder why it didn't fail before.