Successful build.
Build failure:
[ 48%] Building CXX object CMakeFiles/Telegram.dir/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/media/media_clip_ffmpeg.o
[ 49%] Building CXX object CMakeFiles/Telegram.dir/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/auth_key.o
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/auth_key.cpp: In function 'void MTP::aesCtrEncrypt(void*, uint32, const void*, MTP::CTRState*)':
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/auth_key.cpp:54:2: error: 'AES_ctr128_encrypt' was not declared in this scope
AES_ctr128_encrypt(static_cast<const uchar*>(data), static_cast<uchar*>(data), len, &aes, state->ivec, state->ecount, &state->num);
^~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/auth_key.cpp:54:2: note: suggested alternative: 'AES_cfb128_encrypt'
AES_ctr128_encrypt(static_cast<const uchar*>(data), static_cast<uchar*>(data), len, &aes, state->ivec, state->ecount, &state->num);
^~~~~~~~~~~~~~~~~~
AES_cfb128_encrypt
make[2]: *** [CMakeFiles/Telegram.dir/build.make:3026: CMakeFiles/Telegram.dir/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/auth_key.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 48%] Building CXX object CMakeFiles/Telegram.dir/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/media/media_clip_qtgif.o
[ 49%] Building CXX object CMakeFiles/Telegram.dir/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.o
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:224:9: error: field 'bnPower' has incomplete type 'BIGNUM {aka bignum_st}'
BIGNUM bnPower, bnModul, bn_g, bn_g_a, bnResult, bnTemp;
^~~~~~~
In file included from /usr/include/openssl/bn.h:32:0,
from /builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:23:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'BIGNUM {aka struct bignum_st}'
typedef struct bignum_st BIGNUM;
^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:224:18: error: field 'bnModul' has incomplete type 'BIGNUM {aka bignum_st}'
BIGNUM bnPower, bnModul, bn_g, bn_g_a, bnResult, bnTemp;
^~~~~~~
In file included from /usr/include/openssl/bn.h:32:0,
from /builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:23:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'BIGNUM {aka struct bignum_st}'
typedef struct bignum_st BIGNUM;
^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:224:27: error: field 'bn_g' has incomplete type 'BIGNUM {aka bignum_st}'
BIGNUM bnPower, bnModul, bn_g, bn_g_a, bnResult, bnTemp;
^~~~
In file included from /usr/include/openssl/bn.h:32:0,
from /builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:23:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'BIGNUM {aka struct bignum_st}'
typedef struct bignum_st BIGNUM;
^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:224:33: error: field 'bn_g_a' has incomplete type 'BIGNUM {aka bignum_st}'
BIGNUM bnPower, bnModul, bn_g, bn_g_a, bnResult, bnTemp;
^~~~~~
In file included from /usr/include/openssl/bn.h:32:0,
from /builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:23:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'BIGNUM {aka struct bignum_st}'
typedef struct bignum_st BIGNUM;
^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:224:41: error: field 'bnResult' has incomplete type 'BIGNUM {aka bignum_st}'
BIGNUM bnPower, bnModul, bn_g, bn_g_a, bnResult, bnTemp;
^~~~~~~~
In file included from /usr/include/openssl/bn.h:32:0,
from /builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:23:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'BIGNUM {aka struct bignum_st}'
typedef struct bignum_st BIGNUM;
^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:224:51: error: field 'bnTemp' has incomplete type 'BIGNUM {aka bignum_st}'
BIGNUM bnPower, bnModul, bn_g, bn_g_a, bnResult, bnTemp;
^~~~~~
In file included from /usr/include/openssl/bn.h:32:0,
from /builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:23:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'BIGNUM {aka struct bignum_st}'
typedef struct bignum_st BIGNUM;
^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp: In constructor 'MTP::internal::{anonymous}::BigNumCounter::BigNumCounter()':
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:206:3: error: 'BN_init' was not declared in this scope
BN_init(&bnPower);
^~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:206:3: note: suggested alternative: 'BN_print'
BN_init(&bnPower);
^~~~~~~
BN_print
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp: At global scope:
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:320:9: error: field 'bnPrime' has incomplete type 'BIGNUM {aka bignum_st}'
BIGNUM bnPrime;
^~~~~~~
In file included from /usr/include/openssl/bn.h:32:0,
from /builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:23:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of 'BIGNUM {aka struct bignum_st}'
typedef struct bignum_st BIGNUM;
^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp: In constructor 'MTP::internal::{anonymous}::BigNumPrimeTest::BigNumPrimeTest()':
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:312:3: error: 'BN_init' was not declared in this scope
BN_init(&bnPrime);
^~~~~~~
/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.cpp:312:3: note: suggested alternative: 'BN_print'
BN_init(&bnPrime);
^~~~~~~
BN_print
make[2]: *** [CMakeFiles/Telegram.dir/build.make:3052: CMakeFiles/Telegram.dir/builddir/build/BUILD/tdesktop-1.0.27/Telegram/SourceFiles/mtproto/connection.o] Error 1
Operating system: Fedora 26+
Version of Telegram Desktop: 1.0.27
Used theme: n/a
@xvitaly Since Telegram Desktop is using OpenSSL 1.0.1, you have to adjust the code given to the instructions from @stek29 to get a successful build.
@auchri You want to use legacy 1.0.1 branch forever? Lots of Linux distributions use 1.1.0 as default.
@xvitaly Of course not.
@auchri Then I think it need to be fixed.
@xvitaly Porting to OpenSSL 1.1 while supporting <=1.0.2 won't be easy -- A lot of stuff in API changed, and the main issue will be threads. I highly doubt it's going to be a priority, so I guess you'd have to do it on your own, and submit a PR.
Indeed it might not be easy. That said, could this bug kept open until that's solved, as this is really a bug (at least, I hope you see it that way…)?
Please reopen this bug because Telegram Desktop really doesn't support the latest OpenSSL 1.1.0.
I guess it's not a top priority, but something that'll be likely merged if done properly
Most helpful comment
@auchri Then I think it need to be fixed.