LeastAuthority / python-challenge-bypass-ristretto

Python bindings for Brave's challenge-bypass-ristretto library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot build after rename; "LookupError: dylib 'challenge_bypass_ristretto_ffi' not found"

crwood opened this issue · comments

After #24, I am unable to build this library. Here's the error I see:

Building wheels for collected packages: python-challenge-bypass-ristretto
  Building wheel for python-challenge-bypass-ristretto (setup.py): started
  Building wheel for python-challenge-bypass-ristretto (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /home/user/code/gridsync/build/venv-tahoe/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-484RwF/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-484RwF/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7JxXHd
       cwd: /tmp/pip-req-build-484RwF/
  Complete output (97 lines):
  running bdist_wheel
  running build
  running build_py
  creating build/lib
  creating build/lib/challenge_bypass_ristretto
  copying challenge_bypass_ristretto/__init__.py -> build/lib/challenge_bypass_ristretto
  creating build/lib/challenge_bypass_ristretto/tests
  copying challenge_bypass_ristretto/tests/__init__.py -> build/lib/challenge_bypass_ristretto/tests
  copying challenge_bypass_ristretto/tests/test_privacypass.py -> build/lib/challenge_bypass_ristretto/tests
     Compiling typenum v1.10.0
     Compiling autocfg v0.1.1
     Compiling semver-parser v0.7.0
     Compiling libc v0.2.46
     Compiling rand_core v0.3.0
     Compiling cc v1.0.28
     Compiling byteorder v1.2.7
     Compiling subtle v2.0.0
     Compiling byte-tools v0.3.0
     Compiling subtle v1.0.0
     Compiling safemem v0.3.0
     Compiling fake-simd v0.1.2
     Compiling opaque-debug v0.2.1
     Compiling rand_chacha v0.1.1
     Compiling rand v0.6.4
     Compiling semver v0.9.0
     Compiling rand_isaac v0.1.1
     Compiling rand_hc v0.1.0
     Compiling rand_xorshift v0.1.1
     Compiling block-padding v0.1.2
     Compiling base64 v0.9.3
     Compiling rustc_version v0.2.3
     Compiling clear_on_drop v0.2.3
     Compiling generic-array v0.12.0
     Compiling rand_pcg v0.1.1
     Compiling rand_os v0.1.1
     Compiling digest v0.8.0
     Compiling crypto-mac v0.7.0
     Compiling block-buffer v0.7.0
     Compiling hmac v0.7.0
     Compiling sha2 v0.8.0
     Compiling curve25519-dalek v1.0.1
     Compiling challenge-bypass-ristretto v1.0.0-pre.0
     Compiling challenge-bypass-ristretto-ffi v1.0.0-pre.1 (/tmp/pip-req-build-484RwF/challenge-bypass-ristretto-ffi)
  warning: trait objects without an explicit `dyn` are deprecated
    --> src/lib.rs:28:43
     |
  28 |     static LAST_ERROR: RefCell<Option<Box<Error>>> = RefCell::new(None);
     |                                           ^^^^^ help: use `dyn`: `dyn Error`
     |
     = note: `#[warn(bare_trait_objects)]` on by default

  warning: trait objects without an explicit `dyn` are deprecated
    --> src/lib.rs:28:43
     |
  28 |     static LAST_ERROR: RefCell<Option<Box<Error>>> = RefCell::new(None);
     |                                           ^^^^^ help: use `dyn`: `dyn Error`

  warning: trait objects without an explicit `dyn` are deprecated
    --> src/lib.rs:35:17
     |
  35 |     T: Into<Box<Error>>,
     |                 ^^^^^ help: use `dyn`: `dyn Error`

      Finished release [optimized] target(s) in 24.16s
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-484RwF/setup.py", line 44, in <module>
      long_description_content_type='text/markdown'
    File "/home/user/code/gridsync/build/venv-tahoe/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/core.py", line 151, in setup
      dist.run_commands()
    File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/home/user/code/gridsync/build/venv-tahoe/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/command/build.py", line 127, in run
      self.run_command(cmd_name)
    File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/tmp/pip-req-build-484RwF/.eggs/milksnake-0.1.5-py2.7.egg/milksnake/setuptools_ext.py", line 88, in run
      func(base_path=base_path, inplace=False)
    File "/tmp/pip-req-build-484RwF/.eggs/milksnake-0.1.5-py2.7.egg/milksnake/setuptools_ext.py", line 269, in build_cffi
      dylib = self.dylib()
    File "/tmp/pip-req-build-484RwF/setup.py", line 12, in <lambda>
      dylib=lambda: build.find_dylib('challenge_bypass_ristretto_ffi', in_path='target/release'),
    File "/tmp/pip-req-build-484RwF/.eggs/milksnake-0.1.5-py2.7.egg/milksnake/setuptools_ext.py", line 160, in find_dylib
      raise LookupError('dylib %r not found' % name)
  LookupError: dylib 'challenge_bypass_ristretto_ffi' not found
  ----------------------------------------
  ERROR: Failed building wheel for python-challenge-bypass-ristretto
  Running setup.py clean for python-challenge-bypass-ristretto
Failed to build python-challenge-bypass-ristretto
Installing collected packages: python-challenge-bypass-ristretto
    Running setup.py install for python-challenge-bypass-ristretto: started
    Running setup.py install for python-challenge-bypass-ristretto: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /home/user/code/gridsync/build/venv-tahoe/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-484RwF/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-484RwF/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-record-csJVsK/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/code/gridsync/build/venv-tahoe/include/site/python2.7/python-challenge-bypass-ristretto
         cwd: /tmp/pip-req-build-484RwF/
    Complete output (45 lines):
    running install
    running build
    running build_py
    creating build/lib
    creating build/lib/challenge_bypass_ristretto
    copying challenge_bypass_ristretto/__init__.py -> build/lib/challenge_bypass_ristretto
    creating build/lib/challenge_bypass_ristretto/tests
    copying challenge_bypass_ristretto/tests/__init__.py -> build/lib/challenge_bypass_ristretto/tests
    copying challenge_bypass_ristretto/tests/test_privacypass.py -> build/lib/challenge_bypass_ristretto/tests
        Finished release [optimized] target(s) in 0.01s
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-484RwF/setup.py", line 44, in <module>
        long_description_content_type='text/markdown'
      File "/home/user/code/gridsync/build/venv-tahoe/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/home/user/code/gridsync/build/venv-tahoe/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/command/install.py", line 563, in run
        self.run_command('build')
      File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/command/build.py", line 127, in run
        self.run_command(cmd_name)
      File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/home/user/.pyenv/versions/2.7.17/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/tmp/pip-req-build-484RwF/.eggs/milksnake-0.1.5-py2.7.egg/milksnake/setuptools_ext.py", line 88, in run
        func(base_path=base_path, inplace=False)
      File "/tmp/pip-req-build-484RwF/.eggs/milksnake-0.1.5-py2.7.egg/milksnake/setuptools_ext.py", line 269, in build_cffi
        dylib = self.dylib()
      File "/tmp/pip-req-build-484RwF/setup.py", line 12, in <lambda>
        dylib=lambda: build.find_dylib('challenge_bypass_ristretto_ffi', in_path='target/release'),
      File "/tmp/pip-req-build-484RwF/.eggs/milksnake-0.1.5-py2.7.egg/milksnake/setuptools_ext.py", line 160, in find_dylib
        raise LookupError('dylib %r not found' % name)
    LookupError: dylib 'challenge_bypass_ristretto_ffi' not found
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/user/code/gridsync/build/venv-tahoe/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-484RwF/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-484RwF/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-record-csJVsK/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/code/gridsync/build/venv-tahoe/include/site/python2.7/python-challenge-bypass-ristretto Check the logs for full command output.

How are you building and on what platform?

I can reproduce it as follows (on Debian 10 with rustc 1.39.0 (4560ea788 2019-11-04)):

python3 -m virtualenv -p python2 venv2
source venv2/bin/activate
git clone https://github.com/LeastAuthority/python-challenge-bypass-ristretto
cd python-challenge-bypass-ristretto
git submodule update --init --recursive -q
../venv2/bin/pip install --editable .

If I publish binary wheels on PyPI, will this still matter?

Eh well, I guess it will still matter in the general case.

I was going to say: if you want people to be able to build the library, yes. :)

#26 seems to fix it - can you try it out?

Looks good here! 👍