PaulCombal / SamRewritten

Steam Achievement Manager For Linux. Rewritten in C++.
GNU General Public License v3.0
340 stars 32 forks source link

Not able to build #45

Closed Shov96 closed 4 years ago

Shov96 commented 4 years ago

I am using 64-bit Ubuntu 18.04.3 LTS (GNOME 3.28.2). I have cloned the repository and am running make in terminal.

In file included from /usr/include/gtkmm-3.0/gtkmm/widget.h:39:0,
                 from /usr/include/gtkmm-3.0/gtkmm/container.h:28,
                 from /usr/include/gtkmm-3.0/gtkmm/bin.h:27,
                 from /usr/include/gtkmm-3.0/gtkmm/listboxrow.h:25,
                 from src/gui/ListBoxRowWithIcon.h:4,
                 from src/gui/AchievementBoxRow.h:5,
                 from src/gui/AchievementBoxRow.cpp:1:
/usr/include/gtkmm-3.0/gtkmm/object.h: In instantiation of ‘auto Gtk::make_managed(T_Args&& ...) [with T = Gtk::Image; T_Args = {const char (&)[10], Gtk::BuiltinIconSize}]’:
src/gui/AchievementBoxRow.cpp:38:116:   required from here
/usr/include/gtkmm-3.0/gtkmm/object.h:63:17: error: no matching function for call to ‘Gtk::Image::Image(const char [10], Gtk::BuiltinIconSize)’
   return manage(new T(std::forward<T_Args>(args)...));
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/gui/ListBoxRowWithIcon.h:5:0,
                 from src/gui/AchievementBoxRow.h:5,
                 from src/gui/AchievementBoxRow.cpp:1:
/usr/include/gtkmm-3.0/gtkmm/image.h:251:12: note: candidate: Gtk::Image::Image(const Glib::RefPtr<Gdk::PixbufAnimation>&)
   explicit Image(const Glib::RefPtr<Gdk::PixbufAnimation>& animation);
            ^~~~~
/usr/include/gtkmm-3.0/gtkmm/image.h:251:12: note:   candidate expects 1 argument, 2 provided
/usr/include/gtkmm-3.0/gtkmm/image.h:248:3: note: candidate: Gtk::Image::Image(const Glib::RefPtr<Gtk::IconSet>&, Gtk::IconSize)
   Image(const Glib::RefPtr<IconSet>& icon_set, IconSize size);
   ^~~~~
/usr/include/gtkmm-3.0/gtkmm/image.h:248:3: note:   no known conversion for argument 1 from ‘const char [10]’ to ‘const Glib::RefPtr<Gtk::IconSet>&’
/usr/include/gtkmm-3.0/gtkmm/image.h:242:3: note: candidate: Gtk::Image::Image(const Gtk::StockID&, Gtk::IconSize)
   Image(const Gtk::StockID& stock_id, IconSize size);
   ^~~~~
/usr/include/gtkmm-3.0/gtkmm/image.h:242:3: note:   no known conversion for argument 1 from ‘const char [10]’ to ‘const Gtk::StockID&’
/usr/include/gtkmm-3.0/gtkmm/image.h:225:14: note: candidate: Gtk::Image::Image(const Glib::RefPtr<Gdk::Pixbuf>&)
     explicit Image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
              ^~~~~
/usr/include/gtkmm-3.0/gtkmm/image.h:225:14: note:   candidate expects 1 argument, 2 provided
/usr/include/gtkmm-3.0/gtkmm/image.h:218:14: note: candidate: Gtk::Image::Image(const string&)
     explicit Image(const std::string& file);
              ^~~~~
/usr/include/gtkmm-3.0/gtkmm/image.h:218:14: note:   candidate expects 1 argument, 2 provided
In file included from src/gui/ListBoxRowWithIcon.h:5:0,
                 from src/gui/AchievementBoxRow.h:5,
                 from src/gui/AchievementBoxRow.cpp:1:
/usr/include/gtkmm-3.0/gtkmm/image.h:206:3: note: candidate: Gtk::Image::Image()
   Image();
   ^~~~~
/usr/include/gtkmm-3.0/gtkmm/image.h:206:3: note:   candidate expects 0 arguments, 2 provided
/usr/include/gtkmm-3.0/gtkmm/image.h:169:12: note: candidate: Gtk::Image::Image(GtkImage*)
   explicit Image(GtkImage* castitem);
            ^~~~~
/usr/include/gtkmm-3.0/gtkmm/image.h:169:12: note:   candidate expects 1 argument, 2 provided
/usr/include/gtkmm-3.0/gtkmm/image.h:168:12: note: candidate: Gtk::Image::Image(const Glib::ConstructParams&)
   explicit Image(const Glib::ConstructParams& construct_params);
            ^~~~~
/usr/include/gtkmm-3.0/gtkmm/image.h:168:12: note:   candidate expects 1 argument, 2 provided
/usr/include/gtkmm-3.0/gtkmm/image.h:152:3: note: candidate: Gtk::Image::Image(Gtk::Image&&)
   Image(Image&& src) noexcept;
   ^~~~~
/usr/include/gtkmm-3.0/gtkmm/image.h:152:3: note:   candidate expects 1 argument, 2 provided
src/gui/AchievementBoxRow.cpp: In constructor ‘AchievementBoxRow::AchievementBoxRow(const Achievement_t&)’:
src/gui/AchievementBoxRow.cpp:38:116: error: void value not ignored as it ought to be
 :make_managed<Gtk::Image>("gtk-about", Gtk::BuiltinIconSize::ICON_SIZE_BUTTON);
                                                                              ^
