licq-im / licq

An instant messaging client for UNIX
http://www.licq.org/
16 stars 4 forks source link

licq fails to build with openssl-1.1 (new API) #51

Open Polynomial-C opened 8 years ago

Polynomial-C commented 8 years ago
[  2%] Building CXX object src/CMakeFiles/licq.dir/licq.cpp.o
cd /var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2_build/src && /usr/bin/x86_64-pc-linux-gnu-g++  -D_REENTRANT -I/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2_build/include -I/var/tmp/portage/net-im/licq
-1.8.2/work/licq-1.8.2/include -I/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src -I/usr/include/gpgme   -DNDEBUG -march=native -mtune=native -O2 -pipe -pthread    -Wall -Wextra -o CMakeFiles/licq.dir/licq
.cpp.o -c /var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp: In function ‘DH* get_dh512()’:
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:109:11: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
         dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL);
           ^
In file included from /usr/include/openssl/crypto.h:31:0,
                 from /usr/include/openssl/comp.h:16,
                 from /usr/include/openssl/ssl.h:47,
                 from /var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:85:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:109:53: error: ‘BN_bin2bn’ was not declared in this scope
         dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL);
                                                     ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:110:11: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
         dh->g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL);
           ^
In file included from /usr/include/openssl/crypto.h:31:0,
                 from /usr/include/openssl/comp.h:16,
                 from /usr/include/openssl/ssl.h:47,
                 from /var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:85:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:111:16: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
         if ((dh->p == NULL) || (dh->g == NULL))
                ^
In file included from /usr/include/openssl/crypto.h:31:0,
                 from /usr/include/openssl/comp.h:16,
                 from /usr/include/openssl/ssl.h:47,
                 from /var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:85:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:111:35: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
         if ((dh->p == NULL) || (dh->g == NULL))
                                   ^
In file included from /usr/include/openssl/crypto.h:31:0,
                 from /usr/include/openssl/comp.h:16,
                 from /usr/include/openssl/ssl.h:47,
                 from /var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:85:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp: In member function ‘bool CLicq::Init(int, char**)’:
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:612:20: error: ‘SSL_library_init’ was not declared in this scope
   SSL_library_init();
                    ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:613:39: error: ‘TLSv1_method’ was not declared in this scope
   gSSL_CTX = SSL_CTX_new(TLSv1_method());
                                       ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:624:26: error: ‘SSL_load_error_strings’ was not declared in this scope
   SSL_load_error_strings();
                          ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:437:31: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
           fgets(szKey, 32, fs);
                               ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:491:28: warning: ignoring return value of ‘int ftruncate(int, __off_t)’, declared with attribute warn_unused_result [-Wunused-result]
       ftruncate(pidFile, 0);
                            ^
/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2/src/licq.cpp:493:53: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
       write(pidFile, szKey, (size > 32 ? 32 : size));
                                                     ^
make[2]: *** [src/CMakeFiles/licq.dir/build.make:255: src/CMakeFiles/licq.dir/licq.cpp.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2_build'
make[1]: *** [CMakeFiles/Makefile2:430: src/CMakeFiles/licq.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/net-im/licq-1.8.2/work/licq-1.8.2_build'
make: *** [Makefile:128: all] Error 2

See also openssl-1.1 API changes

Polynomial-C commented 8 years ago

Please also note that openssl-1.1 can be compiled with three different compatibility levels:

--api=0.9.8, --api=1.0.0 and --api=1.1.0.

The important information here is that with --api=1.1.0 all interfaces seen as deprecated by openssl developers won't be available anymore. So please carefully check your code for usage of deprecated interfaces.