Writing this down because it took me way too long to realise what I was missing.
If you’re getting the error “Operation Not Supported” when calling gtk_show_uri() or g_app_info_launch_default_for_uri(), then you’re most likely missing gvfs, which contains the extension points for all non-file:// URI schemas.
Now here’s the bit I forgot… gvfs has to be installed in the same prefix as glib. So if it works for your system GLib, but not for the one you built in some prefix, you probably forgot to build and install gvfs in that prefix.