CESNET / libnetconf2

C NETCONF library
BSD 3-Clause "New" or "Revised" License
203 stars 147 forks source link

libnetconf2 make issue #480

Open LavanyaMalakalapalli opened 6 months ago

LavanyaMalakalapalli commented 6 months ago

Install libnetconf2

cd ..

git clone https://github.com/CESNET/libnetconf2.git

cd libnetconf2

mkdir build && cd build && cmake .. && make && make install

root@snsrl4:~/NetConfServer/libyang/sysrepo/libnetconf2/build# make
Consolidate compiler generated dependencies of target netconf2
[  4%] Building C object CMakeFiles/netconf2.dir/src/session_server_ssh.c.o
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c: In function ‘nc_server_ssh_read_authorized_keys_file’:
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:351:53: error: ‘SSH_KEYTYPE_ECDSA_P256’ undeclared (first use in this function); did you mean ‘SSH_KEYTYPE_ECDSA’?
  351 |         if ((ktype != SSH_KEYTYPE_RSA) && (ktype != SSH_KEYTYPE_ECDSA_P256) && (ktype != SSH_KEYTYPE_ECDSA_P384) &&
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~
      |                                                     SSH_KEYTYPE_ECDSA
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:351:53: note: each undeclared identifier is reported only once for each function it appears in
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:351:90: error: ‘SSH_KEYTYPE_ECDSA_P384’ undeclared (first use in this function); did you mean ‘SSH_KEYTYPE_ECDSA’?
  351 | ype != SSH_KEYTYPE_RSA) && (ktype != SSH_KEYTYPE_ECDSA_P256) && (ktype != SSH_KEYTYPE_ECDSA_P384) &&
      |                                                                           ^~~~~~~~~~~~~~~~~~~~~~
      |                                                                           SSH_KEYTYPE_ECDSA
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:352:27: error: ‘SSH_KEYTYPE_ECDSA_P521’ undeclared (first use in this function); did you mean ‘SSH_KEYTYPE_ECDSA’?
  352 |                 (ktype != SSH_KEYTYPE_ECDSA_P521) && (ktype != SSH_KEYTYPE_ED25519)) {
      |                           ^~~~~~~~~~~~~~~~~~~~~~
      |                           SSH_KEYTYPE_ECDSA
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c: In function ‘nc_server_ssh_create_ssh_pubkey’:
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:1067:52: error: ‘SSH_KEYTYPE_ECDSA_P256’ undeclared (first use in this function); did you mean ‘SSH_KEYTYPE_ECDSA’?
 1067 |         ret = ssh_pki_import_pubkey_base64(base64, SSH_KEYTYPE_ECDSA_P256, key);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
      |                                                    SSH_KEYTYPE_ECDSA
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:1069:52: error: ‘SSH_KEYTYPE_ECDSA_P384’ undeclared (first use in this function); did you mean ‘SSH_KEYTYPE_ECDSA’?
 1069 |         ret = ssh_pki_import_pubkey_base64(base64, SSH_KEYTYPE_ECDSA_P384, key);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
      |                                                    SSH_KEYTYPE_ECDSA
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:1071:52: error: ‘SSH_KEYTYPE_ECDSA_P521’ undeclared (first use in this function); did you mean ‘SSH_KEYTYPE_ECDSA’?
 1071 |         ret = ssh_pki_import_pubkey_base64(base64, SSH_KEYTYPE_ECDSA_P521, key);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
      |                                                    SSH_KEYTYPE_ECDSA
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c: In function ‘nc_accept_ssh_session’:
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:1738:59: error: ‘SSH_BIND_OPTIONS_HOSTKEY_ALGORITHMS’ undeclared (first use in this function); did you mean ‘SSH_BIND_OPTIONS_HOSTKEY’?
 1738 |     if (opts->hostkey_algs && ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_HOSTKEY_ALGORITHMS, opts->hostkey_algs)) {
      |                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                           SSH_BIND_OPTIONS_HOSTKEY
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:1742:62: error: ‘SSH_BIND_OPTIONS_CIPHERS_S_C’ undeclared (first use in this function); did you mean ‘SSH_OPTIONS_CIPHERS_S_C’?
 1742 |     if (opts->encryption_algs && ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_CIPHERS_S_C, opts->encryption_algs)) {
      |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                              SSH_OPTIONS_CIPHERS_S_C
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:1746:55: error: ‘SSH_BIND_OPTIONS_KEY_EXCHANGE’ undeclared (first use in this function); did you mean ‘SSH_OPTIONS_KEY_EXCHANGE’?
 1746 |     if (opts->kex_algs && ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_KEY_EXCHANGE, opts->kex_algs)) {
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                       SSH_OPTIONS_KEY_EXCHANGE
/root/NetConfServer/libyang/sysrepo/libnetconf2/src/session_server_ssh.c:1750:55: error: ‘SSH_BIND_OPTIONS_HMAC_S_C’ undeclared (first use in this function); did you mean ‘SSH_OPTIONS_HMAC_S_C’?
 1750 |     if (opts->mac_algs && ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_HMAC_S_C, opts->mac_algs)) {
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                       SSH_OPTIONS_HMAC_S_C
make[2]: *** [CMakeFiles/netconf2.dir/build.make:216: CMakeFiles/netconf2.dir/src/session_server_ssh.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/netconf2.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
root@snsrl4:~/NetConfServer/libyang/sysrepo/libnetconf2/build#
michalvasko commented 6 months ago

Can't help you, it definitely compiles with libssh 0.9.5 and newer so you must be using an older version. Since the cmake version check passed, I am guessing you compiled libssh yourself, their master branch uses fake versioning.