tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.23k stars 1.47k forks source link

Android build fails: 'algorithm' file not found #2783

Closed jpage4500 closed 9 months ago

jpage4500 commented 9 months ago

I've built the tdlib in the past before but I'm not able to today and was hoping someone could give some advice.

I tried with my own Android SDK but to keep it simple I also just followed the instructions here and got the same error: https://github.com/tdlib/td/blob/master/example/android/README.md

I'm using a Macbook Pro M1

/Users/jpage/working/external/td/tdutils/generate/generate_mime_types_gperf.cpp:7:10: fatal error:
      'algorithm' file not found
#include <algorithm>
         ^~~~~~~~~~~
1 error generated.
make[3]: *** [td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/generate_mime_types_gperf.cpp.o] Error 1
make[2]: *** [td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/all] Error 2
make[1]: *** [td/CMakeFiles/prepare_cross_compiling.dir/rule] Error 2
make: *** [prepare_cross_compiling] Error 2

Full output here:

~/working/external/td/example/android$ java --version
openjdk 21.0.1 2023-10-17
OpenJDK Runtime Environment Homebrew (build 21.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.1, mixed mode, sharing)
~/working/external/td/example/android$ ./fetch-sdk.sh
Error: file or directory "SDK" already exists. Delete it manually to proceed.
~/working/external/td/example/android$ ls
AddIntDef.php        SDK                  build-native         build-x86_64         tdlib
CMakeLists.txt       annotation-1.4.0.jar build-openssl.sh     check-environment.sh third-party
Dockerfile           build-arm64-v8a      build-tdlib.sh       fetch-sdk.sh
README.md            build-armeabi-v7a    build-x86            org
~/working/external/td/example/android$ rm -rf SDK
~/working/external/td/example/android$ ./fetch-sdk.sh
Downloading SDK Manager...
Installing required SDK tools...
Warning: IO exception while downloading manifest
Warning: IO exception while downloading manifest
Warning: Still waiting for package manifests to be fetched remotely.
~/working/external/td/example/android$ ./build-openssl.sh
Error: file or directory "third-party/openssl" already exists. Delete it manually to proceed.
~/working/external/td/example/android$ ls
AddIntDef.php        SDK                  build-native         build-x86_64         tdlib
CMakeLists.txt       annotation-1.4.0.jar build-openssl.sh     check-environment.sh third-party
Dockerfile           build-arm64-v8a      build-tdlib.sh       fetch-sdk.sh
README.md            build-armeabi-v7a    build-x86            org
~/working/external/td/example/android$ rm -rf third-party/
~/working/external/td/example/android$ ./build-openssl.sh
Downloading OpenSSL sources...
Configuring OpenSSL version 1.1.1t (0x1010114fL) for android-arm64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
llvm-arllvm-ar: : warning: warning: creating creating libssl.a
llvm-ar: apps/libapps.awarning:
creating test/libtestutil.a
llvm-ar: warning: creating libcrypto.a
rm -f apps/libapps.a libcrypto.a libssl.a test/libtestutil.a
rm -f *.map
rm -f apps/openssl fuzz/asn1-test fuzz/asn1parse-test fuzz/bignum-test fuzz/bndiv-test fuzz/client-test fuzz/cms-test fuzz/conf-test fuzz/crl-test fuzz/ct-test fuzz/server-test fuzz/x509-test test/aborttest test/afalgtest test/asn1_decode_test test/asn1_encode_test test/asn1_internal_test test/asn1_string_table_test test/asn1_time_test test/asynciotest test/asynctest test/bad_dtls_test test/bftest test/bio_callback_test test/bio_enc_test test/bio_memleak_test test/bioprinttest test/bntest test/buildtest_c_aes test/buildtest_c_asn1 test/buildtest_c_asn1t test/buildtest_c_async test/buildtest_c_bio test/buildtest_c_blowfish test/buildtest_c_bn test/buildtest_c_buffer test/buildtest_c_camellia test/buildtest_c_cast test/buildtest_c_cmac test/buildtest_c_cms test/buildtest_c_comp test/buildtest_c_conf test/buildtest_c_conf_api test/buildtest_c_crypto test/buildtest_c_ct test/buildtest_c_des test/buildtest_c_dh test/buildtest_c_dsa test/buildtest_c_dtls1 test/buildtest_c_e_os2 test/buildtest_c_ebcdic test/buildtest_c_ec test/buildtest_c_ecdh test/buildtest_c_ecdsa test/buildtest_c_engine test/buildtest_c_evp test/buildtest_c_hmac test/buildtest_c_idea test/buildtest_c_kdf test/buildtest_c_lhash test/buildtest_c_md4 test/buildtest_c_md5 test/buildtest_c_mdc2 test/buildtest_c_modes test/buildtest_c_obj_mac test/buildtest_c_objects test/buildtest_c_ocsp test/buildtest_c_opensslv test/buildtest_c_ossl_typ test/buildtest_c_pem test/buildtest_c_pem2 test/buildtest_c_pkcs12 test/buildtest_c_pkcs7 test/buildtest_c_rand test/buildtest_c_rand_drbg test/buildtest_c_rc2 test/buildtest_c_rc4 test/buildtest_c_ripemd test/buildtest_c_rsa test/buildtest_c_safestack test/buildtest_c_seed test/buildtest_c_sha test/buildtest_c_srp test/buildtest_c_srtp test/buildtest_c_ssl test/buildtest_c_ssl2 test/buildtest_c_stack test/buildtest_c_store test/buildtest_c_symhacks test/buildtest_c_tls1 test/buildtest_c_ts test/buildtest_c_txt_db test/buildtest_c_ui test/buildtest_c_whrlpool test/buildtest_c_x509 test/buildtest_c_x509_vfy test/buildtest_c_x509v3 test/casttest test/chacha_internal_test test/cipher_overhead_test test/cipherbytes_test test/cipherlist_test test/ciphername_test test/clienthellotest test/cmactest test/cmsapitest test/conf_include_test test/constant_time_test test/crltest test/ct_test test/ctype_internal_test test/curve448_internal_test test/d2i_test test/danetest test/destest test/dhtest test/drbg_cavs_test test/drbgtest test/dsa_no_digest_size_test test/dsatest test/dtls_mtu_test test/dtlstest test/dtlsv1listentest test/ec_internal_test test/ecdsatest test/ecstresstest test/ectest test/enginetest test/errtest test/evp_extra_test test/evp_test test/exdatatest test/exptest test/fatalerrtest test/gmdifftest test/gosttest test/hmactest test/ideatest test/igetest test/lhash_test test/md2test test/mdc2_internal_test test/mdc2test test/memleaktest test/modes_internal_test test/ocspapitest test/packettest test/pbelutest test/pemtest test/pkey_meth_kdf_test test/pkey_meth_test test/poly1305_internal_test test/rc2test test/rc4test test/rc5test test/rdrand_sanitytest test/recordlentest test/rsa_complex test/rsa_mp_test test/rsa_test test/sanitytest test/secmemtest test/servername_test test/siphash_internal_test test/sm2_internal_test test/sm4_internal_test test/srptest test/ssl_cert_table_internal_test test/ssl_ctx_test test/ssl_test test/ssl_test_ctx_test test/sslapitest test/sslbuffertest test/sslcorrupttest test/ssltest_old test/stack_test test/sysdefaulttest test/test_test test/threadstest test/time_offset_test test/tls13ccstest test/tls13encryptiontest test/uitest test/v3ext test/v3nametest test/verify_extra_test test/versions test/wpackettest test/x509_check_cert_pkey_test test/x509_dup_cert_test test/x509_internal_test test/x509_time_test test/x509aux   apps/CA.pl apps/tsget.pl tools/c_rehash util/shlib_wrap.sh
rm -f include/crypto/bn_conf.h include/crypto/dso_conf.h include/openssl/opensslconf.h apps/CA.pl apps/progs.h apps/tsget.pl crypto/aes/aesv8-armx.S crypto/aes/vpaes-armv8.S crypto/arm64cpuid.S crypto/bn/armv8-mont.S crypto/buildinf.h crypto/chacha/chacha-armv8.S crypto/ec/ecp_nistz256-armv8.S crypto/modes/ghashv8-armx.S crypto/poly1305/poly1305-armv8.S crypto/sha/keccak1600-armv8.S crypto/sha/sha1-armv8.S crypto/sha/sha256-armv8.S crypto/sha/sha512-armv8.S test/buildtest_aes.c test/buildtest_asn1.c test/buildtest_asn1t.c test/buildtest_async.c test/buildtest_bio.c test/buildtest_blowfish.c test/buildtest_bn.c test/buildtest_buffer.c test/buildtest_camellia.c test/buildtest_cast.c test/buildtest_cmac.c test/buildtest_cms.c test/buildtest_comp.c test/buildtest_conf.c test/buildtest_conf_api.c test/buildtest_crypto.c test/buildtest_ct.c test/buildtest_des.c test/buildtest_dh.c test/buildtest_dsa.c test/buildtest_dtls1.c test/buildtest_e_os2.c test/buildtest_ebcdic.c test/buildtest_ec.c test/buildtest_ecdh.c test/buildtest_ecdsa.c test/buildtest_engine.c test/buildtest_evp.c test/buildtest_hmac.c test/buildtest_idea.c test/buildtest_kdf.c test/buildtest_lhash.c test/buildtest_md4.c test/buildtest_md5.c test/buildtest_mdc2.c test/buildtest_modes.c test/buildtest_obj_mac.c test/buildtest_objects.c test/buildtest_ocsp.c test/buildtest_opensslv.c test/buildtest_ossl_typ.c test/buildtest_pem.c test/buildtest_pem2.c test/buildtest_pkcs12.c test/buildtest_pkcs7.c test/buildtest_rand.c test/buildtest_rand_drbg.c test/buildtest_rc2.c test/buildtest_rc4.c test/buildtest_ripemd.c test/buildtest_rsa.c test/buildtest_safestack.c test/buildtest_seed.c test/buildtest_sha.c test/buildtest_srp.c test/buildtest_srtp.c test/buildtest_ssl.c test/buildtest_ssl2.c test/buildtest_stack.c test/buildtest_store.c test/buildtest_symhacks.c test/buildtest_tls1.c test/buildtest_ts.c test/buildtest_txt_db.c test/buildtest_ui.c test/buildtest_whrlpool.c test/buildtest_x509.c test/buildtest_x509_vfy.c test/buildtest_x509v3.c tools/c_rehash util/shlib_wrap.sh
rm -f `find . -name '*.d' \! -name '.*' \! -type d -print`
rm -f `find . -name '*.o' \! -name '.*' \! -type d -print`
rm -f core
rm -f tags TAGS doc-nits
rm -f -r test/test-runs
rm -f openssl.pc libcrypto.pc libssl.pc
rm -f `find . -type l \! -name '.*' -print`
rm -f configdata.pm
rm -f Makefile
Configuring OpenSSL version 1.1.1t (0x1010114fL) for android-arm
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
llvm-ar: warning: creating apps/libapps.a
llvm-ar: warning: creating libssl.a
llvm-ar: warning: creating test/libtestutil.a
llvm-ar: warning: creating libcrypto.a
rm -f apps/libapps.a libcrypto.a libssl.a test/libtestutil.a
rm -f *.map
rm -f apps/openssl fuzz/asn1-test fuzz/asn1parse-test fuzz/bignum-test fuzz/bndiv-test fuzz/client-test fuzz/cms-test fuzz/conf-test fuzz/crl-test fuzz/ct-test fuzz/server-test fuzz/x509-test test/aborttest test/afalgtest test/asn1_decode_test test/asn1_encode_test test/asn1_internal_test test/asn1_string_table_test test/asn1_time_test test/asynciotest test/asynctest test/bad_dtls_test test/bftest test/bio_callback_test test/bio_enc_test test/bio_memleak_test test/bioprinttest test/bntest test/buildtest_c_aes test/buildtest_c_asn1 test/buildtest_c_asn1t test/buildtest_c_async test/buildtest_c_bio test/buildtest_c_blowfish test/buildtest_c_bn test/buildtest_c_buffer test/buildtest_c_camellia test/buildtest_c_cast test/buildtest_c_cmac test/buildtest_c_cms test/buildtest_c_comp test/buildtest_c_conf test/buildtest_c_conf_api test/buildtest_c_crypto test/buildtest_c_ct test/buildtest_c_des test/buildtest_c_dh test/buildtest_c_dsa test/buildtest_c_dtls1 test/buildtest_c_e_os2 test/buildtest_c_ebcdic test/buildtest_c_ec test/buildtest_c_ecdh test/buildtest_c_ecdsa test/buildtest_c_engine test/buildtest_c_evp test/buildtest_c_hmac test/buildtest_c_idea test/buildtest_c_kdf test/buildtest_c_lhash test/buildtest_c_md4 test/buildtest_c_md5 test/buildtest_c_mdc2 test/buildtest_c_modes test/buildtest_c_obj_mac test/buildtest_c_objects test/buildtest_c_ocsp test/buildtest_c_opensslv test/buildtest_c_ossl_typ test/buildtest_c_pem test/buildtest_c_pem2 test/buildtest_c_pkcs12 test/buildtest_c_pkcs7 test/buildtest_c_rand test/buildtest_c_rand_drbg test/buildtest_c_rc2 test/buildtest_c_rc4 test/buildtest_c_ripemd test/buildtest_c_rsa test/buildtest_c_safestack test/buildtest_c_seed test/buildtest_c_sha test/buildtest_c_srp test/buildtest_c_srtp test/buildtest_c_ssl test/buildtest_c_ssl2 test/buildtest_c_stack test/buildtest_c_store test/buildtest_c_symhacks test/buildtest_c_tls1 test/buildtest_c_ts test/buildtest_c_txt_db test/buildtest_c_ui test/buildtest_c_whrlpool test/buildtest_c_x509 test/buildtest_c_x509_vfy test/buildtest_c_x509v3 test/casttest test/chacha_internal_test test/cipher_overhead_test test/cipherbytes_test test/cipherlist_test test/ciphername_test test/clienthellotest test/cmactest test/cmsapitest test/conf_include_test test/constant_time_test test/crltest test/ct_test test/ctype_internal_test test/curve448_internal_test test/d2i_test test/danetest test/destest test/dhtest test/drbg_cavs_test test/drbgtest test/dsa_no_digest_size_test test/dsatest test/dtls_mtu_test test/dtlstest test/dtlsv1listentest test/ec_internal_test test/ecdsatest test/ecstresstest test/ectest test/enginetest test/errtest test/evp_extra_test test/evp_test test/exdatatest test/exptest test/fatalerrtest test/gmdifftest test/gosttest test/hmactest test/ideatest test/igetest test/lhash_test test/md2test test/mdc2_internal_test test/mdc2test test/memleaktest test/modes_internal_test test/ocspapitest test/packettest test/pbelutest test/pemtest test/pkey_meth_kdf_test test/pkey_meth_test test/poly1305_internal_test test/rc2test test/rc4test test/rc5test test/rdrand_sanitytest test/recordlentest test/rsa_complex test/rsa_mp_test test/rsa_test test/sanitytest test/secmemtest test/servername_test test/siphash_internal_test test/sm2_internal_test test/sm4_internal_test test/srptest test/ssl_cert_table_internal_test test/ssl_ctx_test test/ssl_test test/ssl_test_ctx_test test/sslapitest test/sslbuffertest test/sslcorrupttest test/ssltest_old test/stack_test test/sysdefaulttest test/test_test test/threadstest test/time_offset_test test/tls13ccstest test/tls13encryptiontest test/uitest test/v3ext test/v3nametest test/verify_extra_test test/versions test/wpackettest test/x509_check_cert_pkey_test test/x509_dup_cert_test test/x509_internal_test test/x509_time_test test/x509aux   apps/CA.pl apps/tsget.pl tools/c_rehash util/shlib_wrap.sh
rm -f include/crypto/bn_conf.h include/crypto/dso_conf.h include/openssl/opensslconf.h apps/CA.pl apps/progs.h apps/tsget.pl crypto/aes/aes-armv4.S crypto/aes/aesv8-armx.S crypto/aes/bsaes-armv7.S crypto/armv4cpuid.S crypto/bn/armv4-gf2m.S crypto/bn/armv4-mont.S crypto/buildinf.h crypto/chacha/chacha-armv4.S crypto/ec/ecp_nistz256-armv4.S crypto/modes/ghash-armv4.S crypto/modes/ghashv8-armx.S crypto/poly1305/poly1305-armv4.S crypto/sha/keccak1600-armv4.S crypto/sha/sha1-armv4-large.S crypto/sha/sha256-armv4.S crypto/sha/sha512-armv4.S test/buildtest_aes.c test/buildtest_asn1.c test/buildtest_asn1t.c test/buildtest_async.c test/buildtest_bio.c test/buildtest_blowfish.c test/buildtest_bn.c test/buildtest_buffer.c test/buildtest_camellia.c test/buildtest_cast.c test/buildtest_cmac.c test/buildtest_cms.c test/buildtest_comp.c test/buildtest_conf.c test/buildtest_conf_api.c test/buildtest_crypto.c test/buildtest_ct.c test/buildtest_des.c test/buildtest_dh.c test/buildtest_dsa.c test/buildtest_dtls1.c test/buildtest_e_os2.c test/buildtest_ebcdic.c test/buildtest_ec.c test/buildtest_ecdh.c test/buildtest_ecdsa.c test/buildtest_engine.c test/buildtest_evp.c test/buildtest_hmac.c test/buildtest_idea.c test/buildtest_kdf.c test/buildtest_lhash.c test/buildtest_md4.c test/buildtest_md5.c test/buildtest_mdc2.c test/buildtest_modes.c test/buildtest_obj_mac.c test/buildtest_objects.c test/buildtest_ocsp.c test/buildtest_opensslv.c test/buildtest_ossl_typ.c test/buildtest_pem.c test/buildtest_pem2.c test/buildtest_pkcs12.c test/buildtest_pkcs7.c test/buildtest_rand.c test/buildtest_rand_drbg.c test/buildtest_rc2.c test/buildtest_rc4.c test/buildtest_ripemd.c test/buildtest_rsa.c test/buildtest_safestack.c test/buildtest_seed.c test/buildtest_sha.c test/buildtest_srp.c test/buildtest_srtp.c test/buildtest_ssl.c test/buildtest_ssl2.c test/buildtest_stack.c test/buildtest_store.c test/buildtest_symhacks.c test/buildtest_tls1.c test/buildtest_ts.c test/buildtest_txt_db.c test/buildtest_ui.c test/buildtest_whrlpool.c test/buildtest_x509.c test/buildtest_x509_vfy.c test/buildtest_x509v3.c tools/c_rehash util/shlib_wrap.sh
rm -f `find . -name '*.d' \! -name '.*' \! -type d -print`
rm -f `find . -name '*.o' \! -name '.*' \! -type d -print`
rm -f core
rm -f tags TAGS doc-nits
rm -f -r test/test-runs
rm -f openssl.pc libcrypto.pc libssl.pc
rm -f `find . -type l \! -name '.*' -print`
rm -f configdata.pm
rm -f Makefile
Configuring OpenSSL version 1.1.1t (0x1010114fL) for android-x86_64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
llvm-ar: warning: creating apps/libapps.a
llvm-arllvm-ar: : warning: warning: creating creating libssl.atest/libtestutil.a

llvm-ar: warning: creating libcrypto.a
rm -f apps/libapps.a libcrypto.a libssl.a test/libtestutil.a
rm -f *.map
rm -f apps/openssl fuzz/asn1-test fuzz/asn1parse-test fuzz/bignum-test fuzz/bndiv-test fuzz/client-test fuzz/cms-test fuzz/conf-test fuzz/crl-test fuzz/ct-test fuzz/server-test fuzz/x509-test test/aborttest test/afalgtest test/asn1_decode_test test/asn1_encode_test test/asn1_internal_test test/asn1_string_table_test test/asn1_time_test test/asynciotest test/asynctest test/bad_dtls_test test/bftest test/bio_callback_test test/bio_enc_test test/bio_memleak_test test/bioprinttest test/bntest test/buildtest_c_aes test/buildtest_c_asn1 test/buildtest_c_asn1t test/buildtest_c_async test/buildtest_c_bio test/buildtest_c_blowfish test/buildtest_c_bn test/buildtest_c_buffer test/buildtest_c_camellia test/buildtest_c_cast test/buildtest_c_cmac test/buildtest_c_cms test/buildtest_c_comp test/buildtest_c_conf test/buildtest_c_conf_api test/buildtest_c_crypto test/buildtest_c_ct test/buildtest_c_des test/buildtest_c_dh test/buildtest_c_dsa test/buildtest_c_dtls1 test/buildtest_c_e_os2 test/buildtest_c_ebcdic test/buildtest_c_ec test/buildtest_c_ecdh test/buildtest_c_ecdsa test/buildtest_c_engine test/buildtest_c_evp test/buildtest_c_hmac test/buildtest_c_idea test/buildtest_c_kdf test/buildtest_c_lhash test/buildtest_c_md4 test/buildtest_c_md5 test/buildtest_c_mdc2 test/buildtest_c_modes test/buildtest_c_obj_mac test/buildtest_c_objects test/buildtest_c_ocsp test/buildtest_c_opensslv test/buildtest_c_ossl_typ test/buildtest_c_pem test/buildtest_c_pem2 test/buildtest_c_pkcs12 test/buildtest_c_pkcs7 test/buildtest_c_rand test/buildtest_c_rand_drbg test/buildtest_c_rc2 test/buildtest_c_rc4 test/buildtest_c_ripemd test/buildtest_c_rsa test/buildtest_c_safestack test/buildtest_c_seed test/buildtest_c_sha test/buildtest_c_srp test/buildtest_c_srtp test/buildtest_c_ssl test/buildtest_c_ssl2 test/buildtest_c_stack test/buildtest_c_store test/buildtest_c_symhacks test/buildtest_c_tls1 test/buildtest_c_ts test/buildtest_c_txt_db test/buildtest_c_ui test/buildtest_c_whrlpool test/buildtest_c_x509 test/buildtest_c_x509_vfy test/buildtest_c_x509v3 test/casttest test/chacha_internal_test test/cipher_overhead_test test/cipherbytes_test test/cipherlist_test test/ciphername_test test/clienthellotest test/cmactest test/cmsapitest test/conf_include_test test/constant_time_test test/crltest test/ct_test test/ctype_internal_test test/curve448_internal_test test/d2i_test test/danetest test/destest test/dhtest test/drbg_cavs_test test/drbgtest test/dsa_no_digest_size_test test/dsatest test/dtls_mtu_test test/dtlstest test/dtlsv1listentest test/ec_internal_test test/ecdsatest test/ecstresstest test/ectest test/enginetest test/errtest test/evp_extra_test test/evp_test test/exdatatest test/exptest test/fatalerrtest test/gmdifftest test/gosttest test/hmactest test/ideatest test/igetest test/lhash_test test/md2test test/mdc2_internal_test test/mdc2test test/memleaktest test/modes_internal_test test/ocspapitest test/packettest test/pbelutest test/pemtest test/pkey_meth_kdf_test test/pkey_meth_test test/poly1305_internal_test test/rc2test test/rc4test test/rc5test test/rdrand_sanitytest test/recordlentest test/rsa_complex test/rsa_mp_test test/rsa_test test/sanitytest test/secmemtest test/servername_test test/siphash_internal_test test/sm2_internal_test test/sm4_internal_test test/srptest test/ssl_cert_table_internal_test test/ssl_ctx_test test/ssl_test test/ssl_test_ctx_test test/sslapitest test/sslbuffertest test/sslcorrupttest test/ssltest_old test/stack_test test/sysdefaulttest test/test_test test/threadstest test/time_offset_test test/tls13ccstest test/tls13encryptiontest test/uitest test/v3ext test/v3nametest test/verify_extra_test test/versions test/wpackettest test/x509_check_cert_pkey_test test/x509_dup_cert_test test/x509_internal_test test/x509_time_test test/x509aux   apps/CA.pl apps/tsget.pl tools/c_rehash util/shlib_wrap.sh
rm -f include/crypto/bn_conf.h include/crypto/dso_conf.h include/openssl/opensslconf.h apps/CA.pl apps/progs.h apps/tsget.pl crypto/aes/aesni-mb-x86_64.s crypto/aes/aesni-sha1-x86_64.s crypto/aes/aesni-sha256-x86_64.s crypto/aes/aesni-x86_64.s crypto/aes/vpaes-x86_64.s crypto/bn/rsaz-avx2.s crypto/bn/rsaz-x86_64.s crypto/bn/x86_64-gf2m.s crypto/bn/x86_64-mont.s crypto/bn/x86_64-mont5.s crypto/buildinf.h crypto/camellia/cmll-x86_64.s crypto/chacha/chacha-x86_64.s crypto/ec/ecp_nistz256-x86_64.s crypto/ec/x25519-x86_64.s crypto/md5/md5-x86_64.s crypto/modes/aesni-gcm-x86_64.s crypto/modes/ghash-x86_64.s crypto/poly1305/poly1305-x86_64.s crypto/rc4/rc4-md5-x86_64.s crypto/rc4/rc4-x86_64.s crypto/sha/keccak1600-x86_64.s crypto/sha/sha1-mb-x86_64.s crypto/sha/sha1-x86_64.s crypto/sha/sha256-mb-x86_64.s crypto/sha/sha256-x86_64.s crypto/sha/sha512-x86_64.s crypto/whrlpool/wp-x86_64.s crypto/x86_64cpuid.s engines/e_padlock-x86_64.s test/buildtest_aes.c test/buildtest_asn1.c test/buildtest_asn1t.c test/buildtest_async.c test/buildtest_bio.c test/buildtest_blowfish.c test/buildtest_bn.c test/buildtest_buffer.c test/buildtest_camellia.c test/buildtest_cast.c test/buildtest_cmac.c test/buildtest_cms.c test/buildtest_comp.c test/buildtest_conf.c test/buildtest_conf_api.c test/buildtest_crypto.c test/buildtest_ct.c test/buildtest_des.c test/buildtest_dh.c test/buildtest_dsa.c test/buildtest_dtls1.c test/buildtest_e_os2.c test/buildtest_ebcdic.c test/buildtest_ec.c test/buildtest_ecdh.c test/buildtest_ecdsa.c test/buildtest_engine.c test/buildtest_evp.c test/buildtest_hmac.c test/buildtest_idea.c test/buildtest_kdf.c test/buildtest_lhash.c test/buildtest_md4.c test/buildtest_md5.c test/buildtest_mdc2.c test/buildtest_modes.c test/buildtest_obj_mac.c test/buildtest_objects.c test/buildtest_ocsp.c test/buildtest_opensslv.c test/buildtest_ossl_typ.c test/buildtest_pem.c test/buildtest_pem2.c test/buildtest_pkcs12.c test/buildtest_pkcs7.c test/buildtest_rand.c test/buildtest_rand_drbg.c test/buildtest_rc2.c test/buildtest_rc4.c test/buildtest_ripemd.c test/buildtest_rsa.c test/buildtest_safestack.c test/buildtest_seed.c test/buildtest_sha.c test/buildtest_srp.c test/buildtest_srtp.c test/buildtest_ssl.c test/buildtest_ssl2.c test/buildtest_stack.c test/buildtest_store.c test/buildtest_symhacks.c test/buildtest_tls1.c test/buildtest_ts.c test/buildtest_txt_db.c test/buildtest_ui.c test/buildtest_whrlpool.c test/buildtest_x509.c test/buildtest_x509_vfy.c test/buildtest_x509v3.c tools/c_rehash util/shlib_wrap.sh
rm -f `find . -name '*.d' \! -name '.*' \! -type d -print`
rm -f `find . -name '*.o' \! -name '.*' \! -type d -print`
rm -f core
rm -f tags TAGS doc-nits
rm -f -r test/test-runs
rm -f openssl.pc libcrypto.pc libssl.pc
rm -f `find . -type l \! -name '.*' -print`
rm -f configdata.pm
rm -f Makefile
Configuring OpenSSL version 1.1.1t (0x1010114fL) for android-x86
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
llvm-ar: warning: creating apps/libapps.a
llvm-arllvm-ar: : warning: warning: creating creating libssl.atest/libtestutil.a

