Emacs 29.1 with gtk_progress_get_type undefined symbol

hi

I source-installed emacs 29.1 with “–with-x-toolkit=gtk3” on almalinux 9.6.

I use emacs to open file ,it tells:
gtk_progress_get_type undefined symbol
along with:

I read of that gtk_progress_get_type is from GTK2,but I have no GTK2 installed.

the libgvfsdbus.so really has no g_module_load but g_io_module_load as following:

then,where does g_module_load come from?

Thanks

Hello,

You can check if Emacs is loading any GTK2 libraries by running:

ldd $(which emacs) | egrep ‘gtk|gdk|gvfs|pango|cairo|atk|pixbuf|glib|X11|SM|ICE’
If you see any lines containing libgtk-x11-2.0.so or libgdk-x11-2.0.so, Emacs is linked against GTK2 libraries.
If you see only libgtk-3.so and libgdk-3.so, then it’s using GTK3 as intended.

Good luck!


hi it reports above

BR

hi

I remove the emacs 27.2 which built-in-os and now the emacs reports following with LD_DEBUG=libs

Hello

Your Emacs binary is correctly linked with GTK3 only, so there should be no issue with Emacs itself.
However, some of the runtime modules (.so files under /usr/lib64/gio/modules/ and /usr/lib64/gdk-pixbuf-2.0.0/loaders/) may still depend on old GTK2 or GLib symbols, which can cause these errors.

Please try reinstalling or updating the related packages (such as dconf, gdk-pixbuf2, glib2).
Alternatively, you can temporarily move the relevant .so files out of those directories to see if the errors disappear.

If the situation does not improve, you can also check which package each .so file comes from by running rpm -qf .

Good luck

I mv the three .so to tmp-.so and emacs reports only:
emacs: error: symbol lookup error: undefined symbol: gtk_progress_get_type.
other errors disappear.
After reinstall dconf/glib2/gdk-pixbuf2 and the emacs met the same errors as before.


Are these packages the latest for AL 9.6?

Hi, this is my environment. I think the package is the latest version.

[redadmin@www ~]$ ssh alma9
Last login: Mon Aug 4 12:07:07 2025 from 192.168.11.50

[redadmin@alma9 ~]$ rpm -qa |grep glib2
glib2-2.68.4-16.el9_6.2.x86_64
glib2-devel-2.68.4-16.el9_6.2.x86_64

[redadmin@alma9 ~]$ rpm -qa |grep dconf
dconf-0.40.0-6.el9.x86_64

[redadmin@alma9 ~]$ rpm -qa |grep gdk
gdk-pixbuf2-2.42.6-4.el9_4.x86_64
gdk-pixbuf2-modules-2.42.6-4.el9_4.x86_64

[redadmin@alma9 ~]$ sudo yum update
Last metadata expiration check: 0:24:22 ago on Wed Aug 6 17:49:24 2025.
Dependencies resolved.

Package Architecture Version Repository Size

Upgrading:
python3-requests noarch 2.25.1-10.el9_6 baseos 115 k

Transaction Summary

Upgrade 1 Package

Total download size: 115 k
Is this ok [y/N]: y
Downloading Packages:
python3-requests-2.25.1-10.el9_6.noarch.rpm 272 kB/s | 115 kB 00:00

Total 87 kB/s | 115 kB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Upgrading : python3-requests-2.25.1-10.el9_6.noarch 1/2
Cleanup : python3-requests-2.25.1-9.el9.noarch 2/2
Running scriptlet: python3-requests-2.25.1-9.el9.noarch 2/2
Verifying : python3-requests-2.25.1-10.el9_6.noarch 1/2
Verifying : python3-requests-2.25.1-9.el9.noarch 2/2

Upgraded:
python3-requests-2.25.1-10.el9_6.noarch

Complete!
[redadmin@alma9 ~]$

When you move those .so files, only the gtk_progress_get_type error remains, so these modules are the cause.

Reinstalling dconf, glib2, and gdk-pixbuf2 brings the errors back, which means your system is still installing incompatible or broken .so files.

Try this:

Check which packages own the problematic .so files:

rpm -qf /usr/lib64/gio/modules/libdconfsettings.so
Make sure you don’t have mixed or old packages.

Run:

sudo gio-querymodules /usr/lib64/gio/modules/
sudo gdk-pixbuf-query-loaders --update-cache

If the problem continues, you may have incompatible libraries or a broken environment.

GoodLuck!

Hi @rbhuang!

Ensure Emacs is compiled against the exact versions of GTK+3 and related libraries installed on your system. Missing or mismatched development packages can cause symbol resolution errors.

sudo dnf install gtk3-devel glib2-devel pango-devel atk-devel cairo-devel gdk-pixbuf-devel libX11-devel libSM-devel libICE-devel
cd emacs-source-directory
make clean
./configure --prefix=/usr/local --with-x-toolkit=gtk3
make && sudo make install

All the best! :v:

hi all
I try the steps you suggested and got the same as before.
Will you take a try emacs with LD_DEBUG=libs to see what will report?
Since on centos7,I also met these undefined symbols.Even with the undefined symbols,the emacs GUI can be opened and seems work correctly.

I add as:

and ldconfig shows:

and emacs still reports:

there is one more .xfce4 4.18.3 is used.Does it matter ?

I am not sure that the gio cache is correct or not:

after :gio-querymodules /usr/lib64/gio/modules/

Hi

Try these steps:

Update packages

sudo yum update glib2 gvfs gdk-pixbuf2 emacs
(If you use dnf, use dnf instead of yum)

Regenerate giomodule.cache

sudo gio-querymodules /usr/lib64/gio/modules/
Reinstall Emacs

sudo yum reinstall emacs

Check for old .so files

Look in /usr/local/lib64 for old .so files.

If you find any, delete or rename them.

Good luck!!

glib2 gvfs gdk-pixbuf2 are all the latest.

Regenerate giomodule.cache。。。。。。。。。。。。done

Reinstall Emacs with source。。。。。。。。。。。。。done

Check for old .so files。。。。。。。。。。no any old .so file

How to identify the .so is old or not?

Hello
Pls Try these extra checks:

Check if your modules are linked to libgmodule-2.0.so.0
Run:

ldd /usr/lib64/gio/modules/libgvfsdbus.so | grep gmodule
ldd /usr/lib64/gio/modules/libconfsettings.so | grep gmodule
ldd /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so | grep gmodule

You should see something like:
libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0

Try reinstalling glib2:

sudo yum reinstall glib2

Check which libraries Emacs actually loads:

LD_DEBUG=libs emacs
Look for any “not found” or unexpected paths.

Double-check Emacs build options:
If you built Emacs from source, be sure it’s using the correct GTK and GLib libraries.

If these all look fine, please post your ldd results for the affected .so files and any unusual output from LD_DEBUG=libs emacs.

I’m sorry. I overlooked this question.

How to identify the .so is old or not?

To check if a .so file is old or mismatched, try these:

Check which package the .so belongs to and its version:

rpm -qf /usr/lib64/gio/modules/libgvfsdbus.so
rpm -qf /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
This will show the package and its version.

Check the timestamp:

ls -l /usr/lib64/gio/modules/libgvfsdbus.so

List all related installed packages:

rpm -qa | grep gvfs
rpm -qa | grep gdk-pixbuf
If the .so file is not from the latest package, or if its timestamp is very old compared to others, it may be outdated.

there is one mentioned。In gdb, command
“info sharedlibrary” shows all .so like following:

the 9.6 is updated from 9.0.So maybe GTK2 remains some thing there.
The most simple way,I think , is to reinstall the 9.6 iso.Thanks

Hello

Check if any GTK2 remnants exist

rpm -qa | grep -E ‘^gtk2’
find /usr/lib64 -type f -name ‘libgtk-x11-2.0*.so*’

Identify which .so file references gtk_progress_get_type

grep -R “gtk_progress_get_type” /usr/lib64 2>/dev/null

Clear and regenerate old caches

sudo gdk-pixbuf-query-loaders --update-cache
sudo gio-querymodules /usr/lib64/gio/modules/
sudo ldconfig

Start Emacs with modules disabled (if this works, the issue is with the modules)

env GIO_MODULE_DIR= GDK_PIXBUF_MODULE_FILE=/dev/null emacs -Q

GoodLuck!!

this is report disbale gio/pixbuf.