mozilla-services / syncserver

Run-Your-Own Firefox Sync Server
Mozilla Public License 2.0
1.87k stars 145 forks source link

Problem build syncserver with make build #134

Closed misterhsp closed 6 years ago

misterhsp commented 6 years ago

make build

` [...]

Running virtualenv with interpreter /usr/bin/python2 CFLAGS="-Wno-error -Wno-error=format-security" ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./local/bin/pip install -i https://pypi.python.org/simple -U pip distribute Looking in indexes: https://pypi.python.org/simple Requirement already up-to-date: pip in ./local/lib/python2.7/site-packages (18.0) Collecting distribute Downloading https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip (145kB) Requirement already satisfied, skipping upgrade: setuptools>=0.7 in ./local/lib/python2.7/site-packages (from distribute) (40.2.0) Building wheels for collected packages: distribute Running setup.py bdist_wheel for distribute: started Running setup.py bdist_wheel for distribute: finished with status 'error' Complete output from command /home/fxa/syncserver/local/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-V6w3Ys/distribute/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-_KUK7E --python-tag cp27: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-V6w3Ys/distribute/setup.py", line 58, in setuptools.setup(**setup_params) File "/usr/lib/python2.7/distutils/core.py", line 137, in setup ok = dist.parse_command_line() File "setuptools/dist.py", line 276, in parse_command_line result = _Distribution.parse_command_line(self) File "/usr/lib/python2.7/distutils/dist.py", line 467, in parse_command_line args = self._parse_command_opts(parser, args) File "setuptools/dist.py", line 602, in _parse_command_opts nargs = _Distribution._parse_command_opts(self, parser, args) File "/usr/lib/python2.7/distutils/dist.py", line 523, in _parse_command_opts cmd_class = self.get_command_class(command) File "setuptools/dist.py", line 406, in get_command_class ep.require(installer=self.fetch_build_egg) File "pkg_resources.py", line 2254, in require working_set.resolve(self.dist.requires(self.extras),env,installer))) File "pkg_resources.py", line 2471, in requires dm = self._dep_map File "pkg_resources.py", line 2682, in _dep_map self.__dep_map = self._compute_dependencies() File "pkg_resources.py", line 2699, in _compute_dependencies from _markerlib import compile as compile_marker ImportError: No module named _markerlib


Failed building wheel for distribute Running setup.py clean for distribute Failed to build distribute

[...] `

rfk commented 6 years ago

I'm not entirely sure what causes this sorry, but several articles online seem to suggest it's due to some mis-match between setuptools and distribute, e.g:

https://stackoverflow.com/questions/35780537/error-no-module-named-markerlib-when-installing-some-packages-on-virtualenv

You could try changing the second line of the Makefile from virtualenv --python=$(SYSTEMPYTHON) to virtualenv --python=$(SYSTEMPYTHON) --distribute and see if that helps on your machine.

misterhsp commented 6 years ago

That doesn't help either, same problem.

...

bh commented 6 years ago

@misterhsp I had the same problem on Arch Linux. I fixed it with the following patch:

diff --git a/Makefile b/Makefile
index 57c5649..66b2d82 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ all: build
 build: | $(ENV)/COMPLETE
 $(ENV)/COMPLETE: requirements.txt
        $(VIRTUALENV) --no-site-packages $(ENV)
-       $(INSTALL) -i https://pypi.python.org/simple -U pip distribute
+       $(INSTALL) -i https://pypi.python.org/simple -U pip
        $(INSTALL) -r requirements.txt
        $(ENV)/bin/python ./setup.py develop
        touch $(ENV)/COMPLETE
misterhsp commented 6 years ago

@bh Very nice. Thank you, that works.

...

rfk commented 6 years ago

Thanks @bh, I've changed the default Makefile to match in https://github.com/mozilla-services/syncserver/commit/8c4d9a75faa5f03d4489a1a40fa3af473277e7c3. I might change it back if it turns out to break on other systems though, I can't recall whether we found it necessary to update distribute in some cases.