Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libssh has deprecated lots of function calls #9382

Closed
bagder opened this issue Aug 29, 2022 · 0 comments
Closed

libssh has deprecated lots of function calls #9382

bagder opened this issue Aug 29, 2022 · 0 comments
Labels
build CI Continuous Integration SCP/SFTP

Comments

@bagder
Copy link
Member

bagder commented Aug 29, 2022

Starting in libssh 0.10.0, release date Aug 27, 2022. They have marked all SCP related functions as "deprecated" in their header files and this move now causes build errors and head aches for us.

I strongly dislike this kind of behavior and their breaking the API.

A sample of the errors:

vssh/libssh.c:1833:11: error: 'ssh_scp_new' is deprecated [-Werror,-Wdeprecated-declarations]
          ssh_scp_new(sshc->ssh_session, SSH_SCP_WRITE, protop->path);
          ^
/usr/local/include/libssh/libssh.h:568:1: note: 'ssh_scp_new' has been explicitly marked deprecated here
SSH_DEPRECATED LIBSSH_API ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location);
^
/usr/local/include/libssh/libssh.h:86:40: note: expanded from macro 'SSH_DEPRECATED'
#define SSH_DEPRECATED __attribute__ ((deprecated))
                                       ^
vssh/libssh.c:1838:11: error: 'ssh_scp_new' is deprecated [-Werror,-Wdeprecated-declarations]
          ssh_scp_new(sshc->ssh_session, SSH_SCP_READ, protop->path);
          ^
/usr/local/include/libssh/libssh.h:568:1: note: 'ssh_scp_new' has been explicitly marked deprecated here
SSH_DEPRECATED LIBSSH_API ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location);
^
/usr/local/include/libssh/libssh.h:86:40: note: expanded from macro 'SSH_DEPRECATED'
#define SSH_DEPRECATED __attribute__ ((deprecated))
                                       ^
vssh/libssh.c:1852:12: error: 'ssh_scp_init' is deprecated [-Werror,-Wdeprecated-declarations]
      rc = ssh_scp_init(sshc->scp_session);
           ^
/usr/local/include/libssh/libssh.h:566:1: note: 'ssh_scp_init' has been explicitly marked deprecated here
SSH_DEPRECATED LIBSSH_API int ssh_scp_init(ssh_scp scp);
^
/usr/local/include/libssh/libssh.h:86:40: note: expanded from macro 'SSH_DEPRECATED'
#define SSH_DEPRECATED __attribute__ ((deprecated))
                                       ^
@bagder bagder added SCP/SFTP build CI Continuous Integration labels Aug 29, 2022
bagder added a commit that referenced this issue Aug 29, 2022
libssh 0.10.0 marks all SCP functions as "deprecated" which causes
compiler warnings and errors in our CI jobs and elsewhere. Ignore
deprecation warnings if 0.10.0 or later is found in the build.

If they actually remove the functions at a later point, then someone can
deal with that pain and functionality break then.

Fixes #9382
@bagder bagder closed this as completed in 74e156d Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build CI Continuous Integration SCP/SFTP
Development

Successfully merging a pull request may close this issue.

1 participant