llvm-ar: warning: creating libcrypto.a
rm -f apps/libapps.a libcrypto.a libssl.a test/libtestutil.a
rm -f *.map
rm -f apps/openssl fuzz/asn1-test fuzz/asn1parse-test fuzz/bignum-test fuzz/bndiv-test fuzz/client-test fuzz/cms-test fuzz/conf-test fuzz/crl-test fuzz/ct-test fuzz/server-test fuzz/x509-test test/aborttest test/afalgtest test/asn1_decode_test test/asn1_encode_test test/asn1_internal_test test/asn1_string_table_test test/asn1_time_test test/asynciotest test/asynctest test/bad_dtls_test test/bftest test/bio_callback_test test/bio_enc_test test/bio_memleak_test test/bioprinttest test/bntest test/buildtest_c_aes test/buildtest_c_asn1 test/buildtest_c_asn1t test/buildtest_c_async test/buildtest_c_bio test/buildtest_c_blowfish test/buildtest_c_bn test/buildtest_c_buffer test/buildtest_c_camellia test/buildtest_c_cast test/buildtest_c_cmac test/buildtest_c_cms test/buildtest_c_comp test/buildtest_c_conf test/buildtest_c_conf_api test/buildtest_c_crypto test/buildtest_c_ct test/buildtest_c_des test/buildtest_c_dh test/buildtest_c_dsa test/buildtest_c_dtls1 test/buildtest_c_e_os2 test/buildtest_c_ebcdic test/buildtest_c_ec test/buildtest_c_ecdh test/buildtest_c_ecdsa test/buildtest_c_engine test/buildtest_c_evp test/buildtest_c_hmac test/buildtest_c_idea test/buildtest_c_kdf test/buildtest_c_lhash test/buildtest_c_md4 test/buildtest_c_md5 test/buildtest_c_mdc2 test/buildtest_c_modes test/buildtest_c_obj_mac test/buildtest_c_objects test/buildtest_c_ocsp test/buildtest_c_opensslv test/buildtest_c_ossl_typ test/buildtest_c_pem test/buildtest_c_pem2 test/buildtest_c_pkcs12 test/buildtest_c_pkcs7 test/buildtest_c_rand test/buildtest_c_rand_drbg test/buildtest_c_rc2 test/buildtest_c_rc4 test/buildtest_c_ripemd test/buildtest_c_rsa test/buildtest_c_safestack test/buildtest_c_seed test/buildtest_c_sha test/buildtest_c_srp test/buildtest_c_srtp test/buildtest_c_ssl test/buildtest_c_ssl2 test/buildtest_c_stack test/buildtest_c_store test/buildtest_c_symhacks test/buildtest_c_tls1 test/buildtest_c_ts test/buildtest_c_txt_db test/buildtest_c_ui test/buildtest_c_whrlpool test/buildtest_c_x509 test/buildtest_c_x509_vfy test/buildtest_c_x509v3 test/casttest test/chacha_internal_test test/cipher_overhead_test test/cipherbytes_test test/cipherlist_test test/ciphername_test test/clienthellotest test/cmactest test/cmsapitest test/conf_include_test test/constant_time_test test/crltest test/ct_test test/ctype_internal_test test/curve448_internal_test test/d2i_test test/danetest test/destest test/dhtest test/drbg_cavs_test test/drbgtest test/dsa_no_digest_size_test test/dsatest test/dtls_mtu_test test/dtlstest test/dtlsv1listentest test/ec_internal_test test/ecdsatest test/ecstresstest test/ectest test/enginetest test/errtest test/evp_extra_test test/evp_test test/exdatatest test/exptest test/fatalerrtest test/gmdifftest test/gosttest test/hmactest test/ideatest test/igetest test/lhash_test test/md2test test/mdc2_internal_test test/mdc2test test/memleaktest test/modes_internal_test test/ocspapitest test/packettest test/pbelutest test/pemtest test/pkey_meth_kdf_test test/pkey_meth_test test/poly1305_internal_test test/rc2test test/rc4test test/rc5test test/rdrand_sanitytest test/recordlentest test/rsa_complex test/rsa_mp_test test/rsa_test test/sanitytest test/secmemtest test/servername_test test/siphash_internal_test test/sm2_internal_test test/sm4_internal_test test/srptest test/ssl_cert_table_internal_test test/ssl_ctx_test test/ssl_test test/ssl_test_ctx_test test/sslapitest test/sslbuffertest test/sslcorrupttest test/ssltest_old test/stack_test test/sysdefaulttest test/test_test test/threadstest test/time_offset_test test/tls13ccstest test/tls13encryptiontest test/uitest test/v3ext test/v3nametest test/verify_extra_test test/versions test/wpackettest test/x509_check_cert_pkey_test test/x509_dup_cert_test test/x509_internal_test test/x509_time_test test/x509aux   apps/CA.pl apps/tsget.pl tools/c_rehash util/shlib_wrap.sh
rm -f include/crypto/bn_conf.h include/crypto/dso_conf.h include/openssl/opensslconf.h apps/CA.pl apps/progs.h apps/tsget.pl crypto/aes/aesni-x86.s crypto/aes/vpaes-x86.s crypto/bf/bf-586.s crypto/bn/bn-586.s crypto/bn/co-586.s crypto/bn/x86-gf2m.s crypto/bn/x86-mont.s crypto/buildinf.h crypto/camellia/cmll-x86.s crypto/chacha/chacha-x86.s crypto/des/crypt586.s crypto/des/des-586.s crypto/ec/ecp_nistz256-x86.s crypto/md5/md5-586.s crypto/modes/ghash-x86.s crypto/poly1305/poly1305-x86.s crypto/rc4/rc4-586.s crypto/ripemd/rmd-586.s crypto/sha/sha1-586.s crypto/sha/sha256-586.s crypto/sha/sha512-586.s crypto/whrlpool/wp-mmx.s crypto/x86cpuid.s engines/e_padlock-x86.s test/buildtest_aes.c test/buildtest_asn1.c test/buildtest_asn1t.c test/buildtest_async.c test/buildtest_bio.c test/buildtest_blowfish.c test/buildtest_bn.c test/buildtest_buffer.c test/buildtest_camellia.c test/buildtest_cast.c test/buildtest_cmac.c test/buildtest_cms.c test/buildtest_comp.c test/buildtest_conf.c test/buildtest_conf_api.c test/buildtest_crypto.c test/buildtest_ct.c test/buildtest_des.c test/buildtest_dh.c test/buildtest_dsa.c test/buildtest_dtls1.c test/buildtest_e_os2.c test/buildtest_ebcdic.c test/buildtest_ec.c test/buildtest_ecdh.c test/buildtest_ecdsa.c test/buildtest_engine.c test/buildtest_evp.c test/buildtest_hmac.c test/buildtest_idea.c test/buildtest_kdf.c test/buildtest_lhash.c test/buildtest_md4.c test/buildtest_md5.c test/buildtest_mdc2.c test/buildtest_modes.c test/buildtest_obj_mac.c test/buildtest_objects.c test/buildtest_ocsp.c test/buildtest_opensslv.c test/buildtest_ossl_typ.c test/buildtest_pem.c test/buildtest_pem2.c test/buildtest_pkcs12.c test/buildtest_pkcs7.c test/buildtest_rand.c test/buildtest_rand_drbg.c test/buildtest_rc2.c test/buildtest_rc4.c test/buildtest_ripemd.c test/buildtest_rsa.c test/buildtest_safestack.c test/buildtest_seed.c test/buildtest_sha.c test/buildtest_srp.c test/buildtest_srtp.c test/buildtest_ssl.c test/buildtest_ssl2.c test/buildtest_stack.c test/buildtest_store.c test/buildtest_symhacks.c test/buildtest_tls1.c test/buildtest_ts.c test/buildtest_txt_db.c test/buildtest_ui.c test/buildtest_whrlpool.c test/buildtest_x509.c test/buildtest_x509_vfy.c test/buildtest_x509v3.c tools/c_rehash util/shlib_wrap.sh
rm -f `find . -name '*.d' \! -name '.*' \! -type d -print`
rm -f `find . -name '*.o' \! -name '.*' \! -type d -print`
rm -f core
rm -f tags TAGS doc-nits
rm -f -r test/test-runs
rm -f openssl.pc libcrypto.pc libssl.pc
rm -f `find . -type l \! -name '.*' -print`
rm -f configdata.pm
rm -f Makefile
~/working/external/td/example/android$ ./build-tdlib.sh
Downloading annotation Java package...
Generating TDLib source files...
CMake Warning at SDK/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Darwin-Initialize.cmake:303 (message):
  Ignoring CMAKE_OSX_SYSROOT value:

   /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk

  because the directory does not exist.
