On Thu, Jul 7, 2022 at 2:58 PM Chetan Rao <[email protected]> wrote:
> Hello Nick, > > Thank you for the above suggestions. I am now able to build the guacamole > image with the latest libssh2 version. > I have one more query though. > If I want libssh ( instead of libssh2 ). What should I do? My > understanding is that I have to install libssh-dev instead of libssh2-1-dev > and make some changes in the configure script. > Can you please suggest the changes I need to make in configure script or > anywhere else to support ssh via libssh ( instead of libssh2 )? If you can > explain how libssh2 is even linked/configured with the guacamole > protocol that would be great as well. > > This is quite a bit more complicated than just changing the configure script and installing another package. While those steps certainly are required, you would also need to go through all of the SSH code (src/protocols/ssh and the common-ssh code) and handle the differences between the APIs - libssh and libssh2 are not API or ABI compatible, which means that you'd need to (re)write the C code to handle the calls to the libssh functions. Without going into too much detail, this would likely require some #if/#else/#endif blocks that would be able to swap between the libraries based on what the configure script finds, and/or possibly an abstraction layer between the Guacamole SSH code and the underlying libraries. It's a fair bit of work. As far as how it is linked, now, you can take a look at the source code, in the src/protocols/ssh and src/common-ssh directories and look for the calls to various libssh2_ functions. -Nick
