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

Error when building on termux #483

Open
Ublimjo opened this issue Sep 28, 2018 · 14 comments
Open

Error when building on termux #483

Ublimjo opened this issue Sep 28, 2018 · 14 comments

Comments

@Ublimjo
Copy link

Ublimjo commented Sep 28, 2018

Collecting pynacl
  Using cached https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz
  Installing build dependencies ... done
Requirement already satisfied: six in /data/data/com.termux/files/usr/lib/python2.7/site-packages (from pynacl) (1.11.0)
Requirement already satisfied: cffi>=1.4.1 in /data/data/com.termux/files/usr/lib/python2.7/site-packages (from pynacl) (1.11.5)
Requirement already satisfied: pycparser in /data/data/com.termux/files/usr/lib/python2.7/site-packages (from cffi>=1.4.1->pynacl) (2.19)
Installing collected packages: pynacl
  Running setup.py install for pynacl ... error
    Complete output from command /data/data/com.termux/files/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-install-VHEk2A/pynacl/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-3NttdJ/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-i686-2.7
    creating build/lib.linux-i686-2.7/nacl
    copying src/nacl/__init__.py -> build/lib.linux-i686-2.7/nacl
    copying src/nacl/encoding.py -> build/lib.linux-i686-2.7/nacl
    copying src/nacl/exceptions.py -> build/lib.linux-i686-2.7/nacl
    copying src/nacl/hash.py -> build/lib.linux-i686-2.7/nacl
    copying src/nacl/hashlib.py -> build/lib.linux-i686-2.7/nacl
    copying src/nacl/public.py -> build/lib.linux-i686-2.7/nacl
    copying src/nacl/secret.py -> build/lib.linux-i686-2.7/nacl
    copying src/nacl/signing.py -> build/lib.linux-i686-2.7/nacl
    copying src/nacl/utils.py -> build/lib.linux-i686-2.7/nacl
    creating build/lib.linux-i686-2.7/nacl/pwhash
    copying src/nacl/pwhash/__init__.py -> build/lib.linux-i686-2.7/nacl/pwhash
    copying src/nacl/pwhash/_argon2.py -> build/lib.linux-i686-2.7/nacl/pwhash
    copying src/nacl/pwhash/argon2i.py -> build/lib.linux-i686-2.7/nacl/pwhash
    copying src/nacl/pwhash/argon2id.py -> build/lib.linux-i686-2.7/nacl/pwhash
    copying src/nacl/pwhash/scrypt.py -> build/lib.linux-i686-2.7/nacl/pwhash
    creating build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/__init__.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_aead.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_box.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_generichash.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_hash.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_kx.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_pwhash.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_scalarmult.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_secretbox.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_secretstream.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_shorthash.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_sign.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/randombytes.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/sodium_core.py -> build/lib.linux-i686-2.7/nacl/bindings
    copying src/nacl/bindings/utils.py -> build/lib.linux-i686-2.7/nacl/bindings
    running build_clib
    error: [Errno 2] No such file or directory
    ----------------------------------------
Command "/data/data/com.termux/files/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-install-VHEk2A/pynacl/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-3NttdJ/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-install-VHEk2A/pynacl/
@reaperhulk
Copy link
Member

Do you have make available? That error is likely due to attempting to invoke make without it being present in $PATH

@Ublimjo
Copy link
Author

Ublimjo commented Sep 28, 2018

Yes, I have make

@lmctv
Copy link
Contributor

lmctv commented Nov 3, 2018

@Ublimjo I think you are really trying to cross-build; in this case the make command (and a local build system) must be available in the same environment of the termux python interpreter;

@Ublimjo
Copy link
Author

Ublimjo commented Nov 4, 2018

@lmctv what should I do ?

@lmctv
Copy link
Contributor

lmctv commented Nov 4, 2018

Pynacl bindings depend on python cffi, and inherit it's dependence on a working build environment; at this time we don't have ready to follow recipes for cross building, other than a generic suggestion to run the build in a native or fully emulated environment, whose resulting wheel should correctly work also without the build environment.

@QJKX
Copy link

QJKX commented Feb 9, 2019

FWIW I've had success compiling pynacl in termux with Python3
(I've not tried with python 2.7 which you are using.)

@ashwinvis
Copy link

This works too:

$ pkg install clang python-dev libffi-dev openssl-dev libsodium-dev
$ SODIUM_INSTALL=system pip install pynacl

@MadWolfBY
Copy link

Today (2020) works this:
$ pkg install clang python libffi openssl libsodium
$ SODIUM_INSTALL=system pip install pynacl

@meinkonho
Copy link

@MadWolfBY thank buddy its worked

@piyx
Copy link

piyx commented Apr 23, 2021

Today (2020) works this:
$ pkg install clang python libffi openssl libsodium
$ SODIUM_INSTALL=system pip install pynacl

This worked! Thanks!

@ced123-cloud
Copy link

very thanks

@gamersekofy
Copy link

This works too:

$ pkg install clang python-dev libffi-dev openssl-dev libsodium-dev
$ SODIUM_INSTALL=system pip install pynacl

THANK YOU SO MUCH!! THAT WORKED!

@somu1795
Copy link

somu1795 commented Jun 3, 2022

Today (2020) works this:
$ pkg install clang python libffi openssl libsodium
$ SODIUM_INSTALL=system pip install pynacl

Many thanks

@Zandruk40
Copy link

Today (2020) works this: $ pkg install clang python libffi openssl libsodium $ SODIUM_INSTALL=system pip install pynacl

Good work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests