Package 'gtk+-3.0', required by 'gtkmm-3.0', not found

I’m trying to compile a GTK3 app and I’m getting this every time I run make.
Package 'gtk+-3.0', required by 'gtkmm-3.0', not found

I have gtk3+ and gtk3-devel installed. What else do I need, or what am I missing/haven’t done?

Googling for this tells me to install gtk3± and/or gtk3-devel which according to my system, I already have.

Welcome to :fedora:

What app?
Is it possibly available for direct install instead of compiling?
What other messages may be given?
I assume you have a fully updated system but some don’t so is it updated?
More details are helpful.

It’s this GitHub - PaulCombal/SamRewritten: Steam Achievement Manager For Linux. Rewritten in C++.

It’s available as an AppImage but it has bugs and won’t run - the author of it suggests compiling it.

Yes, this is a fresh install of Fedora 35, with all updates installed.

Error message when I run make

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
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++ -c -o obj/src/controller/SteamAppDAO.o src/controller/SteamAppDAO.cpp -std=c++17  -Wall
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:51: obj/src/controller/SteamAppDAO.o] Error 1

Edit: OK, so it’s a path issue - I did export PKG_CONFIG_PATH=/usr/lib/pkgconfig and compilation went well for a while then bombed out with this:

/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

No idea what’s happening here.

Found a github closed issue here Unable to build · Issue #98 · PaulCombal/SamRewritten · GitHub but the guy’s workaround didn’t work for me.

Edit: the app maintainer claims it isn’t an architecture issue but the GTK/GDK setup…I’m still lost, so any help offered is great.

I was able to successfully compile it on my Fedora 35 laptop without exporting PKG_CONFIG_PATH. Perhaps export PKG_CONFIG_PATH=/usr/lib/pkgconfig not having lib64 is a problem.

My default setting for this is as follows:

$ pkg-config --variable pc_path pkg-config
/usr/lib64/pkgconfig:/usr/share/pkgconfig

When I execute ldd on the resulting executable, it shows that it requires libraries located under /usr/lib64.

