[Pkg-swan-devel] Bug#1020495: Bug#1020495: Error: unable to load VPN connection editor - on Identity tab at Gnome Network manager VPN
Tobias Brunner
tobias at strongswan.org
Thu Sep 22 17:51:51 BST 2022
>> That's because the settings app uses GTK 4, while `nm-connection-editor`
>> still uses GTK 3. In order for the strongSwan plugin to work with GTK
>> 4, it has to be built with `--with-gkt4`. That creates an additional
>> version of the editor that's linked against GTK 4 (besides the one
>> linked against GTK 3). These are actually two shared libraries that are
>> loaded dynamically at runtime by the main editor plugin depending on
>> whether it's loaded by a GTK 3 or 4 application.
>
> Ah, thanks for the information. So that means at some point we should enable
> that in our build I guess.
Yep. Is it a problem if the package depends on both libgtk-3-0 and
libgtk-4-0 as well as libnma0 and libnma-gtk4-0? Or does that require a
separate package for the GTK 4 version? Or is there some metadata magic
that can make it work with GTK 3 and/or GTK 4 (at least one, but does
not require both)?
Technically, as I mentioned before, the main plugin
(libnm-vpn-plugin-strongswan.so), that's the one actually loaded by NM
or any other GUI, does not depend on libgtk or libnma. However,
depending on whether it was loaded by an application that uses GTK 3 or
GTK 4 (it uses dlsym() to search for a GTK3-only symbol), it then
dynamically loads either libnm-vpn-plugin-strongswan-editor.so or
libnm-gtk4-vpn-plugin-strongswan-editor.so via dlopen(), which are
linked against the corresponding libgtk/libnma. So I guess one could
argue that neither is a hard dependency for the package as the
application that loads the plugin must have such a dependency on either
version of these libraries anyway (at least libgtk, not sure about
libnma). So maybe those dependencies could also be omitted?
Regards,
Tobias
More information about the Pkg-swan-devel
mailing list