Hi, I'm using Debian 9.
GCC 6.3.0
openssl 1.1.0
cmake 3.7.2
I'm trying to build libssh following instructions from INSTALL file, with both Debug & Release I met errors:
- With -DCMAKE_BUILD_TYPE=Debug, error is
/home/thai/test/libssh/libssh-0.8.5/src/libcrypto.c: In function ‘aes_ctr_encrypt’: /home/thai/test/libssh/libssh-0.8.5/src/libcrypto.c:635:3: error: implicit declaration of function ‘CRYPTO_ctr128_encrypt’ [-Werror=implicit-function-declaration] CRYPTO_ctr128_encrypt(in, out, len, &cipher->aes_key->key, cipher->aes_key->IV, tmp_buffer, &num, (block128_f)AES_encrypt); ^~~~~~~~~~~~~~~~~~~~~ /home/thai/test/libssh/libssh-0.8.5/src/libcrypto.c:635:102: error: ‘block128_f’ undeclared (first use in this function) encrypt(in, out, len, &cipher->aes_key->key, cipher->aes_key->IV, tmp_buffer, &num, (block128_f)AES_encrypt); ^~~~~~~~~~ /home/thai/test/libssh/libssh-0.8.5/src/libcrypto.c:635:102: note: each undeclared identifier is reported only once for each function it appears in /home/thai/test/libssh/libssh-0.8.5/src/libcrypto.c:635:113: error: expected ‘)’ before ‘AES_encrypt’ out, len, &cipher->aes_key->key, cipher->aes_key->IV, tmp_buffer, &num, (block128_f)AES_encrypt); ^~~~~~~~~~~ /home/thai/test/libssh/libssh-0.8.5/src/libcrypto.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-gnu-zero-variadic-macro-arguments’ cc1: some warnings being treated as errors src/CMakeFiles/ssh_shared.dir/build.make:1358: recipe for target 'src/CMakeFiles/ssh_shared.dir/libcrypto.c.o' failed make[2]: *** [src/CMakeFiles/ssh_shared.dir/libcrypto.c.o] Error 1 CMakeFiles/Makefile2:171: recipe for target 'src/CMakeFiles/ssh_shared.dir/all' failed make[1]: *** [src/CMakeFiles/ssh_shared.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2
- With -DCMAKE_BUILD_TYPE=Release, error is
/home/thai/test/libssh/libssh-0.8.5/src/connect.c: In function ‘ssh_select’: /home/thai/test/libssh/libssh-0.8.5/src/connect.c:514:7: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow] if(j != 0) ^ /home/thai/test/libssh/libssh-0.8.5/src/connect.c:514:7: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow] /home/thai/test/libssh/libssh-0.8.5/src/connect.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-gnu-zero-variadic-macro-arguments’ cc1: some warnings being treated as errors src/CMakeFiles/ssh_shared.dir/build.make:278: recipe for target 'src/CMakeFiles/ssh_shared.dir/connect.c.o' failed make[2]: *** [src/CMakeFiles/ssh_shared.dir/connect.c.o] Error 1 CMakeFiles/Makefile2:171: recipe for target 'src/CMakeFiles/ssh_shared.dir/all' failed make[1]: *** [src/CMakeFiles/ssh_shared.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2