Summary
$ ldd SamRewritten/bin/samrewritten
	linux-vdso.so.1 (0x00007ffcb7f04000)
	libgtkmm-3.0.so.1 => /lib64/libgtkmm-3.0.so.1 (0x00007fb716b5f000)
	libatkmm-1.6.so.1 => /lib64/libatkmm-1.6.so.1 (0x00007fb716b0b000)
	libgdkmm-3.0.so.1 => /lib64/libgdkmm-3.0.so.1 (0x00007fb716aaf000)
	libgiomm-2.4.so.1 => /lib64/libgiomm-2.4.so.1 (0x00007fb7168ca000)
	libgtk-3.so.0 => /lib64/libgtk-3.so.0 (0x00007fb7160b3000)
	libgdk-3.so.0 => /lib64/libgdk-3.so.0 (0x00007fb715fad000)
	libz.so.1 => /lib64/libz.so.1 (0x00007fb715f91000)
	libatk-1.0.so.0 => /lib64/libatk-1.0.so.0 (0x00007fb715f67000)
	libcairo-gobject.so.2 => /lib64/libcairo-gobject.so.2 (0x00007fb715f5b000)
	libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00007fb715d81000)
	libpangomm-1.4.so.1 => /lib64/libpangomm-1.4.so.1 (0x00007fb715d4b000)
	libglibmm-2.4.so.1 => /lib64/libglibmm-2.4.so.1 (0x00007fb715cb9000)
	libcairomm-1.0.so.1 => /lib64/libcairomm-1.0.so.1 (0x00007fb715c8a000)
	libsigc-2.0.so.0 => /lib64/libsigc-2.0.so.0 (0x00007fb715c81000)
	libpangocairo-1.0.so.0 => /lib64/libpangocairo-1.0.so.0 (0x00007fb715c6f000)
	libpango-1.0.so.0 => /lib64/libpango-1.0.so.0 (0x00007fb715c08000)
	libharfbuzz.so.0 => /lib64/libharfbuzz.so.0 (0x00007fb715b31000)
	libcairo.so.2 => /lib64/libcairo.so.2 (0x00007fb715a15000)
	libgdk_pixbuf-2.0.so.0 => /lib64/libgdk_pixbuf-2.0.so.0 (0x00007fb7159e3000)
	libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007fb715987000)
	libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007fb71584c000)
	libsteam_api.so (0x00007fb7155e2000)
	libcurl.so.4 => /lib64/libcurl.so.4 (0x00007fb71553d000)
	libyajl.so.2 => /lib64/libyajl.so.2 (0x00007fb715531000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fb715310000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fb715234000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fb715219000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fb71500f000)
	libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007fb715008000)
	libpangoft2-1.0.so.0 => /lib64/libpangoft2-1.0.so.0 (0x00007fb714feb000)
	libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007fb714f9c000)
	libfribidi.so.0 => /lib64/libfribidi.so.0 (0x00007fb714f7c000)
	libepoxy.so.0 => /lib64/libepoxy.so.0 (0x00007fb714e47000)
	libXi.so.6 => /lib64/libXi.so.6 (0x00007fb714e35000)
	libX11.so.6 => /lib64/libX11.so.6 (0x00007fb714ced000)
	libatk-bridge-2.0.so.0 => /lib64/libatk-bridge-2.0.so.0 (0x00007fb714cb2000)
	libcloudproviders.so.0 => /lib64/libcloudproviders.so.0 (0x00007fb714c98000)
	libtracker-sparql-3.0.so.0 => /lib64/libtracker-sparql-3.0.so.0 (0x00007fb714bd3000)
	libwayland-client.so.0 => /lib64/libwayland-client.so.0 (0x00007fb714bc2000)
	libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007fb714bb9000)
	libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007fb714b70000)
	libwayland-cursor.so.0 => /lib64/libwayland-cursor.so.0 (0x00007fb714b64000)
	libwayland-egl.so.1 => /lib64/libwayland-egl.so.1 (0x00007fb714b5f000)
	libXext.so.6 => /lib64/libXext.so.6 (0x00007fb714b4a000)
	libXcursor.so.1 => /lib64/libXcursor.so.1 (0x00007fb714b3d000)
	libXdamage.so.1 => /lib64/libXdamage.so.1 (0x00007fb714b38000)
	libXcomposite.so.1 => /lib64/libXcomposite.so.1 (0x00007fb714b33000)
	libXrandr.so.2 => /lib64/libXrandr.so.2 (0x00007fb714b24000)
	libXinerama.so.1 => /lib64/libXinerama.so.1 (0x00007fb714b1f000)
	libpixman-1.so.0 => /lib64/libpixman-1.so.0 (0x00007fb714a73000)
	libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007fb7149a8000)
	libpng16.so.16 => /lib64/libpng16.so.16 (0x00007fb71496f000)
	libxcb-shm.so.0 => /lib64/libxcb-shm.so.0 (0x00007fb714968000)
	libxcb.so.1 => /lib64/libxcb.so.1 (0x00007fb71493d000)
	libxcb-render.so.0 => /lib64/libxcb-render.so.0 (0x00007fb71492d000)
	libXrender.so.1 => /lib64/libXrender.so.1 (0x00007fb714920000)
	libmount.so.1 => /lib64/libmount.so.1 (0x00007fb7148db000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fb7148b0000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fb716ff2000)
	libthai.so.0 => /lib64/libthai.so.0 (0x00007fb7148a3000)
	libgraphite2.so.3 => /lib64/libgraphite2.so.3 (0x00007fb714882000)
	libjpeg.so.62 => /lib64/libjpeg.so.62 (0x00007fb714800000)
	libffi.so.6 => /lib64/libffi.so.6 (0x00007fb7147f5000)
	libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fb71477d000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fb714776000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb714771000)
	libnghttp2.so.14 => /lib64/libnghttp2.so.14 (0x00007fb714749000)
	libidn2.so.0 => /lib64/libidn2.so.0 (0x00007fb714728000)
	libssh.so.4 => /lib64/libssh.so.4 (0x00007fb7146b9000)
	libpsl.so.5 => /lib64/libpsl.so.5 (0x00007fb7146a5000)
	libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007fb714606000)
	libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007fb714318000)
	libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fb7142c1000)
	libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fb7141e3000)
	libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fb7141cb000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fb7141c4000)
	libldap_r-2.4.so.2 => /lib64/libldap_r-2.4.so.2 (0x00007fb714166000)
	liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007fb714153000)
	libbrotlidec.so.1 => /lib64/libbrotlidec.so.1 (0x00007fb714145000)
	libxml2.so.2 => /lib64/libxml2.so.2 (0x00007fb713fbb000)
	libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x00007fb713f69000)
	libatspi.so.0 => /lib64/libatspi.so.0 (0x00007fb713f2a000)
	libstemmer.so.0 => /lib64/libstemmer.so.0 (0x00007fb713ed5000)
	libicuuc.so.69 => /lib64/libicuuc.so.69 (0x00007fb713ce1000)
	libicui18n.so.69 => /lib64/libicui18n.so.69 (0x00007fb7139b6000)
	libsqlite3.so.0 => /lib64/libsqlite3.so.0 (0x00007fb713878000)
	libjson-glib-1.0.so.0 => /lib64/libjson-glib-1.0.so.0 (0x00007fb71384b000)
	libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fb713836000)
	libXau.so.6 => /lib64/libXau.so.6 (0x00007fb713830000)
	libblkid.so.1 => /lib64/libblkid.so.1 (0x00007fb7137f8000)
	libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fb713761000)
	libdatrie.so.1 => /lib64/libdatrie.so.1 (0x00007fb713758000)
	libunistring.so.2 => /lib64/libunistring.so.2 (0x00007fb7135d1000)
	libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fb7135c0000)
	libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fb7135b9000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fb7135a5000)
	libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007fb713585000)
	libbrotlicommon.so.1 => /lib64/libbrotlicommon.so.1 (0x00007fb713560000)
	liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fb713534000)
	libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007fb713462000)
	libicudata.so.69 => /lib64/libicudata.so.69 (0x00007fb711907000)
	libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007fb7118cd000)
	libzstd.so.1 => /lib64/libzstd.so.1 (0x00007fb71181c000)
	liblz4.so.1 => /lib64/liblz4.so.1 (0x00007fb7117f8000)
	libcap.so.2 => /lib64/libcap.so.2 (0x00007fb7117ee000)
	libgcrypt.so.20 => /lib64/libgcrypt.so.20 (0x00007fb7116b2000)
	libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007fb71168c000)

This text will be hidden

From your output it looks like the loader is trying to load libraries from /usr/lib which is where 32bit libraries are stored.

Are you running a 32 bit i686 version of Fedora? What is the output of uname --processor?

If you are running a x86_64 architecture, check that you didn’t accidentally install some i686 versions of some of the prerequisite packages. Or, maybe you set LD_LIBRARY_PATH? If so, try unsetting it.

1 Like

Hello, I decided to give it try on “Fedora 36” system without ANY extra changes “like set PATH config or pkgconfig changes” I tried with based instruction on README and able to run without any issue.

Here is my how-to basically;

git clone https://github.com/PaulCombal/SamRewritten.git
sudo dnf install gtkmm30 gtkmm30-devel yajl-devel curl-devel g++
make
cd /bin/
{I opened steam because it is asking for it }
./launch.bin

That’s all. Are you sure did you install everything correctly ?

I was able to compile from source fairly easy.

1 Like

Already installed.

[peter@gothica ~]$ sudo dnf install gtkmm30 gtkmm30-devel yajl-devel curl-devel g++
make
[sudo] password for peter: 
Last metadata expiration check: 2:37:52 ago on Thu 14 Apr 2022 07:32:41.
Package gtkmm30-3.24.5-2.fc35.x86_64 is already installed.
Package gtkmm30-devel-3.24.5-2.fc35.x86_64 is already installed.
Package yajl-devel-2.1.0-17.fc35.x86_64 is already installed.
Package libcurl-devel-7.79.1-1.fc35.x86_64 is already installed.
Package gcc-c++-11.2.1-9.fc35.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete! 

@robin217

[peter@gothica ~]$ uname --processor
x86_64

I do have 32-bit libraries of stuff installed simply as Steam et al, requires them. Steam is a 32-bit app as are a lot of games and their libraries.

And for your pkg-config command

pkg-config --variable pc_path pkg-config /usr/lib64/pkgconfig:/usr/share/pkgconfig
bash: /usr/lib64/pkgconfig:/usr/share/pkgconfig: No such file or directory

pkgconfig exists in both places, so is it the way I’ve formatted the command?
Edit: it is - my bad. The command works if I put a space between the paths not a colon.

1 Like