sony / v8eval

Multi-language bindings to JavaScript engine V8
MIT License
403 stars 37 forks source link

python install, gclient.py error #22

Open machow opened 7 years ago

machow commented 7 years ago

Hello, when I try pip install v8eval, I run into an error with a gclient.py command that seems to be used on build. I'm happy to dig around, but a quick search didn't bring up much info. Log below (note that in the log I was using anaconda, but ran into the same area with my system python).

pip install --no-cache-dir v8eval
Collecting v8eval
  Downloading v8eval-0.2.6.tar.gz
Installing collected packages: v8eval
  Running setup.py install for v8eval ... error
    Complete output from command /Users/machow/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-l3cfvru9-record/install-record.txt --single-version-externally-managed --compile:
    Usage: gclient.py config [options] [url]

    gclient.py: error: Inconsistent arguments. Use either --spec or one or 2 args
    Running: gclient root
    Running: gclient config --spec 'solutions = [
      {
        "url": "https://chromium.googlesource.com/v8/v8.git",
        "managed": False,
        "name": "v8",
        "deps_file": "DEPS",
        "custom_deps": {},
      },
    ]
    '
    Traceback (most recent call last):
      File "/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/depot_tools/fetch.py", line 300, in <module>
        sys.exit(main())
      File "/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/depot_tools/fetch.py", line 295, in main
        return run(options, spec, root)
      File "/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/depot_tools/fetch.py", line 289, in run
        return checkout.init()
      File "/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/depot_tools/fetch.py", line 124, in init
        self.run_gclient('config', '--spec', self._format_spec())
      File "/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/depot_tools/fetch.py", line 76, in run_gclient
        return self.run(cmd_prefix + cmd, **kwargs)
      File "/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/depot_tools/fetch.py", line 66, in run
        return subprocess.check_output(cmd, **kwargs)
      File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 574, in check_output
        raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command '('gclient', 'config', '--spec', u'solutions = [\n  {\n    "url": "https://chromium.googlesource.com/v8/v8.git",\n    "managed": False,\n    "name": "v8",\n    "deps_file": "DEPS",\n    "custom_deps": {},\n  },\n]\n')' returned non-zero exit status 2
    /private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/build.sh: line 61: cd: v8: No such file or directory
    fatal: Not a git repository (or any of the parent directories): .git
    sed: Makefile: No such file or directory
    make: *** No rule to make target `x64.release'.  Stop.
    /private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/build.sh: line 95: cmake: command not found
    make: *** No targets specified and no makefile found.  Stop.
    running install
    running build
    running build_py
    creating build/lib.macosx-10.6-x86_64-3.5
    copying python/v8eval/v8eval.py -> build/lib.macosx-10.6-x86_64-3.5
    running build_ext
    building '_v8eval' extension
    creating build/temp.macosx-10.6-x86_64-3.5
    creating build/temp.macosx-10.6-x86_64-3.5/private
    creating build/temp.macosx-10.6-x86_64-3.5/private/var
    creating build/temp.macosx-10.6-x86_64-3.5/private/var/folders
    creating build/temp.macosx-10.6-x86_64-3.5/private/var/folders/hz
    creating build/temp.macosx-10.6-x86_64-3.5/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn
    creating build/temp.macosx-10.6-x86_64-3.5/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T
    creating build/temp.macosx-10.6-x86_64-3.5/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv
    creating build/temp.macosx-10.6-x86_64-3.5/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval
    creating build/temp.macosx-10.6-x86_64-3.5/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/python
    creating build/temp.macosx-10.6-x86_64-3.5/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/python/v8eval
    /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/machow/anaconda3/include -arch x86_64 -I/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/v8 -I/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/v8/include -I/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/uv/include -I/Users/machow/anaconda3/include/python3.5m -c /private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/python/v8eval/v8eval_wrap.cxx -o build/temp.macosx-10.6-x86_64-3.5/private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/python/v8eval/v8eval_wrap.o -O3 -std=c++11
    In file included from /private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/python/v8eval/v8eval_wrap.cxx:3120:
    In file included from /private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/python/v8eval/v8eval_python.h:4:
    /private/var/folders/hz/3vxyspjx6b53l8r0r3ncpgtm0000gn/T/pip-build-61jxr6gv/v8eval/python/v8eval/v8eval.h:6:10: fatal error: 'v8.h' file not found
    #include "v8.h"
             ^
    1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1
YoshiyukiMineo commented 7 years ago

I think fetch v8 failed in your environment. Could you try the following steps and check if your environment can fetch v8?

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=`pwd`/depot_tools:"$PATH"
fetch v8

See https://github.com/v8/v8/wiki/Using%20Git