Call Stack (most recent call first):
  SDK/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)
  CMakeLists.txt:3 (project)

-- Could NOT find ccache (this is NOT an error)
-- Found OpenSSL: /opt/homebrew/Cellar/openssl@3/3.1.3/include /opt/homebrew/Cellar/openssl@3/3.1.3/lib/libssl.dylib;/opt/homebrew/Cellar/openssl@3/3.1.3/lib/libcrypto.dylib
-- Git state: d79bd4b69403868897496da39b773ab25c69f6af
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libz.tbd
-- Found JNI: /opt/homebrew/opt/openjdk/include;/opt/homebrew/opt/openjdk/include;/opt/homebrew/opt/openjdk/include /opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home/lib/libjawt.dylib;/opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home/lib/server/libjvm.dylib
-- Found Readline: /opt/homebrew/opt/readline/include /opt/homebrew/opt/readline/lib/libreadline.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jpage/working/external/td/example/android/build-native
[  0%] Building CXX object td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/generate_mime_types_gperf.cpp.o
/Users/jpage/working/external/td/tdutils/generate/generate_mime_types_gperf.cpp:7:10: fatal error:
      'algorithm' file not found
#include <algorithm>
         ^~~~~~~~~~~
1 error generated.
make[3]: *** [td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/generate_mime_types_gperf.cpp.o] Error 1
make[2]: *** [td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/all] Error 2
make[1]: *** [td/CMakeFiles/prepare_cross_compiling.dir/rule] Error 2
make: *** [prepare_cross_compiling] Error 2
jpage4500 commented 9 months ago

I figured this one out.. it took me a while so I'll list out what I noticed if it helps anyone else in the future (or myself the next time I try to build lol)

I noticed this in the output:

-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libz.tbd

I checked and this MacOSX13.3.sdk folder doesn't exist. My guess is last time I built this I was running OSX 13 and now it's 14. Anyway, I still had several build folders from the last time I built this library. So, I just deleted them all to really* build again from scratch and that worked (technically it's still building but I think it's working)

levlam commented 9 months ago

Yes. Generally, you need to delete all build directories and restart building from scratch if build tools or some dependencies were updated.