Closed PromyLOPh closed 4 years ago
Thanks for the patch!
There is a problem in Ubuntu 18.04 LTS: it ships with libssh version 0.8.0~20170825.94fa1e38-1ubuntu0.6
, which is actually libssh 0.7. I tested it in a Docker container with Ubuntu GNU/Linux 18.04:
$ apt show libssh-dev 2>/dev/null | grep Version
Version: 0.8.0~20170825.94fa1e38-1ubuntu0.6
$ guile -c "(use-modules (ssh version)) (display (get-libssh-version)) (newline)"
0.7.0
Don't know for sure why the Ubuntu people decided to trick pkg-config
into thinking that it's 0.8. But Guile-SSH will fail with your patch on this distribution, because SSH_OPTIONS_NODELAY
appears only in actual libssh 0.8 (not the fake one 0.8 that is in Ubuntu 18.04.) That's the reason the tests fail here.
To fix that we need to check for libssh 0.8.1+ in configure.ac
to make sure we have valid 0.8 -- that's the simplest solution (0.8.1 is quite old already so the most users will be okay with that I think.) Let me know if you come up with a better solution.
Not ideal but the best solution I can think of right now as well, thanks for merging! Would it be possible to create a new release of guile-ssh that we can then package and use?
Sure. I'll see if I can fix some random test failures with Guile 2.2 that sometimes occur, and then I'll prepare a new release.
This pull request adds the nodelay option libssh provides. It is intended to be used by guix, which currently opens its own socket and manually sets NODELAY. See https://issues.guix.gnu.org/41702#11
The Guile 2.2 build pipeline fails, because it’s using a really old version of libssh (0.8.0~20170825.94fa1e38-1ubuntu0.6). NODELAY was introduced in 2018 by https://git.libssh.org/projects/libssh.git/commit/?id=be22c0d442a1c5c016e2ebb99075b61614b5b447