smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

libssh2 update supporting openssl 1.1 #246

Closed smanders closed 5 years ago

smanders commented 5 years ago

to move to OpenSSL 1.1.1c (and away from 1.0.2a) libssh2 (which depends on OpenSSL) needs to be updated to a version that supports the new OpenSSL API

OpenSSL 1.1.1c (and 1.0.2a) are both available with https://github.com/smanders/externpro/issues/36

smanders commented 5 years ago

attempting to build the current version libssh2 (1.5.0) against openssl 1.1.1c

$ make -k
[ 12%] Built target patch
[ 25%] Built target zlib
[ 37%] Built target zlib_Release
[ 50%] Built target openssl_1.1.1c
[ 62%] Built target openssl_1.1.1c_Release
[ 75%] Built target libssh2_1.5.0
[ 87%] Built target patch_bld
[ 89%] Performing build step for 'libssh2_1.5.0_Release'
[  4%] Building C object CMakeFiles/libssh2.dir/src/agent.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/agent.c:40:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:62: recipe for target 'CMakeFiles/libssh2.dir/src/agent.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/agent.c.o] Error 1
[  8%] Building C object CMakeFiles/libssh2.dir/src/channel.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/channel.c:41:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:75: recipe for target 'CMakeFiles/libssh2.dir/src/channel.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/channel.c.o] Error 1
[ 12%] Building C object CMakeFiles/libssh2.dir/src/comp.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/comp.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:88: recipe for target 'CMakeFiles/libssh2.dir/src/comp.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/comp.c.o] Error 1
[ 16%] Building C object CMakeFiles/libssh2.dir/src/crypt.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/crypt.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/crypt.c:70:25: error: field ‘h’ has incomplete type
     _libssh2_cipher_ctx h;
                         ^
CMakeFiles/libssh2.dir/build.make:101: recipe for target 'CMakeFiles/libssh2.dir/src/crypt.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/crypt.c.o] Error 1
[ 20%] Building C object CMakeFiles/libssh2.dir/src/global.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/global.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:114: recipe for target 'CMakeFiles/libssh2.dir/src/global.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/global.c.o] Error 1
[ 25%] Building C object CMakeFiles/libssh2.dir/src/hostkey.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/hostkey.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/hostkey.c: In function ‘hostkey_method_ssh_rsa_signv’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/hostkey.c:171:22: error: storage size of ‘ctx’ isn’t known
     libssh2_sha1_ctx ctx;
                      ^~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/hostkey.c: In function ‘hostkey_method_ssh_dss_signv’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/hostkey.c:347:22: error: storage size of ‘ctx’ isn’t known
     libssh2_sha1_ctx ctx;
                      ^~~
CMakeFiles/libssh2.dir/build.make:127: recipe for target 'CMakeFiles/libssh2.dir/src/hostkey.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/hostkey.c.o] Error 1
[ 29%] Building C object CMakeFiles/libssh2.dir/src/keepalive.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/keepalive.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:140: recipe for target 'CMakeFiles/libssh2.dir/src/keepalive.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/keepalive.c.o] Error 1
[ 33%] Building C object CMakeFiles/libssh2.dir/src/kex.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c: In function ‘diffie_hellman_sha1’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:219:29: error: storage size of ‘fingerprint_ctx’ isn’t known
             libssh2_md5_ctx fingerprint_ctx;
                             ^~~~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:246:30: error: storage size of ‘fingerprint_ctx’ isn’t known
             libssh2_sha1_ctx fingerprint_ctx;
                              ^~~~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:49:26: error: storage size of ‘hash’ isn’t known
         libssh2_sha1_ctx hash;                                          \
                          ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:475:13: note: in expansion of macro ‘LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH’
             LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH(iv,
             ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:49:26: error: storage size of ‘hash’ isn’t known
         libssh2_sha1_ctx hash;                                          \
                          ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:482:13: note: in expansion of macro ‘LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH’
             LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH(secret,
             ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:49:26: error: storage size of ‘hash’ isn’t known
         libssh2_sha1_ctx hash;                                          \
                          ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:522:13: note: in expansion of macro ‘LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH’
             LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH(iv,
             ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:49:26: error: storage size of ‘hash’ isn’t known
         libssh2_sha1_ctx hash;                                          \
                          ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:529:13: note: in expansion of macro ‘LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH’
             LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH(secret,
             ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:49:26: error: storage size of ‘hash’ isn’t known
         libssh2_sha1_ctx hash;                                          \
                          ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:567:13: note: in expansion of macro ‘LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH’
             LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH(key,
             ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:49:26: error: storage size of ‘hash’ isn’t known
         libssh2_sha1_ctx hash;                                          \
                          ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/kex.c:593:13: note: in expansion of macro ‘LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH’
             LIBSSH2_KEX_METHOD_DIFFIE_HELLMAN_SHA1_HASH(key,
             ^
CMakeFiles/libssh2.dir/build.make:153: recipe for target 'CMakeFiles/libssh2.dir/src/kex.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/kex.c.o] Error 1
[ 37%] Building C object CMakeFiles/libssh2.dir/src/knownhost.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/knownhost.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/knownhost.c: In function ‘knownhost_check’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/knownhost.c:420:38: error: storage size of ‘ctx’ isn’t known
                     libssh2_hmac_ctx ctx;
                                      ^~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/knownhost.c:428:21: warning: ‘HMAC_Init’ is deprecated [-Wdeprecated-declarations]
                     libssh2_hmac_sha1_init(&ctx, (unsigned char *)node->salt,
                     ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.h:40:0,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/crypto.h:42,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:135,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/knownhost.c:39:
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/hmac.h:30:31: note: declared here
 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
                               ^
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/opensslconf.h:106:37: note: in definition of macro ‘DECLARE_DEPRECATED’
 #   define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
                                     ^
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/hmac.h:30:1: note: in expansion of macro ‘DEPRECATEDIN_1_1_0’
 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
 ^~~~~~~~~~~~~~~~~~
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/crypto.h:42:0,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:135,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/knownhost.c:39:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.h:133:35: warning: implicit declaration of function ‘HMAC_cleanup’; did you mean ‘RAND_cleanup’? [-Wimplicit-function-declaration]
 #define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx)
                                   ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/knownhost.c:433:21: note: in expansion of macro ‘libssh2_hmac_cleanup’
                     libssh2_hmac_cleanup(&ctx);
                     ^~~~~~~~~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:166: recipe for target 'CMakeFiles/libssh2.dir/src/knownhost.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/knownhost.c.o] Error 1
[ 41%] Building C object CMakeFiles/libssh2.dir/src/libgcrypt.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libgcrypt.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:179: recipe for target 'CMakeFiles/libssh2.dir/src/libgcrypt.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/libgcrypt.c.o] Error 1
[ 45%] Building C object CMakeFiles/libssh2.dir/src/mac.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:38:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c: In function ‘mac_method_hmac_sha1_hash’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:110:22: error: storage size of ‘ctx’ isn’t known
     libssh2_hmac_ctx ctx;
                      ^~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:116:5: warning: ‘HMAC_Init’ is deprecated [-Wdeprecated-declarations]
     libssh2_hmac_sha1_init(&ctx, *abstract, 20);
     ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.h:40:0,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/crypto.h:42,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:135,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:38:
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/hmac.h:30:31: note: declared here
 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
                               ^
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/opensslconf.h:106:37: note: in definition of macro ‘DECLARE_DEPRECATED’
 #   define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
                                     ^
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/hmac.h:30:1: note: in expansion of macro ‘DEPRECATEDIN_1_1_0’
 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
 ^~~~~~~~~~~~~~~~~~
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/crypto.h:42:0,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:135,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:38:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.h:133:35: warning: implicit declaration of function ‘HMAC_cleanup’; did you mean ‘RAND_cleanup’? [-Wimplicit-function-declaration]
 #define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx)
                                   ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:123:5: note: in expansion of macro ‘libssh2_hmac_cleanup’
     libssh2_hmac_cleanup(&ctx);
     ^~~~~~~~~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c: In function ‘mac_method_hmac_md5_hash’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:182:22: error: storage size of ‘ctx’ isn’t known
     libssh2_hmac_ctx ctx;
                      ^~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:188:5: warning: ‘HMAC_Init’ is deprecated [-Wdeprecated-declarations]
     libssh2_hmac_md5_init(&ctx, *abstract, 16);
     ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.h:40:0,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/crypto.h:42,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:135,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:38:
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/hmac.h:30:31: note: declared here
 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
                               ^
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/opensslconf.h:106:37: note: in definition of macro ‘DECLARE_DEPRECATED’
 #   define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
                                     ^
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/hmac.h:30:1: note: in expansion of macro ‘DEPRECATEDIN_1_1_0’
 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
 ^~~~~~~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c: In function ‘mac_method_hmac_ripemd160_hash’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:254:22: error: storage size of ‘ctx’ isn’t known
     libssh2_hmac_ctx ctx;
                      ^~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:260:5: warning: ‘HMAC_Init’ is deprecated [-Wdeprecated-declarations]
     libssh2_hmac_ripemd160_init(&ctx, *abstract, 20);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.h:40:0,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/crypto.h:42,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:135,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/mac.c:38:
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/hmac.h:30:31: note: declared here
 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
                               ^
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/opensslconf.h:106:37: note: in definition of macro ‘DECLARE_DEPRECATED’
 #   define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
                                     ^
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/hmac.h:30:1: note: in expansion of macro ‘DEPRECATEDIN_1_1_0’
 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
 ^~~~~~~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:192: recipe for target 'CMakeFiles/libssh2.dir/src/mac.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/mac.c.o] Error 1
[ 50%] Building C object CMakeFiles/libssh2.dir/src/misc.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/misc.c:40:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:205: recipe for target 'CMakeFiles/libssh2.dir/src/misc.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/misc.c.o] Error 1
[ 54%] Building C object CMakeFiles/libssh2.dir/src/openssl.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:41:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘_libssh2_rsa_new’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:71:11: error: dereferencing pointer to incomplete type ‘RSA {aka struct rsa_st}’
     (*rsa)->e = BN_new();
           ^~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘_libssh2_dsa_new’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:129:14: error: dereferencing pointer to incomplete type ‘DSA {aka struct dsa_st}’
     (*dsactx)->p = BN_new();
              ^~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘_libssh2_dsa_sha1_verify’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:155:13: error: storage size of ‘dsasig’ isn’t known
     DSA_SIG dsasig;
             ^~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘aes_ctr_init’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:222:16: error: dereferencing pointer to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
     switch (ctx->key_len) {
                ^~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:240:32: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
     c->aes_ctx = malloc(sizeof(EVP_CIPHER_CTX));
                                ^~~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘make_ctr_evp’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:324:19: error: dereferencing pointer to incomplete type ‘EVP_CIPHER {aka struct evp_cipher_st}’
     aes_ctr_cipher->block_size = 16;
                   ^~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘_libssh2_EVP_aes_128_ctr’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:337:23: error: storage size of ‘aes_ctr_cipher’ isn’t known
     static EVP_CIPHER aes_ctr_cipher;
                       ^~~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘_libssh2_EVP_aes_192_ctr’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:345:23: error: storage size of ‘aes_ctr_cipher’ isn’t known
     static EVP_CIPHER aes_ctr_cipher;
                       ^~~~~~~~~~~~~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘_libssh2_EVP_aes_256_ctr’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:353:23: error: storage size of ‘aes_ctr_cipher’ isn’t known
     static EVP_CIPHER aes_ctr_cipher;
                       ^~~~~~~~~~~~~~
In file included from /home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/asn1.h:23:0,
                 from /home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/objects.h:15,
                 from /home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/evp.h:28,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.h:45,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/crypto.h:42,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:135,
                 from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:41:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘_libssh2_dsa_sha1_sign’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:490:29: error: dereferencing pointer to incomplete type ‘DSA_SIG {aka struct DSA_SIG_st}’
     r_len = BN_num_bytes(sig->r);
                             ^
/home/smanders/src/externpro/_bldx/externpro_smanders-dirtyrepo-19.06.1-24-g4cf84e6-p-gcc740-64/include/openssl_1.1.1c/openssl/bn.h:181:40: note: in definition of macro ‘BN_num_bytes’
 # define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
                                        ^
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘libssh2_sha1’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:523:16: error: storage size of ‘ctx’ isn’t known
     EVP_MD_CTX ctx;
                ^~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘libssh2_md5’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:542:16: error: storage size of ‘ctx’ isn’t known
     EVP_MD_CTX ctx;
                ^~~
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c: In function ‘_libssh2_pub_priv_keyfile’:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/openssl.c:796:15: error: dereferencing pointer to incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
     switch (pk->type) {
               ^~
CMakeFiles/libssh2.dir/build.make:218: recipe for target 'CMakeFiles/libssh2.dir/src/openssl.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/openssl.c.o] Error 1
[ 58%] Building C object CMakeFiles/libssh2.dir/src/packet.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/packet.c:41:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:231: recipe for target 'CMakeFiles/libssh2.dir/src/packet.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/packet.c.o] Error 1
[ 62%] Building C object CMakeFiles/libssh2.dir/src/pem.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/pem.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:244: recipe for target 'CMakeFiles/libssh2.dir/src/pem.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/pem.c.o] Error 1
[ 66%] Building C object CMakeFiles/libssh2.dir/src/publickey.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/publickey.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:257: recipe for target 'CMakeFiles/libssh2.dir/src/publickey.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/publickey.c.o] Error 1
[ 70%] Building C object CMakeFiles/libssh2.dir/src/scp.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/scp.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:270: recipe for target 'CMakeFiles/libssh2.dir/src/scp.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/scp.c.o] Error 1
[ 75%] Building C object CMakeFiles/libssh2.dir/src/session.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/session.c:40:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:283: recipe for target 'CMakeFiles/libssh2.dir/src/session.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/session.c.o] Error 1
[ 79%] Building C object CMakeFiles/libssh2.dir/src/sftp.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/sftp.c:42:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:296: recipe for target 'CMakeFiles/libssh2.dir/src/sftp.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/sftp.c.o] Error 1
[ 83%] Building C object CMakeFiles/libssh2.dir/src/transport.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/transport.c:41:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:309: recipe for target 'CMakeFiles/libssh2.dir/src/transport.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/transport.c.o] Error 1
[ 87%] Building C object CMakeFiles/libssh2.dir/src/userauth.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/userauth.c:40:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:322: recipe for target 'CMakeFiles/libssh2.dir/src/userauth.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/userauth.c.o] Error 1
[ 91%] Building C object CMakeFiles/libssh2.dir/src/version.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/version.c:38:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:335: recipe for target 'CMakeFiles/libssh2.dir/src/version.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/version.c.o] Error 1
[ 95%] Building C object CMakeFiles/libssh2.dir/src/wincng.c.o
In file included from /home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/wincng.c:39:0:
/home/smanders/src/externpro/_bldx/xpbase/Source/libssh2_1.5.0/src/libssh2_priv.h:255:22: error: field ‘exchange_hash’ has incomplete type
     libssh2_sha1_ctx exchange_hash;
                      ^~~~~~~~~~~~~
CMakeFiles/libssh2.dir/build.make:348: recipe for target 'CMakeFiles/libssh2.dir/src/wincng.c.o' failed
make[5]: *** [CMakeFiles/libssh2.dir/src/wincng.c.o] Error 1
make[5]: Target 'CMakeFiles/libssh2.dir/build' not remade because of errors.
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/libssh2.dir/all' failed
make[4]: *** [CMakeFiles/libssh2.dir/all] Error 2
make[4]: Target 'all' not remade because of errors.
Makefile:129: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Target 'default_target' not remade because of errors.
CMakeFiles/libssh2_1.5.0_Release.dir/build.make:113: recipe for target 'xpbase/Stamp/libssh2_1.5.0_Release/libssh2_1.5.0_Release-build' failed
make[2]: *** [xpbase/Stamp/libssh2_1.5.0_Release/libssh2_1.5.0_Release-build] Error 2
make[2]: Target 'CMakeFiles/libssh2_1.5.0_Release.dir/build' not remade because of errors.
CMakeFiles/Makefile2:365: recipe for target 'CMakeFiles/libssh2_1.5.0_Release.dir/all' failed
make[1]: *** [CMakeFiles/libssh2_1.5.0_Release.dir/all] Error 2
make[1]: Target 'all' not remade because of errors.
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
make: Target 'default_target' not remade because of errors.
smanders commented 5 years ago

libssh2 changelog https://libssh2.org/changes.html seems to suggest that the latest version 1.9.0 released 2019.06.20 may be the right version to pursue, since one of the changes is "fixed building with OpenSSL 1.1"

externpro will need multiple version support of libssh2 until the switch is made and we know if projects that depend on libssh2 (libgit2 and curl) are okay with the update to libssh2

smanders commented 5 years ago

building libssh2 1.9.0 on Windows via externpro, cmake warnings

10>-- Found openssl: 1.1.1c [externpro]
10>CMake Warning at src/CMakeLists.txt:91 (message):
10>  Unable to find OpenSSL crypto (aka libeay32) DLL, executables may not run
10>
10>
10>CMake Warning at src/CMakeLists.txt:100 (message):
10>  Unable to find OpenSSL ssl (aka ssleay32) DLL, executables may not run
10>
10>

and link errors

10>crypto_1.1.1c-s.lib(dso_lib.obj) : error LNK2019: unresolved external symbol DSO_METHOD_openssl referenced in function DSO_global_lookup [E:\smanders\bld\externpro\xpbase\Build\libssh2_1.9.0_msvc\example\example-direct_tcpip.vcxproj]
smanders commented 5 years ago

link errors resolved with openssl 1.1.1c patch (commit referenced above)

ignoring the cmake warnings, for now... I don't remember needing to detect Windows libraries like is being done now that libssh2 has it's own cmake implementation https://github.com/smanders/libssh2/blob/libssh2-1.9.0/src/CMakeLists.txt#L73-L100

smanders commented 5 years ago

completed with commit to dev branch referenced above