ohwgiles / NetworkManager-f5vpn

NetworkManager plugin for accessing F5 SSL VPNs
7 stars 1 forks source link

build error on Ubuntu 20.04.3 LTS #10

Closed jorgheymans closed 3 years ago

jorgheymans commented 3 years ago

Following the build instructions i am getting this:

~/tmp/NetworkManager-f5vpn (master)> make
[  4%] Building C object CMakeFiles/glib_curl.dir/lib/glib_curl.c.o
[  9%] Linking C static library libglib_curl.a
[  9%] Built target glib_curl
[ 14%] Building C object CMakeFiles/f5vpn_auth.dir/lib/f5vpn_auth.c.o
[ 19%] Linking C static library libf5vpn_auth.a
[ 19%] Built target f5vpn_auth
[ 23%] Building C object CMakeFiles/f5vpn_connect.dir/lib/f5vpn_connect.c.o
[ 28%] Linking C static library libf5vpn_connect.a
[ 28%] Built target f5vpn_connect
[ 33%] Building C object CMakeFiles/f5vpn_getsid.dir/lib/f5vpn_getsid.c.o
[ 38%] Linking C static library libf5vpn_getsid.a
[ 38%] Built target f5vpn_getsid
[ 42%] Building C object CMakeFiles/pppd-plugin-f5vpn.dir/pppd/pppd-f5-vpn.c.o
[ 47%] Linking C shared library libpppd-plugin-f5vpn.so
[ 47%] Built target pppd-plugin-f5vpn
[ 52%] Building C object CMakeFiles/nm-f5vpn-auth-dialog.dir/auth-dialog/native-auth.c.o
[ 57%] Building C object CMakeFiles/nm-f5vpn-auth-dialog.dir/auth-dialog/browser-auth.c.o
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/browser-auth.c: In function ‘browser_auth_begin’:
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/browser-auth.c:122:42: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘gpointer’ {aka ‘void *’} [-Wformat=]
  122 |   char *url = g_strdup_printf ("https://%s", g_hash_table_lookup (auth->vpn_opts, "hostname"));
      |                                         ~^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          |   |
      |                                          |   gpointer {aka void *}
      |                                          char *
      |                                         %p
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/browser-auth.c:131:77: warning: format ‘%s’ expects argument of type ‘char *’, but argument 6 has type ‘gpointer’ {aka ‘void *’} [-Wformat=]
  131 |                                              "Launching \"xdg-open https://%s\".\n\n"
      |                                                                            ~^
      |                                                                             |
      |                                                                             char *
      |                                                                            %p
......
  136 |                                              g_hash_table_lookup (auth->vpn_opts, "hostname"));
      |                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                              |
      |                                              gpointer {aka void *}
[ 61%] Building C object CMakeFiles/nm-f5vpn-auth-dialog.dir/auth-dialog/main.c.o
[ 66%] Linking C executable nm-f5vpn-auth-dialog
[ 66%] Built target nm-f5vpn-auth-dialog
[ 71%] Building C object CMakeFiles/nm-f5vpn-xdg-helper.dir/auth-dialog/xdg-helper.c.o
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/xdg-helper.c: In function ‘parse_uri’:
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/xdg-helper.c:33:6: warning: implicit declaration of function ‘g_uri_split’ [-Wimplicit-function-declaration]
   33 |  if (g_uri_split (uri, G_URI_FLAGS_NONE, &scheme, NULL, NULL, NULL, NULL, &query, NULL, err) == FALSE) {
      |      ^~~~~~~~~~~
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/xdg-helper.c:33:24: error: ‘G_URI_FLAGS_NONE’ undeclared (first use in this function); did you mean ‘G_RESOURCE_FLAGS_NONE’?
   33 |  if (g_uri_split (uri, G_URI_FLAGS_NONE, &scheme, NULL, NULL, NULL, NULL, &query, NULL, err) == FALSE) {
      |                        ^~~~~~~~~~~~~~~~
      |                        G_RESOURCE_FLAGS_NONE
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/xdg-helper.c:33:24: note: each undeclared identifier is reported only once for each function it appears in
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/xdg-helper.c:47:2: error: unknown type name ‘GUriParamsIter’; did you mean ‘GParameter’?
   47 |  GUriParamsIter iter;
      |  ^~~~~~~~~~~~~~
      |  GParameter
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/xdg-helper.c:51:2: warning: implicit declaration of function ‘g_uri_params_iter_init’; did you mean ‘g_variant_iter_init’? [-Wimplicit-function-declaration]
   51 |  g_uri_params_iter_init (&iter, query, -1, "&", G_URI_PARAMS_NONE);
      |  ^~~~~~~~~~~~~~~~~~~~~~
      |  g_variant_iter_init
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/xdg-helper.c:51:49: error: ‘G_URI_PARAMS_NONE’ undeclared (first use in this function)
   51 |  g_uri_params_iter_init (&iter, query, -1, "&", G_URI_PARAMS_NONE);
      |                                                 ^~~~~~~~~~~~~~~~~
/home/dev/tmp/NetworkManager-f5vpn/auth-dialog/xdg-helper.c:52:9: warning: implicit declaration of function ‘g_uri_params_iter_next’; did you mean ‘g_variant_iter_next’? [-Wimplicit-function-declaration]
   52 |  while (g_uri_params_iter_next (&iter, &unowned_attr, &unowned_value, &local_err)) {
      |         ^~~~~~~~~~~~~~~~~~~~~~
      |         g_variant_iter_next
make[2]: *** [CMakeFiles/nm-f5vpn-xdg-helper.dir/build.make:63: CMakeFiles/nm-f5vpn-xdg-helper.dir/auth-dialog/xdg-helper.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:256: CMakeFiles/nm-f5vpn-xdg-helper.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
dev@bs ~/tmp/NetworkManager-f5vpn (master) [2]> ls -lrt
total 252
ohwgiles commented 3 years ago

Seems that most of the GUri functionality was introduced in glib 2.66, but Ubuntu 20.04 only has 2.64. I suggest using a newer OS. If that isn't an option, you could try backporting, or patching in an alternative implementation for the missing functionality.

karlitos commented 3 years ago

Hi Oliver,

I just run in the same issue on Ubuntu 20.04. Is there really nothing I can do to compile the f5vpn NetworkManager plugin ? 20.04. ist the last LTS Ubuntu version - and for this reason being used by thousands who like to benefit from the version LTS stability. I checked whether I can update _libglib to 2.66 but it does not seem possible :disappointed:

ohwgiles commented 3 years ago

Of course there is something you can do - replace the use of g_uri_split/g_uri_params with something else. I don't have any interest in supporting Ubuntu 20.04 myself, but am happy to collaborate with anyone who does.

karlitos commented 3 years ago

I'd love to try to get this plugin to work under Ubuntu 20.04, but will for sure need a guidance, since I am absolutely inexperienced in developing plugins for Network Manager. I have at least basic C/C++ coding knowledge. I will look for documentation of g_uri_split/g_uri_params to understand what they suppose to do.