artyom-poptsov / guile-ssh

Guile-SSH is a library that provides access to the SSH protocol for GNU Guile programs.
https://memory-heap.org/~avp/projects/guile-ssh
GNU General Public License v3.0
65 stars 13 forks source link

Prepare for Guile 2.9/3.0 support #14

Closed civodul closed 4 years ago

civodul commented 5 years ago

Hello @artyom-poptsov!

This prepares for Guile 2.9/3.0 support (Guile 3.0 is slated to be released within a couple of months, and we'll use it in Guix hopefully as soon as it's out.)

The patch series fixes a couple of issues I encountered on master. Unfortunately, tests don't pass on master, with or without these patches:

make[3]: Entering directory '/tmp/guix-build-guile-ssh-0.11.3.drv-0/source/tests'
PASS: log.scm
PASS: server.scm
PASS: session.scm
FAIL: client-server.scm
FAIL: popen.scm
FAIL: shell.scm
PASS: server-client.scm
PASS: sssh-ssshd.scm
PASS: key.scm
PASS: tunnel.scm
FAIL: dist.scm
============================================================================
Testsuite summary for Guile-SSH 0.12.0
============================================================================
# TOTAL: 11
# PASS:  7
# SKIP:  0
# XFAIL: 0
# FAIL:  4
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
Please report to poptsov.artyom@gmail.com
============================================================================

I haven't been able to fully understand what's going on. It'd be great if you could provide feedback!

For the record, I have also accumulated fixes against the latest release in the guile-ssh and guile3.0-ssh packages in Guix.

Thanks, Ludo'.

artyom-poptsov commented 4 years ago

Hi!

I'm currently working on integration of your changes (and yes, fixing some bugs introduced by me -- unintentionally of course) on a branch named wip-guile3. Will merge as soon as all tests pass.

Thanks.

artyom-poptsov commented 4 years ago

Hello,

I fixed some bugs in tests and made some minor improvements to the main code. Now your changes are merged to the master. Thanks for help!

Also it seems that I found some strange behaviour in libssh, and that is the reason behind some of Guile-SSH test failures, namely in tunnel.scm test: https://www.libssh.org/archive/libssh/2019-12/0000037.html

civodul commented 4 years ago

Hi Artyom!

"Artyom V. Poptsov" notifications@github.com skribis:

Also it seems that I found some strange behaviour in libssh, and that is the reason behind some of Guile-SSH test failures, namely in tunnel.scm test: https://www.libssh.org/archive/libssh/2019-12/0000037.html

Woow, wild.

Thanks for working on it!

Ludo’.

artyom-poptsov commented 4 years ago

Hello,

it's strange but GUILE_PKG tells me that I have Guile 3.0 even though I have Guile 2.2.4 installed:

$ guile -c "(display (effective-version))"
2.2
$ ./configure --prefix=/usr --with-guilesitedir=/usr/share/guile/site/2.2
...
checking for guile-3.0... yes
checking for Guile site directory... /usr/share/guile/site/3.0
checking for Guile site-ccache directory using pkgconfig... /usr/lib64/guile/3.0/site-ccache
checking for Guile extensions directory... /usr/lib64/guile/3.0/extensions
...
configure: WARNING:
   The Guile modules will be installed in /usr/share/guile/site/2.2.
   You should probably re-run `configure' with
   `--with-guilesitedir=/usr/share/guile/site/3.0'
   Otherwise, you will have to adjust the `GUILE_LOAD_PATH' environment
   variable.

What do you think?

civodul commented 4 years ago

Hello!

checking for guile-3.0... yes

That means that ‘pkg-config guile-3.0 --cflags’ works, right?

GUILE_PKG([3.0 2.2 2.0]) means that ‘configure’ will try Guile versions in this order. So if you have installed both 2.2 and 3.0, it picks up 3.0. Is this what happens here?

Ludo’.

artyom-poptsov commented 4 years ago

Hello!

You're right, it turned out that I have guile-3.0 (2.9.3) manually installed on my system.

Artyom.