pkg-config file does not contain Requires.private for GSSAPI when built with it, making using the static library difficult
libssh can be built with GSSAPI. However, upon doing so the libssh.pc file is not updated to include a line like Requires.private: krb5-gssapi (or Libs.private: -lgssapi or Libs.private: -lgssapi_krb5), which means that pkgconf --static --libs libssh only lists -lssh and not all the necessary GSSAPI libraries (even with the --static flag). (Those libraries are often not available for static linking, which is a different issue, but can be linked dynamically.)
This makes compiling against the static version of libssh likely to yield messages like:
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libssh.a(gssapi.c.o): in function `ssh_gssapi_log_error':
(.text+0xbb): undefined reference to `gss_display_status'
/usr/bin/ld: (.text+0xd1): undefined reference to `gss_release_buffer'
/usr/bin/ld: (.text+0xe4): undefined reference to `gss_release_buffer'
/usr/bin/ld: (.text+0x125): undefined reference to `gss_display_status'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libssh.a(gssapi.c.o): in function `ssh_gssapi_free':
(.text+0x25f): undefined reference to `gss_release_cred'
/usr/bin/ld: (.text+0x27c): undefined reference to `gss_release_cred'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libssh.a(gssapi.c.o): in function `ssh_gssapi_handle_userauth':
(.text+0x4b5): undefined reference to `gss_create_empty_oid_set'
/usr/bin/ld: (.text+0x4cb): undefined reference to `gss_indicate_mechs'
/usr/bin/ld: (.text+0x612): undefined reference to `gss_test_oid_set_member'
/usr/bin/ld: (.text+0x636): undefined reference to `gss_add_oid_set_member'
/usr/bin/ld: (.text+0x666): undefined reference to `gss_release_oid_set'
/usr/bin/ld: (.text+0x6d6): undefined reference to `GSS_C_NT_HOSTBASED_SERVICE'
/usr/bin/ld: (.text+0x6de): undefined reference to `gss_import_name'
/usr/bin/ld: (.text+0x733): undefined reference to `gss_acquire_cred'
/usr/bin/ld: (.text+0x748): undefined reference to `gss_release_name'
/usr/bin/ld: (.text+0x757): undefined reference to `gss_release_oid_set'
/usr/bin/ld: (.text+0x837): undefined reference to `gss_test_oid_set_member'
/usr/bin/ld: (.text+0x87f): undefined reference to `gss_release_oid_set'
/usr/bin/ld: (.text+0x8ba): undefined reference to `gss_release_oid_set'
/usr/bin/ld: (.text+0x936): undefined reference to `gss_release_oid_set'
/usr/bin/ld: (.text+0x9d9): undefined reference to `gss_release_oid_set'
if the build process attempts to use pkg-config/pkgconf to determine the necessary linker flags. (It can be slightly complicated by trying to support systems which have MIT and Heimdal both installed in a multidev situation.)