Bug 1540795 - invalid code under gcc8
Summary: invalid code under gcc8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibmm24
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-01 03:00 UTC by Orcan Ogetbil
Modified: 2018-02-03 00:43 UTC (History)
5 users (show)

Fixed In Version: glibmm24-2.54.1-2.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-02 15:58:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.