GNOME Bugzilla – Bug 653558
Unable to connect to RDP or SSH
Last modified: 2011-12-03 08:20:02 UTC
I tried building Vinagre 3.1.2 for Ubuntu 11.10 development and things seem to work except that I am only given the option to connect to RDP or reverse RDP. librdp.so, libssh.so, and libvnc.so all are installed correctly to the /usr/lib/vinagre-3.0/plugins/ directory so it's not clear why it's not working.
Created attachment 190841 [details] buildlog
That build log appears to be for 3.0.1 and not 3.1.2. Also, I guess you mean that you are only given the option to connect to VNC and reverse VNC, and not RDP as you mentioned in the summary. An updated build log would be appreciated.
Created attachment 190847 [details] updated-buildlog
David, yes, sorry about the typos. I am given the option to connect to VNC & reverse VNC but not RDP or SSH.
Same has been observed on the openSUSE packages, base don vinagre 3.1.3 (build log can be seen at: https://build.opensuse.org/package/rawlog?arch=i586&package=vinagre&project=GNOME%3AFactory&repository=openSUSE_Factory ) The resulting RPMs do contain 'plugins' for the various connection types (rdp & ssh) but they are not available to create connections (also, 'old' booksmarks of this connection type disappeared). # The plugins do exist in the final packages > rpm -ql vinagre | grep plugin /usr/lib64/vinagre-3.0/plugins /usr/lib64/vinagre-3.0/plugins/librdp.so /usr/lib64/vinagre-3.0/plugins/libssh.so /usr/lib64/vinagre-3.0/plugins/libvnc.so There are a bunch of 'scary' warnings in the build log: libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./vinagre -I. -I./vinagre/view -DBINDIR=\"/usr/bin\" -DDATADIR=\"/usr/share\" -DPREFIX=\"/usr\" -DSYSCONFDIR=\"/etc\" -DLIBDIR=\"/usr/lib\" -DVINAGRE_DATADIR=\"/usr/share/vinagre\" -DPACKAGE_LOCALE_DIR=\"/usr/share/locale\" -DSSH_PROGRAM=\"ssh\" -pthread -DGSEAL_ENABLE -D_REENTRANT -DVTE_SEAL_ENABLE -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/gnome-keyring-1 -I/usr/include/libxml2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/telepathy-1.0 -I/usr/include/vte-2.90 -include config.h -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -MT vinagre/vinagre-debug.lo -MD -MP -MF vinagre/.deps/vinagre-debug.Tpo -c vinagre/vinagre-debug.c -fPIC -DPIC -o vinagre/.libs/vinagre-debug.o vinagre/vinagre-commands.c: In function 'vinagre_cmd_remote_open': vinagre/vinagre-commands.c:137:7: warning: implicit declaration of function 'vinagre_utils_show_error_dialog' [-Wimplicit-function-declaration] vinagre/vinagre-commands.c:172:7: warning: implicit declaration of function 'vinagre_utils_show_many_errors' [-Wimplicit-function-declaration] vinagre/vinagre-commands.c: In function 'vinagre_cmd_remote_vnc_listener': vinagre/vinagre-commands.c:209:5: warning: implicit declaration of function 'vinagre_reverse_vnc_listener_dialog_show' [-Wimplicit-function-declaration] vinagre/vinagre-commands.c: In function 'vinagre_cmd_view_show_toolbar': vinagre/vinagre-commands.c:235:3: warning: implicit declaration of function 'vinagre_utils_set_widget_visible' [-Wimplicit-function-declaration] vinagre/vinagre-commands.c: In function 'vinagre_cmd_help_contents': vinagre/vinagre-commands.c:322:3: warning: implicit declaration of function 'vinagre_utils_show_help' [-Wimplicit-function-declaration] vinagre/vinagre-commands.c: In function 'vinagre_cmd_help_about': vinagre/vinagre-commands.c:329:3: warning: implicit declaration of function 'vinagre_utils_show_help_about' [-Wimplicit-function-declaration] vinagre/vinagre-commands.c: In function 'vinagre_cmd_remote_open': and further down: vinagre/vinagre-utils.c: In function 'vinagre_utils_show_error_dialog': vinagre/vinagre-utils.c:154:3: warning: too many arguments for format [-Wformat-extra-args] vinagre/vinagre-utils.c: In function 'vinagre_utils_show_many_errors': vinagre/vinagre-utils.c:200:2: warning: passing argument 2 of 'g_slist_foreach' from incompatible pointer type [enabled by default] /usr/include/glib-2.0/glib/gslist.h:96:10: note: expected 'GFunc' but argument is of type 'void (*)(const void *, void *)' vinagre/vinagre-utils.c: In function 'vinagre_utils_show_help_about': vinagre/vinagre-utils.c:643:7: warning: variable '_artists_size_' set but not used [-Wunused-but-set-variable] vinagre/vinagre-utils.c:638:7: warning: variable '_authors_size_' set but not used [-Wunused-but-set-variable] vinagre/vinagre-utils.c: At top level: vinagre/vinagre-utils.c:163:20: warning: 'block2_data_ref' defined but not used [-Wunused-function] vinagre/vinagre-tab.c: In function 'vinagre_tab_add_recent_used': vinagre/vinagre-tab.c:535:5: warning: implicit declaration of function 'vinagre_utils_show_error_dialog' [-Wimplicit-function-declaration] vinagre/vinagre-ssh.c: In function 'handle_login': vinagre/vinagre-ssh.c:501:8: warning: implicit declaration of function 'vinagre_utils_request_credential' [-Wimplicit-function-declaration] vinagre/vinagre-ssh.c:623:9: warning: implicit declaration of function 'vinagre_utils_show_error_dialog' [-Wimplicit-function-declaration] => implicit declarations are almost always a pointer to misbehaving code at the end.
Same here with 3.1.4, the plugins are build "successfully" but from the interface I only get VNC as an option to connect - neither SSH or RDP are there.
A little bit of digging shows that the plugins are no longer loaded 'on the fly', but seem to be linked to the main binary (?) The 'failure' now happens as most distros have -Wl,-as-needed enabled, which in turn drops the references to libssh.so and librdp.so. I tried this with a build with -as-needed disabled and in this case I can successfully connect to ssh servers (did not test rdp, but it does show in the list of valid connection types)
Yes, I confirm that building with --no-as-needed appears to reenable the RDP & SSH plugins. However, this still needs to be fixed. Here's Debian's wikipage on the subject: http://wiki.debian.org/ToolChain/DSOLinking
Created attachment 202571 [details] [review] Minimal patch for 3.2 (In reply to comment #7) > A little bit of digging shows that the plugins are no longer loaded 'on the > fly', but seem to be linked to the main binary (?) Correct. In fact, **there is nothing in the code that actually loads the plugins.** Instead, they rely on the default ELF behavior to create a runtime linker dependency on the plugins, which then register themselves because their init functions are marked __attribute__((constructor)). > The 'failure' now happens as most distros have -Wl,-as-needed enabled, which in > turn drops the references to libssh.so and librdp.so. This doesn't work in PE platforms (Cygwin and Win32) either, which by definition imply the equivalent of -Wl,--as-needed. > I tried this with a build with -as-needed disabled and in this case I can > successfully connect to ssh servers (did not test rdp, but it does show in the > list of valid connection types) The attached patch is the easiest way to fix this for those packaging 3.2. As for upstream, the next natural step would be to dump libtool altogether; I'll see if I can whip up a patch in that vein for git master.
Created attachment 202573 [details] [review] Remove libtool If we're going to link everything statically, there is really no reason to use libtool anymore. This patch, for git master, removes libtool entirely. We still rely on __attribute__((constructor)) to call the init functions, but that WJFFM. Tested on Cygwin with all "plugins" operational (note that compiling the SPICE plugin requires the patch from bug 660432#c7).
Comment on attachment 202573 [details] [review] Remove libtool Pushed a slightly-modified patch to master as commit 5d8c542dbbf7c8fb3c035c287a1d2a425237f43a, thanks.