sergeyklay / pcloud-console-client

A simple console client for pCloud cloud storage.
https://pcloud.com
BSD 3-Clause "New" or "Revised" License
23 stars 10 forks source link

Building with OpenSSL fails #94

Open AWhetter opened 3 years ago

AWhetter commented 3 years ago

I am building with -DPCLOUD_TLS_IMPL:STRING='openssl' but I get the following build errors:

/home/ashley/workspace/pcloud-console-client/src/pcloud-console-client-3.0.0-a2/src/psync/pssl-openssl.c: In function ‘RSA_memory_lock_fixed’:
/home/ashley/workspace/pcloud-console-client/src/pcloud-console-client-3.0.0-a2/src/psync/pssl-openssl.c:434:8: error: invalid use of incomplete typedef ‘RSA’ {aka ‘struct rsa_st’}
  434 |   if (r->d==NULL)
      |        ^~
...
/home/ashley/workspace/pcloud-console-client/src/pcloud-console-client-3.0.0-a2/src/psync/pssl-openssl.c:442:12: error: invalid application of ‘sizeof’ to incomplete type ‘BIGNUM’ {aka ‘struct bignum_st’}
  442 |   k=sizeof(BIGNUM)*6;
      |            ^~~~~~
...
In file included from /home/ashley/workspace/pcloud-console-client/src/pcloud-console-client-3.0.0-a2/src/psync/pssl-openssl.c:38:
/home/ashley/workspace/pcloud-console-client/src/pcloud-console-client-3.0.0-a2/src/psync/pssl-openssl.c:448:12: error: ‘RSA_F_RSA_MEMORY_LOCK’ undeclared (first use in this function)
  448 |     RSAerr(RSA_F_RSA_MEMORY_LOCK, ERR_R_MALLOC_FAILURE);
      |            ^~~~~~~~~~~~~~~~~~~~~

I'm using GCC 11.1.0 on Arch Linux. This is using the openssl/1.1.1k built by conan.