Compiling lifeograph 1.4.0 fails (Fedora 22)

Bug #1649530 reported by Lorenzo Miniero
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lifeograph
Fix Released
Undecided
Unassigned

Bug Description

Manual compilation of lifeograph 1.4.0 fails on Fedora 22. All the dependencies are satisfied.

Short snippet of where it fails:

/home/lminiero/Scaricati/lifeograph-1.4.0/src/app_window.cpp: In member function ‘void LIFEO::AppWindow::login()’:
/home/lminiero/Scaricati/lifeograph-1.4.0/src/app_window.cpp:461:77: error: no matching function for call to ‘Gtk::IconTheme::lookup_icon(const char [19], int)’
             Gtk::IconInfo ii = theme->lookup_icon( "filter-16-symbolic", 16 );

Not sure if this is caused by API changes in the Gtk libraries, but cmake doesn't complain about anything when checking. If you need the full log of the make attempt just let me know.

Thanks.

Revision history for this message
Ahmet Öztürk (dmxe) wrote :

what is your Gtk+ version?

Revision history for this message
Lorenzo Miniero (lminiero) wrote :

gtk+-1.2.10-80.fc22

Revision history for this message
Ahmet Öztürk (dmxe) wrote :

I mean your Gtk3 version.

Revision history for this message
Lorenzo Miniero (lminiero) wrote :

Sorry for the confusion: gtk3-3.16.7-2.fc22

Revision history for this message
Ahmet Öztürk (dmxe) wrote :

This is strange. Lookup_icon is clearly defined in 3.16 as it was introduced (according to the documentation) in 2.4: https://developer.gnome.org/gtkmm/stable/classGtk_1_1IconTheme.html#a65eb6be589a121ece1bc5b267a033ab5.

Please check your gtkmm3 version, too and whether headers of it are properly installed.

Revision history for this message
Lorenzo Miniero (lminiero) wrote :

gtmkmm3 version is the following, gtkmm30-3.16.0-1.fc22, and the development version of the package is installed too. I think I installed the development version of all the libraries lifeograph depends on, as eventually cmake doesn't complain anymore and I can 'make'.

Revision history for this message
Ahmet Öztürk (dmxe) wrote :

OK. Let's take another approach. Could you locate your icontheme.h file which is part of gtkmm where the unrecognized function should be defined. It should be in a path similar to this: /usr/include/gtkmm-3.0/gtkmm

in that file look for a line like this:
IconInfo lookup_icon(const Glib::ustring& icon_name, int size, IconLookupFlags flags = (IconLookupFlags)0) const;

Revision history for this message
Lorenzo Miniero (lminiero) wrote :

A grep on icontheme.h for lookup_icon returns this:

[lminiero@lminiero gtkmm] $ grep lookup_icon icontheme.h
 * Gtk::IconTheme::lookup_icon() includes builtin icons
 * Used to specify options for Gtk::IconTheme::lookup_icon()
  IconInfo lookup_icon(const Glib::ustring& icon_name, int size, IconLookupFlags flags) const;
  IconInfo lookup_icon(const Glib::ustring& icon_name, int size, int scale, IconLookupFlags flags) const;
  IconInfo lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon, int size, IconLookupFlags flags) const;
  IconInfo lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon, int size, int scale, IconLookupFlags flags) const;
   * lookup_icon() followed by Gtk::IconInfo::load_icon().
   * use lookup_icon() followed by
   * use lookup_icon() followed by

Revision history for this message
Ahmet Öztürk (dmxe) wrote :

So, indeed you do not have the function in your header. I really have no idea how this cabe. However, I have modified the source to use the version of the function without a default value. So, you should also be able to build now. Can you grab the latest revision (r2163) fron bzr repo and try?
https://code.launchpad.net/~dmxe/lifeograph/trunk

Revision history for this message
Lorenzo Miniero (lminiero) wrote :

Yeat, it looks like they always expect the flags parameter to be provided, there is no default value for when you don't. Not sure if this can be blamed on any of the repos we use, and if they changed the headers for some reason, or if the GTK API changed to accomodate that signature as well.

I'll try the trunk right away, thanks for looking into this!

Revision history for this message
Lorenzo Miniero (lminiero) wrote :

Using 0 as the default value seems not to work:

/home/lminiero/Scaricati/lifeograph/src/app_window.cpp: In member function ‘void LIFEO::AppWindow::login()’:
/home/lminiero/Scaricati/lifeograph/src/app_window.cpp:461:80: error: invalid conversion from ‘int’ to ‘Gtk::IconLookupFlags’ [-fpermissive]
           Gtk::IconInfo ii = theme->lookup_icon( "filter-16-symbolic", 16, 0 );

Casting 0 to (IconLookupFlags) did the trick for me instead:

           Gtk::IconInfo ii = theme->lookup_icon( "filter-16-symbolic", 16, (IconLookupFlags)0 );

Just compiled, installed, started and upgraded my diaries, and everything seems to be working as expected, thanks!

Revision history for this message
Ahmet Öztürk (dmxe) wrote :

You are welcome. Also, you are right; I had to cast 0 to IconLookupFlags. I was able to compile because compiler mistook the plain zero for scale (considering another override of the lookup_icon). I fixed this in r2164.

Changed in lifeograph:
status: New → Fix Committed
Revision history for this message
Ahmet Öztürk (dmxe) wrote :

The related commit in gtkmm, just for reference:
https://mail.gnome.org/archives/commits-list/2015-June/msg05930.html

Revision history for this message
Harper Pollock (harpol) wrote :

I should probably post it here.

I was able to go through cmake and make steps. make install, however, still produces error.

If called as user:

Makefile:66: recipe for target 'install' failed
make: *** [install] Error 1

If called as root:
touch: cannot touch ‘/root/.local/share/applications/mimeapps.list’: No such file or directory
/usr/bin/xdg-mime: 781: /usr/bin/xdg-mime: cannot create /root/.local/share/applications/mimeapps.list.new: Directory nonexistent

Details: http://pastebin.com/BZezwFKe
Revision used: r2164

Revision history for this message
Ahmet Öztürk (dmxe) wrote :

Release 1.4.1 includes this fix.

P.S: AFAIK, mimeapps.list error is harmless. All should be fine.

Changed in lifeograph:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.