arqbackup / arq_restore

command-line utility for restoring from Arq backups
https://www.arqbackup.com
649 stars 129 forks source link

Semantic errors in (libssh2) crypt.c #25

Closed erikogan closed 7 years ago

erikogan commented 9 years ago

I just cloned the project and tried to build it, but I’m getting 3 errors when building (lines 129 & 141 are the other two instances):

/Users/erik/work/arq_restore/libssh2/src/crypt.c:153:5: Use of undeclared identifier 'EVP_aes_256_ctr'; did you mean 'EVP_aes_256_cbc'?

That identifier is expanded from the _libssh2_cipher_aes256ctr macro.

I don’t want to go hacking on code in a vendored library in a project I just cloned, when it’s far more likely I’m missing something simple. Any idea what that is?

erikogan commented 9 years ago

A web search (I should have done before posting) suggests that some installations of OpenSSL have aes_*_ctr while others do not, it’s not a straight boolean availability based on the version of the library.

That suggests I’m building against a different flavor of OpenSSL than you are. It’s unlikely to be the one I have installed via MacPorts (though it could be), but I wonder if this changed in OSX 10.10.

Can anyone who CAN build the targets tell me which version of OSX and OpenSSL they are using (and possibly where their OpenSSL include files reside?)

mroi commented 9 years ago

I had a similar compilation problem on OS X 10.10 and solved it with the following patch. Have not tested extensively, though. Maybe it helps you.

--- a/libssh2/include/libssh2_config.h
+++ b/libssh2/include/libssh2_config.h
@@ -32,7 +32,7 @@
 #define HAVE_ERRNO_H 1

 /* Define to 1 if you have the `EVP_aes_128_ctr' function. */
-#define HAVE_EVP_AES_128_CTR 1
+/* #undef HAVE_EVP_AES_128_CTR */

 /* Define to 1 if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H 1
arqbackup commented 7 years ago

It needs OpenSSL 1.0.2