Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Homeserver installation issue #15

Closed
winsontan520 opened this issue Nov 18, 2014 · 4 comments
Closed

Homeserver installation issue #15

winsontan520 opened this issue Nov 18, 2014 · 4 comments

Comments

@winsontan520
Copy link

I face some issue here. I got this when I execute "python setup.py develop --user"
below my console output:

~/Git/synapse$ python setup.py develop --user
running develop
running egg_info
writing requirements to SynapseHomeServer.egg-info/requires.txt
writing SynapseHomeServer.egg-info/PKG-INFO
writing top-level names to SynapseHomeServer.egg-info/top_level.txt
writing dependency_links to SynapseHomeServer.egg-info/dependency_links.txt
writing entry points to SynapseHomeServer.egg-info/entry_points.txt
reading manifest file 'SynapseHomeServer.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.sql' under directory 'synapse/persistence/schema'
writing manifest file 'SynapseHomeServer.egg-info/SOURCES.txt'
running build_ext
Creating /Users/admin/Library/Python/2.7/lib/python/site-packages/SynapseHomeServer.egg-link (link to .)
SynapseHomeServer 0.0.1 is already the active version in easy-install.pth
Installing synapse-homeserver script to /Users/admin/Library/Python/2.7/bin

Installed /Users/admin/Git/synapse
Processing dependencies for SynapseHomeServer==0.0.1
Searching for cryptography>=0.2.1
Reading https://pypi.python.org/simple/cryptography/
Best match: cryptography 0.6.1
Downloading https://pypi.python.org/packages/source/c/cryptography/cryptography-0.6.1.tar.gz#md5=1c48fd78742d85c9cffdcceb6809e45b
Processing cryptography-0.6.1.tar.gz
Writing /var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/setup.cfg
Running cryptography-0.6.1/setup.py -q bdist_egg --dist-dir /var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/egg-dist-tmp-M8QmES
Traceback (most recent call last):
  File "setup.py", line 58, in <module>
    """
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/develop.py", line 27, in run
    self.install_for_development()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/develop.py", line 129, in install_for_development
    self.process_distribution(None, self.dist, not self.no_deps)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 671, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 620, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 858, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 870, in obtain
    return installer(requirement)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 593, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 811, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1017, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1002, in run_setup
    run_setup(setup_script, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 50, in run_setup
    lambda: execfile(
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 100, in run
    return func()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 52, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 338, in <module>

  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 971, in run_command
    cmd_obj.ensure_finalized()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 108, in finalize_options
    bdist_base = self.get_finalized_command('bdist').bdist_base
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/bdist.py", line 99, in finalize_options
    self.plat_name = self.get_finalized_command('build').plat_name
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "setup.py", line 106, in finalize_options

  File "setup.py", line 86, in get_ext_modules

  File "/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/openssl/binding.py", line 89, in __init__
  File "/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/openssl/binding.py", line 113, in _ensure_ffi_initialized
  File "/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/utils.py", line 80, in build_ffi
  File "/Users/admin/Library/Python/2.7/lib/python/site-packages/cffi-0.8.6-py2.7-macosx-10.9-x86_64.egg/cffi/api.py", line 340, in verify
    lib = self.verifier.load_library()
  File "/Users/admin/Library/Python/2.7/lib/python/site-packages/cffi-0.8.6-py2.7-macosx-10.9-x86_64.egg/cffi/verifier.py", line 75, in load_library
    return self._load_library()
  File "/Users/admin/Library/Python/2.7/lib/python/site-packages/cffi-0.8.6-py2.7-macosx-10.9-x86_64.egg/cffi/verifier.py", line 151, in _load_library
    return self._vengine.load_library()
  File "/Users/admin/Library/Python/2.7/lib/python/site-packages/cffi-0.8.6-py2.7-macosx-10.9-x86_64.egg/cffi/vengine_cpy.py", line 149, in load_library
    raise ffiplatform.VerificationError(error)
cffi.ffiplatform.VerificationError: importing '/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_36a40ff0x2bad1bae.so': dlopen(/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_36a40ff0x2bad1bae.so, 2): Symbol not found: _CRYPTO_malloc_debug_init
  Referenced from: /var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_36a40ff0x2bad1bae.so
  Expected in: flat namespace
 in /var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_36a40ff0x2bad1bae.so
~/Git/synapse$ 

I tried this http://chriskief.com/2014/03/25/installing-cryptography-via-pip-with-macports-or-homebrew/
but doesnt help...

@dbkr
Copy link
Member

dbkr commented Nov 18, 2014

You're on Mac OS X? What version?

@winsontan520
Copy link
Author

OSX Yosemite 10.10.1

@dbkr
Copy link
Member

dbkr commented Nov 18, 2014

Okay. It works for me but I don't have a Macports / Homebrew Openssl installed (it seems to work fine against the bundled one). Perhaps your Homebrew / Macports openssl libraries are of the wrong architecture? You can find out by running:

file /usr/local/opt/openssl/lib/*

...for homebrew (or the appropriate place for Macports). I imagine they should be i386 / x86_64 fat binaries. If not, you'll probably need to reinstall it:

brew uninstall openssl
brew install openssl

Let me know how you get on!

@winsontan520
Copy link
Author

Thanks for reply!
Reinstall brew openssl remain same. Seem something wrong with homebrew in Yosemite. I uninstall Homebrew and now the command running ok.

lxndrbnsv added a commit to lxndrbnsv/synapse that referenced this issue Dec 27, 2021
erikjohnston pushed a commit that referenced this issue Apr 12, 2022
… hashes (#12439)

The requirements file generated by `poetry export` isn't correctly processed by `pip install -r requirements.txt`. It contains twisted and treq, both pinned to 22.2.0.

When `pip` installs treq, it notices that `Twisted[tls]` is required. It then tries to acquire the latest twisted release, only to fail (because this hash isn't listed in the requirements file).From e.g. /~https://github.com/matrix-org/synapse/runs/5977154990?check_suite_focus=true

> ```
> #15 9.204 Collecting Twisted[tls]>=18.7.0
> #15 9.205 ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
> #15 9.205     Twisted[tls]>=18.7.0 from https://files.pythonhosted.org/packages/db/99/38622ff95bb740bcc991f548eb46295bba62fcb6e907db1987c4d92edd09/Twisted-22.4.0-py3-none-any.whl#sha256=f9f7a91f94932477a9fc3b169d57f54f96c6e74a23d78d9ce54039a7f48928a2 (from treq==22.2.0->-r /synapse/requirements.txt (line 724))
> #15 ERROR: executor failed running [/bin/sh -c pip install --prefix="/install" --no-warn-script-location -r /synapse/requirements.txt]: exit code: 1
> ```

The underlying pip issue is pypa/pip#9644. A comment notes that one can avoid this behaviour with by `pip install`ing with the `--no-deps` flag. Let us do so.

(At first glance, the problem looks like python-poetry/poetry#5311, but that was a bug in `poetry install`; this is `poetry export`, whose behaviour is fine AFAICS).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants