Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue installing cryptography (due to openssl built with no-engine) #2847

Closed
skittles9823 opened this issue Sep 17, 2018 · 65 comments
Closed

Comments

@skittles9823
Copy link

I'v been trying to run a local instance of my telegram bot and I've run into some issues. Previously all I've needed to do was

pkg install clang && pkg install python-dev && pkg install postgresql-dev && pkg install libcrypt-dev

Along with pip install -r requirements.txt and all would be fine. However after updating to Android Pie and. Trying to setup my local bot I ran into this;

Collecting cryptography
  Using cached https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz
Requirement already satisfied: idna>=2.1 in /data/data/com.termux/files/usr/lib/python3.6/site-packages (from cryptography) (2.7)
Requirement already satisfied: asn1crypto>=0.21.0 in /data/data/com.termux/files/usr/lib/python3.6/site-packages (from cryptography) (0.24.0)
Requirement already satisfied: six>=1.4.1 in /data/data/com.termux/files/usr/lib/python3.6/site-packages (from cryptography) (1.11.0)
Requirement already satisfied: cffi!=1.11.3,>=1.7 in /data/data/com.termux/files/usr/lib/python3.6/site-packages (from cryptography) (1.11.5)
Requirement already satisfied: pycparser in /data/data/com.termux/files/usr/lib/python3.6/site-packages (from cffi!=1.11.3,>=1.7->cryptography) (2.18)
Installing collected packages: cryptography
  Running setup.py install for cryptography ... error
    Complete output from command /data/data/com.termux/files/usr/bin/python -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-install-89ifg1bb/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /data/data/com.termux/files/usr/tmp/pip-record-h_by88vu/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-aarch64-3.6
    creating build/lib.linux-aarch64-3.6/cryptography
    copying src/cryptography/__init__.py -> build/lib.linux-aarch64-3.6/cryptography
    copying src/cryptography/utils.py -> build/lib.linux-aarch64-3.6/cryptography
    copying src/cryptography/__about__.py -> build/lib.linux-aarch64-3.6/cryptography
    copying src/cryptography/exceptions.py -> build/lib.linux-aarch64-3.6/cryptography
    copying src/cryptography/fernet.py -> build/lib.linux-aarch64-3.6/cryptography
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat
    copying src/cryptography/hazmat/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat
    creating build/lib.linux-aarch64-3.6/cryptography/x509
    copying src/cryptography/x509/oid.py -> build/lib.linux-aarch64-3.6/cryptography/x509
    copying src/cryptography/x509/general_name.py -> build/lib.linux-aarch64-3.6/cryptography/x509
    copying src/cryptography/x509/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/x509
    copying src/cryptography/x509/extensions.py -> build/lib.linux-aarch64-3.6/cryptography/x509
    copying src/cryptography/x509/name.py -> build/lib.linux-aarch64-3.6/cryptography/x509
    copying src/cryptography/x509/base.py -> build/lib.linux-aarch64-3.6/cryptography/x509
    copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-aarch64-3.6/cryptography/x509
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat/backends
    copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends
    copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/serialization.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/mac.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat/bindings
    copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/bindings
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/backends/openssl
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/kdf
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/twofactor
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/ciphers
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/primitives/asymmetric
    creating build/lib.linux-aarch64-3.6/cryptography/hazmat/bindings/openssl
    copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/bindings/openssl
    copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/bindings/openssl
    copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-aarch64-3.6/cryptography/hazmat/bindings/openssl
    running egg_info
    writing src/cryptography.egg-info/PKG-INFO
    writing dependency_links to src/cryptography.egg-info/dependency_links.txt
    writing requirements to src/cryptography.egg-info/requires.txt
    writing top-level names to src/cryptography.egg-info/top_level.txt
    reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'docs/_build'
    warning: no previously-included files matching '*' found under directory 'vectors'
    writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
    running build_ext
    generating cffi module 'build/temp.linux-aarch64-3.6/_padding.c'
    creating build/temp.linux-aarch64-3.6
    generating cffi module 'build/temp.linux-aarch64-3.6/_constant_time.c'
    generating cffi module 'build/temp.linux-aarch64-3.6/_openssl.c'
    building '_openssl' extension
    creating build/temp.linux-aarch64-3.6/build
    creating build/temp.linux-aarch64-3.6/build/temp.linux-aarch64-3.6
    aarch64-linux-android-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Oz -Oz -fPIC -I/data/data/com.termux/files/usr/include/python3.6m -c build/temp.linux-aarch64-3.6/_openssl.c -o build/temp.linux-aarch64-3.6/build/temp.linux-aarch64-3.6/_openssl.o -Wconversion -Wno-error=sign-conversion
    build/temp.linux-aarch64-3.6/_openssl.c:1834:14: error: unknown type name 'ENGINE_CMD_DEFN'
    static const ENGINE_CMD_DEFN osrandom_cmd_defns[] = {
                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:1835:6: error: use of undeclared identifier 'ENGINE_CMD_BASE'
        {CRYPTOGRAPHY_OSRANDOM_GET_IMPLEMENTATION,
         ^
    build/temp.linux-aarch64-3.6/_openssl.c:678:50: note: expanded from macro 'CRYPTOGRAPHY_OSRANDOM_GET_IMPLEMENTATION'
    #define CRYPTOGRAPHY_OSRANDOM_GET_IMPLEMENTATION ENGINE_CMD_BASE
                                                     ^
    build/temp.linux-aarch64-3.6/_openssl.c:1838:6: error: use of undeclared identifier 'ENGINE_CMD_FLAG_NO_INPUT'
         ENGINE_CMD_FLAG_NO_INPUT},
         ^
    build/temp.linux-aarch64-3.6/_openssl.c:1847:10: error: use of undeclared identifier 'ENGINE_CMD_BASE'
        case CRYPTOGRAPHY_OSRANDOM_GET_IMPLEMENTATION:
             ^
    build/temp.linux-aarch64-3.6/_openssl.c:678:50: note: expanded from macro 'CRYPTOGRAPHY_OSRANDOM_GET_IMPLEMENTATION'
    #define CRYPTOGRAPHY_OSRANDOM_GET_IMPLEMENTATION ENGINE_CMD_BASE
                                                     ^
    build/temp.linux-aarch64-3.6/_openssl.c:1857:23: error: use of undeclared identifier 'ENGINE_F_ENGINE_CTRL'
                ENGINEerr(ENGINE_F_ENGINE_CTRL, ENGINE_R_INVALID_ARGUMENT);
                          ^
    build/temp.linux-aarch64-3.6/_openssl.c:1857:45: error: use of undeclared identifier 'ENGINE_R_INVALID_ARGUMENT'
                ENGINEerr(ENGINE_F_ENGINE_CTRL, ENGINE_R_INVALID_ARGUMENT);
                                                ^
    build/temp.linux-aarch64-3.6/_openssl.c:1863:19: error: use of undeclared identifier 'ENGINE_F_ENGINE_CTRL'
            ENGINEerr(ENGINE_F_ENGINE_CTRL, ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED);
                      ^
    build/temp.linux-aarch64-3.6/_openssl.c:1863:41: error: use of undeclared identifier 'ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED'
            ENGINEerr(ENGINE_F_ENGINE_CTRL, ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED);
                                            ^
    build/temp.linux-aarch64-3.6/_openssl.c:1947:9: warning: implicit declaration of function 'ENGINE_by_id' is invalid in C99 [-Wimplicit-function-declaration]
        e = ENGINE_by_id(Cryptography_osrandom_engine_id);
            ^
    build/temp.linux-aarch64-3.6/_openssl.c:1947:7: warning: incompatible integer to pointer conversion assigning to 'ENGINE *' (aka 'struct engine_st *') from 'int' [-Wint-conversion]
        e = ENGINE_by_id(Cryptography_osrandom_engine_id);
          ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    build/temp.linux-aarch64-3.6/_openssl.c:1949:9: warning: implicit declaration of function 'ENGINE_free' is invalid in C99 [-Wimplicit-function-declaration]
            ENGINE_free(e);
            ^
    build/temp.linux-aarch64-3.6/_openssl.c:1955:9: warning: implicit declaration of function 'ENGINE_new' is invalid in C99 [-Wimplicit-function-declaration]
        e = ENGINE_new();
            ^
    build/temp.linux-aarch64-3.6/_openssl.c:1955:7: warning: incompatible integer to pointer conversion assigning to 'ENGINE *' (aka 'struct engine_st *') from 'int' [-Wint-conversion]
        e = ENGINE_new();
          ^ ~~~~~~~~~~~~
    build/temp.linux-aarch64-3.6/_openssl.c:1959:10: warning: implicit declaration of function 'ENGINE_set_id' is invalid in C99 [-Wimplicit-function-declaration]
        if (!ENGINE_set_id(e, Cryptography_osrandom_engine_id) ||
             ^
    build/temp.linux-aarch64-3.6/_openssl.c:1960:14: warning: implicit declaration of function 'ENGINE_set_name' is invalid in C99 [-Wimplicit-function-declaration]
                !ENGINE_set_name(e, Cryptography_osrandom_engine_name) ||
                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:1961:14: warning: implicit declaration of function 'ENGINE_set_RAND' is invalid in C99 [-Wimplicit-function-declaration]
                !ENGINE_set_RAND(e, &osrandom_rand) ||
                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:1962:14: warning: implicit declaration of function 'ENGINE_set_init_function' is invalid in C99 [-Wimplicit-function-declaration]
                !ENGINE_set_init_function(e, osrandom_init) ||
                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:1963:14: warning: implicit declaration of function 'ENGINE_set_finish_function' is invalid in C99 [-Wimplicit-function-declaration]
                !ENGINE_set_finish_function(e, osrandom_finish) ||
                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:1964:14: warning: implicit declaration of function 'ENGINE_set_cmd_defns' is invalid in C99 [-Wimplicit-function-declaration]
                !ENGINE_set_cmd_defns(e, osrandom_cmd_defns) ||
                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:1965:14: warning: implicit declaration of function 'ENGINE_set_ctrl_function' is invalid in C99 [-Wimplicit-function-declaration]
                !ENGINE_set_ctrl_function(e, osrandom_ctrl)) {
                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:1966:9: warning: implicit declaration of function 'ENGINE_free' is invalid in C99 [-Wimplicit-function-declaration]
            ENGINE_free(e);
            ^
    build/temp.linux-aarch64-3.6/_openssl.c:1969:10: warning: implicit declaration of function 'ENGINE_add' is invalid in C99 [-Wimplicit-function-declaration]
        if (!ENGINE_add(e)) {
             ^
    build/temp.linux-aarch64-3.6/_openssl.c:1970:9: warning: implicit declaration of function 'ENGINE_free' is invalid in C99 [-Wimplicit-function-declaration]
            ENGINE_free(e);
            ^
    build/temp.linux-aarch64-3.6/_openssl.c:1973:10: warning: implicit declaration of function 'ENGINE_free' is invalid in C99 [-Wimplicit-function-declaration]
        if (!ENGINE_free(e)) {
             ^
    build/temp.linux-aarch64-3.6/_openssl.c:2660:19: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
        for (i = 0; i < _ssl_locks_count; i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~
    build/temp.linux-aarch64-3.6/_openssl.c:2701:39: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
            memcpy(buf, st->password, st->length);
            ~~~~~~                    ~~~~^~~~~~
    build/temp.linux-aarch64-3.6/_openssl.c:7200:12: error: use of undeclared identifier 'ENGINE_METHOD_ALL'
      int n = (ENGINE_METHOD_ALL) <= 0;
               ^
    build/temp.linux-aarch64-3.6/_openssl.c:7201:30: error: use of undeclared identifier 'ENGINE_METHOD_ALL'
      *o = (unsigned long long)((ENGINE_METHOD_ALL) | 0);  /* check that ENGINE_METHOD_ALL is an integer */
                                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:7207:12: error: use of undeclared identifier 'ENGINE_METHOD_CIPHERS'
      int n = (ENGINE_METHOD_CIPHERS) <= 0;
               ^
    build/temp.linux-aarch64-3.6/_openssl.c:7208:30: error: use of undeclared identifier 'ENGINE_METHOD_CIPHERS'
      *o = (unsigned long long)((ENGINE_METHOD_CIPHERS) | 0);  /* check that ENGINE_METHOD_CIPHERS is an integer */
                                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:7214:12: error: use of undeclared identifier 'ENGINE_METHOD_DIGESTS'
      int n = (ENGINE_METHOD_DIGESTS) <= 0;
               ^
    build/temp.linux-aarch64-3.6/_openssl.c:7215:30: error: use of undeclared identifier 'ENGINE_METHOD_DIGESTS'
      *o = (unsigned long long)((ENGINE_METHOD_DIGESTS) | 0);  /* check that ENGINE_METHOD_DIGESTS is an integer */
                                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:7221:12: error: use of undeclared identifier 'ENGINE_METHOD_DSA'
      int n = (ENGINE_METHOD_DSA) <= 0;
               ^
    build/temp.linux-aarch64-3.6/_openssl.c:7222:30: error: use of undeclared identifier 'ENGINE_METHOD_DSA'
      *o = (unsigned long long)((ENGINE_METHOD_DSA) | 0);  /* check that ENGINE_METHOD_DSA is an integer */
                                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:7228:12: error: use of undeclared identifier 'ENGINE_METHOD_NONE'
      int n = (ENGINE_METHOD_NONE) <= 0;
               ^
    build/temp.linux-aarch64-3.6/_openssl.c:7229:30: error: use of undeclared identifier 'ENGINE_METHOD_NONE'
      *o = (unsigned long long)((ENGINE_METHOD_NONE) | 0);  /* check that ENGINE_METHOD_NONE is an integer */
                                 ^
    build/temp.linux-aarch64-3.6/_openssl.c:7235:12: error: use of undeclared identifier 'ENGINE_METHOD_RAND'
      int n = (ENGINE_METHOD_RAND) <= 0;
               ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    18 warnings and 20 errors generated.
    error: command 'aarch64-linux-android-clang' failed with exit status 1

    ----------------------------------------
Command "/data/data/com.termux/files/usr/bin/python -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-install-89ifg1bb/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /data/data/com.termux/files/usr/tmp/pip-record-h_by88vu/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-install-89ifg1bb/cryptography/
@Grimler91
Copy link
Member

Seems that cryptography, for now, won't work if openssl is compiled with no-engine (which our openssl is), see pyca/cryptography#4412. They seem to be working on fixing this: pyca/cryptography#3867.

@skittles9823
Copy link
Author

@Grimler91 Ahh thanks. That explains it.

@zzxxtt
Copy link

zzxxtt commented Sep 22, 2018

Same problem, anyone knows how to solve the problem?
Can the termux openssl build config remove no-engine? Or anyone has the deb of older versions of openssl?

@ghost
Copy link

ghost commented Sep 22, 2018

Or anyone has the deb of older versions of openssl?

@zzxxtt Termux uses rolling-release scheme for publishing package updates. So if you install openssl v1.0.x you will break apt and other things that use openssl library.


OpenSSL without no-engine config for AArch64:
openssl_1.1.1-2_aarch64.deb.gz
openssl-dev_1.1.1-2_aarch64.deb.gz
openssl-tool_1.1.1-2_aarch64.deb.gz

@zzxxtt
Copy link

zzxxtt commented Sep 22, 2018

@xeffyr Thank you very much, your package solve the problem.

@skittles9823
Copy link
Author

@xeffyr thanks :)

@vladosam
Copy link

@xeffyr is there OpenSSL without no-engine for arm?

@ghost
Copy link

ghost commented Sep 22, 2018

@vladosam For ARM:
openssl_1.1.1-2_arm.deb.gz
openssl-dev_1.1.1-2_arm.deb.gz
openssl-tool_1.1.1-2_arm.deb.gz

@vladosam
Copy link

Thanks @xeffyr. I can install cryptography now. But if openssl is upgraded in termux packages this will stop working??

@Grimler91
Copy link
Member

@vladosam only if the ABI of openssl changes, this is only suppose to happen on major updates.

If something you've install locally stops working due to an update it's often enough to just reinstall/recompile the package to get it working again

@b3nsh4
Copy link

b3nsh4 commented Sep 23, 2018

Not good. I just updated openssl and was installing it, and came infront of this issue. Everything was going good before last update of openssl. Thanks @xeffyr for providing the arm packages. @Grimler91 is there any way to downgrade the openssl package to get rid of this ? To which version?

@Grimler91
Copy link
Member

is there any way to downgrade the openssl package to get rid of this ?

@bensh4 no, not really, openssl is such a fundamental package that if you try to downgrade it you'll break apt and many other packages and probably need to reinstall termux to get it working again

@b3nsh4
Copy link

b3nsh4 commented Sep 23, 2018

@Grimler91 @xeffyr has given arm packages of openssl to remove no-engine . Will that make any kind of conflict if I overwrite the existing package?

@Grimler91
Copy link
Member

No, it's the same version but with different configuration options, you can install it without problem.

@fornwall
Copy link
Member

Should we remove no-engine from the official openssl package?

@fornwall fornwall changed the title Issue installing cryptography Issue installing cryptography (due to openssl built with no-engine) Sep 26, 2018
@b3nsh4
Copy link

b3nsh4 commented Sep 26, 2018

@fornwall Yes. It 'd be nice. So that we can upgrade whenever latest version is available. Else we've to stick with that config file given by @xeffyr . Anyway thanks for him for providing those files.

@marteker789
Copy link

Hi guys , i am a beginner user of termux , can you help me to install (what are the commands?) opensll file for arm device ( i have the same problem installing cryptografy . thank you so much

@vladosam
Copy link

@marteker789 go to folder where you downloaded files then:

gunzip openssl_1.1.1-2_arm.deb.gz
gunzip openssl-dev_1.1.1-2_arm.deb.gz
gunzip openssl-tool_1.1.1-2_arm.deb.gz

dpkg -i openssl_1.1.1-2_arm.deb
dpkg -i openssl-dev_1.1.1-2_arm.deb
dpkg -i openssl-tool_1.1.1-2_arm.deb

@marteker789
Copy link

Thank you Vladosam, but how can i download files in termux ,( sorry i am beginner user and i don't know ...), can you give me commands...thanx a lot

@vladosam
Copy link

Download files with browser to your phone. Usually files are in downloads folder. Then setup storage in termux with

termux-setup-storage

You can find downloaded files in

cd ~/storage/downloads

@marteker789
Copy link

thank you so much i try and after let you know

@marteker789
Copy link

Thank you so much , now it seems ok..

@baslow
Copy link

baslow commented Oct 14, 2018

Does anyone know if no-engine packages are available for i686?

@adrianogil
Copy link

Hi guys, I tried to install those deb files in termux, but I got the following error:

$ dpkg -i openssl_1.1.1-2_arm.deb

package architecture (arm) does not match system (aarch64)

Do you know how to fix it?

@vladosam
Copy link

@adrianogil you need to download files for your architecture from this post #2847 (comment)

@ghost
Copy link

ghost commented Nov 3, 2018

i think my last check any file seems like openssl-dev into some folder names Archithecture

No one of packages contain or create directory 'Architecture'. You either installed something different or just were not able to follow instructions...

@twoAcestwo8s
Copy link

New to termux, I just came across this issue, however I am running on an x86_64 vm. Are there pacakages built for x86_64?

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

Are you running on Aarch or arm?

@twoAcestwo8s
Copy link

twoAcestwo8s commented Nov 13, 2018

To be clear I'm running an 64 bit x86 image from http://www.android-x86.org.

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

do you got same installation error?

@twoAcestwo8s
Copy link

Pretty much, I am trying install paramkio and when it's gets to the cryptography step, it errors out and outputs the same message.

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

the only problem is you are running in a x86 sys... Can't you dl another image? (and don't you have a phone 😂)

@twoAcestwo8s
Copy link

I would but I am trying to set up some automation via VMs. I have one phone but it's easier to clone a VM than buy a phone.

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

Oh yes I understand you.. I'll try to find another image who would be compatible with these OpenSSL pkg

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

There u go : LineageOs.org

@twoAcestwo8s
Copy link

Awesome thank you, I will give it a shot!

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

Hope it'll work ;)

@ghost
Copy link

ghost commented Nov 13, 2018

Should we remove no-engine from the official openssl package?

@fornwall Since removing no-engine doesn't harm anything, I guess it will be better to do this. PR available: #3051

@XSecr3t

This comment has been minimized.

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

For me in installed OpenSSL and then I just needed to reinstall python and pip

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

Like
$ dpkg - i OpenSSL.deb && apt install - - reinstall python python-dev Python2 python2-dev

@XSecr3t

This comment has been minimized.

@ghost
Copy link

ghost commented Nov 13, 2018

@XSecr3t Wait for #3051.

@Secr3ts

This comment has been minimized.

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

@xSecret cause "- I" is -i

@twoAcestwo8s
Copy link

@Secr3ts I installed LineageOS and tried to install Paramkio again, still no luck, same error.

@Secr3ts
Copy link

Secr3ts commented Nov 13, 2018

I'm sorry.. May ask @xeffyr

@fornwall
Copy link
Member

The updated package (openssl 1.1.1-3) that is built with engine support has now been pushed to the package repository, so you can now install it with pkg up!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests