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

pip install failed on msys2 #211

Closed
fhoshino opened this issue Dec 8, 2016 · 3 comments
Closed

pip install failed on msys2 #211

fhoshino opened this issue Dec 8, 2016 · 3 comments

Comments

@fhoshino
Copy link

fhoshino commented Dec 8, 2016

➜  ~ pip install pynacl
Collecting pynacl
  Using cached PyNaCl-1.0.1.tar.gz
Requirement already satisfied: six in /usr/lib/python2.7/site-packages (from pynacl)
Requirement already satisfied: cffi>=1.1.0 in /usr/lib/python2.7/site-packages (from pynacl)
Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi>=1.1.0->pynacl)
Installing collected packages: pynacl
  Running setup.py install for pynacl ... error
    Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-hB7VYd/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 /tmp/pip-L4V2We-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.msys-2.6.0-x86_64-2.7
    creating build/lib.msys-2.6.0-x86_64-2.7/nacl
    copying src/nacl/encoding.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl
    copying src/nacl/exceptions.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl
    copying src/nacl/hash.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl
    copying src/nacl/public.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl
    copying src/nacl/secret.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl
    copying src/nacl/signing.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl
    copying src/nacl/utils.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl
    copying src/nacl/__init__.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl
    creating build/lib.msys-2.6.0-x86_64-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_box.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_hash.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_scalarmult.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_secretbox.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl/bindings
    copying src/nacl/bindings/crypto_sign.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl/bindings
    copying src/nacl/bindings/randombytes.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl/bindings
    copying src/nacl/bindings/sodium_core.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl/bindings
    copying src/nacl/bindings/__init__.py -> build/lib.msys-2.6.0-x86_64-2.7/nacl/bindings
    running build_clib
    configure: loading site script /etc/config.site
    checking build system type... configure: error: /bin/sh /tmp/pip-build-hB7VYd/pynacl/src/libsodium/build-aux/config.sub -pc-msys failed
    configure: WARNING: cache variable ac_cv_build contains a newline
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-hB7VYd/pynacl/setup.py", line 259, in <module>
        "Programming Language :: Python :: 3.5",
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python2.7/distutils/command/install.py", line 563, in run
        self.run_command('build')
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/distutils/command/build.py", line 127, in run
        self.run_command(cmd_name)
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-hB7VYd/pynacl/setup.py", line 186, in run
        cwd=build_temp,
      File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/tmp/pip-build-hB7VYd/pynacl/src/libsodium/configure', '--disable-shared', '--enable-static', '--disable-debug', '--disable-dependency-tracking', '--with-pic', '--prefix', '/tmp/pip-build-hB7VYd/pynacl/build/temp.msys-2.6.0-x86_64-2.7']' returned non-zero exit status 1

    ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-hB7VYd/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 /tmp/pip-L4V2We-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-hB7VYd/pynacl/
➜  ~
@reaperhulk
Copy link
Member

Building on Windows (be it directly, msys2, or cygwin) is tricky. We need to document it better but that bug is tracked in #165

@fhoshino
Copy link
Author

Is there instructions for building on msys2?
I had libsodium installed already

➜ ~ pacman -Ss sodium
mingw32/mingw-w64-i686-libsodium 1.0.11-1 [installed]
P(ortable|ackageable) NaCl-based crypto library (mingw-w64)
mingw64/mingw-w64-x86_64-libsodium 1.0.11-1 [installed]
P(ortable|ackageable) NaCl-based crypto library (mingw-w64)

@reaperhulk
Copy link
Member

Nope. It should be possible, but you'll need to set include and library paths properly for your env. I don't know anything about msys2 so I can't help.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants