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
63 stars 13 forks source link

Fails to build with libssh 0.11.1 #42

Open vagrantc opened 2 months ago

vagrantc commented 2 months ago

Just tested building guile-ssh 0.17.x against libssh 0.11.1-1 in Debian, and I get the following build failure (downgrading to 0.10.6-3 builds fine):

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../libguile-ssh -g -O2 -Werror=implicit-function-declaration -ffil e-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf- protection -I/usr/include/guile/3.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -Werror=implicit-function-declaration - ffile-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security - fcf-protection -c ../../../../libguile-ssh/session-type.c -fPIC -DPIC -o .libs/libguile_ssh_la-session-type.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../libguile-ssh -g -O2 -Werror=implicit-function-declaration -ffil e-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf- protection -I/usr/include/guile/3.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -Werror=implicit-function-declaration - ffile-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security - fcf-protection -c ../../../../libguile-ssh/session-main.c -fPIC -DPIC -o .libs/libguile_ssh_la-session-main.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../libguile-ssh -g -O2 -Werror=implicit-function-declaration -ffil e-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf- protection -I/usr/include/guile/3.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -Werror=implicit-function-declaration - ffile-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security - fcf-protection -c ../../../../libguile-ssh/server-main.c -fPIC -DPIC -o .libs/libguile_ssh_la-server-main.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../libguile-ssh -g -O2 -Werror=implicit-function-declaration -ffil e-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf- protection -I/usr/include/guile/3.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -Werror=implicit-function-declaration - ffile-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security - fcf-protection -c ../../../../libguile-ssh/server-func.c -fPIC -DPIC -o .libs/libguile_ssh_la-server-func.o
In file included from /usr/include/libssh/callbacks.h:30,
from ../../../../libguile-ssh/session-func.c:26:
../../../../libguile-ssh/session-func.c: In function 'set_bool_opt':
../../../../libguile-ssh/session-func.c:237:11: error: two or more data types in declaration specifiers
237 | int32_t bool;
| ^~~~
../../../../libguile-ssh/session-func.c:237:3: warning: useless type name in empty declaration
237 | int32_t bool; ../../../../libguile-ssh/session-func.c:241:8: error: expected identifier or '(' before '=' token 241 | bool = scm_to_bool (value); | ^ ../../../../libguile-ssh/session-func.c:242:43: error: expected expression before '_Bool' 242 | return ssh_options_set (session, type, &bool); | ^~~~
../../../../libguile-ssh/session-func.c:243:1: warning: control reaches end of non-void function [-Wreturn-type] 243 | }
| ^
make[4]: *** [Makefile:726: libguile_ssh_la-session-func.lo] Error 1

Applying the patches from git master branch do not resolve the issue.

artyom-poptsov commented 1 month ago

Hello,

the build-time error seems to be fixed in 30fc103c67f3bf6cd30b17379ba966b260cfa534 thanks to @ptillemans

But the tests still fail with libssh 0.11.1 -- this needs some investigation.

-avp

vagrantc commented 3 weeks ago

This appears to be fixed pulling in the patches from 0.17.0 to c1359506ee6cfb1ea2538d96d125cdf8b7c2bb53 ... any chance we could get a new release with the fixes? :)