Makefile:28: recipe for target 'obj/src/gui/AchievementBoxRow.o' failed
make: *** [obj/src/gui/AchievementBoxRow.o] Error 1

This is what comes up. Before this, I encountered another error:

src/gui/AppBoxRow.cpp: In constructor ‘AppBoxRow::AppBoxRow(const Game_t&)’:
src/gui/AppBoxRow.cpp:14:29: error: ‘make_managed’ is not a member of ‘Gtk’
     Gtk::Box* layout = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::ORIENTATION_HORIZONTAL, 0);
                             ^~~~~~~~~~~~
src/gui/AppBoxRow.cpp:14:29: note: suggested alternative: ‘manage’
     Gtk::Box* layout = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::ORIENTATION_HORIZONTAL, 0);
                             ^~~~~~~~~~~~
                             manage
src/gui/AppBoxRow.cpp:14:50: error: expected primary-expression before ‘>’ token
     Gtk::Box* layout = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::ORIENTATION_HORIZONTAL, 0);
                                                  ^
src/gui/AppBoxRow.cpp:14:94: warning: left operand of comma operator has no effect [-Wunused-value]
 out = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::ORIENTATION_HORIZONTAL, 0);
                                                                             ^
src/gui/AppBoxRow.cpp:15:30: error: ‘make_managed’ is not a member of ‘Gtk’
     Gtk::Label* label = Gtk::make_managed<Gtk::Label>(app.app_name);
                              ^~~~~~~~~~~~
src/gui/AppBoxRow.cpp:15:30: note: suggested alternative: ‘manage’
     Gtk::Label* label = Gtk::make_managed<Gtk::Label>(app.app_name);
                              ^~~~~~~~~~~~
                              manage
src/gui/AppBoxRow.cpp:15:53: error: expected primary-expression before ‘>’ token
     Gtk::Label* label = Gtk::make_managed<Gtk::Label>(app.app_name);
                                                     ^
src/gui/AppBoxRow.cpp:16:30: error: ‘make_managed’ is not a member of ‘Gtk’
     Gtk::Arrow* arrow = Gtk::make_managed<Gtk::Arrow>(Gtk::ArrowType::ARROW_RIGHT, Gtk::ShadowType::SHADOW_OUT);
                              ^~~~~~~~~~~~
src/gui/AppBoxRow.cpp:16:30: note: suggested alternative: ‘manage’
     Gtk::Arrow* arrow = Gtk::make_managed<Gtk::Arrow>(Gtk::ArrowType::ARROW_RIGHT, Gtk::ShadowType::SHADOW_OUT);
                              ^~~~~~~~~~~~
                              manage
src/gui/AppBoxRow.cpp:16:53: error: expected primary-expression before ‘>’ token
     Gtk::Arrow* arrow = Gtk::make_managed<Gtk::Arrow>(Gtk::ArrowType::ARROW_RIGHT, Gtk::ShadowType::SHADOW_OUT);
                                                     ^
src/gui/AppBoxRow.cpp:16:101: warning: left operand of comma operator has no effect [-Wunused-value]
 e_managed<Gtk::Arrow>(Gtk::ArrowType::ARROW_RIGHT, Gtk::ShadowType::SHADOW_OUT);
                                                                     ^~~~~~~~~~
Makefile:28: recipe for target 'obj/src/gui/AppBoxRow.o' failed
make: *** [obj/src/gui/AppBoxRow.o] Error 1

This I solved with the help of this StackOverflow thread.

PS: I tried using the AppImage provided in Releases but for some reason it doesn't do anything.

PaulCombal commented 4 years ago

Hello, as stated in the Readme, the intructions are only operational for Ubuntu 19.04 and above. Glad you found a workaround!

Shov96 commented 4 years ago

Is there any way to make it operational in older distros? Will the AppImage also not run on my current system?

wgpierce commented 4 years ago

Hmm, at least it's only a name change to the API that's preventing this from building. I'll do some testing in the coming days on older distros and see what I can do.

PaulCombal commented 4 years ago

@wgpierce If you want to make a valid appimage for 18.04, you have to use @Shov96 's workaround on Ubuntu 18.04, and compile it there. It would work because 18.04's glib is ancient as fuck so it causes problems, all rolling release distros have an updated version.

wgpierce commented 4 years ago

Sorry for the delay. I've created an appimage for 18.04 in releases with the hacks needed for that platform.

Shov96 commented 4 years ago

Its working, but just to be thorough -

Thanks a lot for your awesome work! :smile:

wgpierce commented 4 years ago

Seems to work fine for me on fully updated Ubuntu 18.04. All the icons are being downloaded asynchronously, so it may take a little while for all of them to show up.

Unfortunately issues specific to 18.04 and especially older distros won't get much attention, but if there are other issues with the SamRewritten itself, feel free to file more issues with logs!

wgpierce commented 4 years ago

If you're still on Ubuntu 18.04, the latest master includes commits 082ad7f1182e9a8e3ae9d90d82267b6f33f9b658 and 7358596158221af89b19f89f25d4ee8b4e8ecfb1 to fix these problems and enable building.