PaulCombal / SamRewritten

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

Unable to build #98

Closed telometto closed 2 years ago

telometto commented 2 years ago

Hi.

I am getting the following error when building:

Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gtk+-3.0', required by 'gtkmm-3.0', not found
Package 'gtk+-unix-print-3.0', required by 'gtkmm-3.0', not found
Package 'gtk+-3.0', required by 'gdkmm-3.0', not found
g++ -std=c++17 -c -o obj/src/controller/SteamAppDAO.o src/controller/SteamAppDAO.cpp -L/home/myuser/Documents/from_git/samrewritten/bin  -Wall -lsteam_api -lcurl -lyajl -ldl
In file included from src/controller/../gui/ListBoxRowWithIcon.h:4,
                 from src/controller/../gui/AchievementBoxRow.h:5,
                 from src/controller/../gui/MainPickerWindow.h:5,
                 from src/controller/SteamAppDAO.cpp:6:
/usr/include/gtkmm-3.0/gtkmm/listboxrow.h:6:10: fatal error: glibmm/ustring.h: No such file or directory
    6 | #include <glibmm/ustring.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:45: obj/src/controller/SteamAppDAO.o] Error 1

I have installed all the dependencies mentioned in the README.md and used export PKG_CONFIG_PATH=/usr/bin/pkgconf to point to the pkgconf file but to no avail.

I am using Fedora 34.

EDIT: also worth mentioning that the AppImage doesn't work, either.

PaulCombal commented 2 years ago

Really weird, are you sure your GTK 3 install is correct? Is the package gtk+-3.0 installed on your machine?

If you run the AppImage from the console, does it give any output?

telometto commented 2 years ago

Thanks for the answer. It gives the following output:

(samrewritten:18793): GLib-GIO-ERROR **: 10:26:56.482: Settings schema 'org.gnome.settings-daemon.plugins.xsettings' does not contain a key named 'antialiasing'
/tmp/.mount_SamRewTsP3uc/AppRun: line 8: 18793 Trace/breakpoint trap   (core dumped) ${SCRIPT_PATH}/samrewritten $@

It looks like a glib error, but I do have all the required packages installed.

PaulCombal commented 2 years ago

From what I can find, the AppImage must be rebuilt with a newer version, so that's on the repo maintainer's end (me, but not anytime soon).

Regarding the building issue, did you try: sudo dnf install gtk3-devel ?

telometto commented 2 years ago

Finally got it to work! Sorry for the late reply and thanks for the help, but the issue was pretty simple: adding export PKG_CONFIG_PATH=/usr/bin/pkgconf wasn't enough apparently, so I had to enter export PKG_CONFIG_PATH=/usr/bin/pkgconf:/usr/lib/pkgconfig instead.

Hope this helps people in the future, too!

MW2K commented 2 years ago

Sorry to add to a closed issue but I'm having the exact same drama, except I'm on Fedora 35 - tried telometto's fix but that didn't work for me.

/usr/bin/ld: skipping incompatible /usr/lib/libgtk-3.so when searching for -lgtk-3 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/11/../../../libgtk-3.so when searching for -lgtk-3 /usr/bin/ld: skipping incompatible /lib/libgtk-3.so when searching for -lgtk-3 /usr/bin/ld: skipping incompatible /usr/lib/libgtk-3.so when searching for -lgtk-3 /usr/bin/ld: cannot find -lgtk-3 /usr/bin/ld: skipping incompatible /usr/lib/libgtk-3.so when searching for -lgtk-3 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/11/../../../libgtk-3.so when searching for -lgtk-3 /usr/bin/ld: skipping incompatible /lib/libgtk-3.so when searching for -lgtk-3 /usr/bin/ld: skipping incompatible /usr/lib/libgtk-3.so when searching for -lgtk-3 /usr/bin/ld: skipping incompatible /usr/lib/libgdk-3.so when searching for -lgdk-3 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/11/../../../libgdk-3.so when searching for -lgdk-3 /usr/bin/ld: skipping incompatible /lib/libgdk-3.so when searching for -lgdk-3 /usr/bin/ld: skipping incompatible /usr/lib/libgdk-3.so when searching for -lgdk-3 /usr/bin/ld: cannot find -lgdk-3 /usr/bin/ld: skipping incompatible /usr/lib/libgdk-3.so when searching for -lgdk-3 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/11/../../../libgdk-3.so when searching for -lgdk-3 /usr/bin/ld: skipping incompatible /lib/libgdk-3.so when searching for -lgdk-3 /usr/bin/ld: skipping incompatible /usr/lib/libgdk-3.so when searching for -lgdk-3 /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz /usr/bin/ld: skipping incompatible /usr/lib/libgio-2.0.so when searching for -lgio-2.0 /usr/bin/ld: skipping incompatible /usr/lib/libgobject-2.0.so when searching for -lgobject-2.0 /usr/bin/ld: skipping incompatible /usr/lib/libglib-2.0.so when searching for -lglib-2.0 /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm collect2: error: ld returned 1 exit status

Doing some googling suggests a 32-bit and a 64-bit disconnect - dumb question but is SamRewritten 32-bit?

PaulCombal commented 2 years ago

Hi, as far as I know I didn't tweak my configuration too much, so it should default to 64 bits. I have no clue if this changes anything at all, I didn't fiddle with this too much. From what I can gather from your trace, I guess it has something to do with your GTK/GDK install and maybe pkg-config stuff. As noted in the milestones the next big step regarding the build chain would be to use conan or vcpkg to avoid this kind of cross-distro issues, so that is what I should focus on next time I work on this project. Feel free to make a PR and/or ask for help if you want to contribute to this btw!