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

gn.py: Could not find checkout in any parent of the current path. #118

Closed
mknet opened this issue Jun 3, 2018 · 8 comments
Closed

gn.py: Could not find checkout in any parent of the current path. #118

mknet opened this issue Jun 3, 2018 · 8 comments

Comments

@mknet
Copy link

mknet commented Jun 3, 2018

While running build.py after following every single step (including cd $GOPATH/src/github.com/ry/v8worker2) on macOS (El Capitan) I get the following:

./build.py --use_ccache
out_path None
Rebuilding V8
Fetching dependencies.
depot_tools update failed. Conflict in /Users/marcel/Development/gocode/src/github.com/ry/v8worker2/depot_tools
/Users/marcel/Development/gocode/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:56: trailing whitespace.
   
/Users/marcel/Development/gocode/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:71: trailing whitespace.

/Users/marcel/Development/gocode/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:73: trailing whitespace.
Windows only).
/Users/marcel/Development/gocode/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:77: trailing whitespace.

/Users/marcel/Development/gocode/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:225: trailing whitespace.
 
warning: squelched 596 whitespace errors
warning: 601 lines add whitespace errors.
error: Failed to merge in the changes.
Patch failed at 0001 Create the Next Generation of depot_tools. Eh.
The copy of the patch that failed is found in: /Users/marcel/Development/gocode/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Running gn
gn.py: Could not find checkout in any parent of the current path.
This must be run inside a checkout.
Traceback (most recent call last):
  File "./build.py", line 149, in <module>
    main()
  File "./build.py", line 85, in main
    lib_fn = Rebuild()
  File "./build.py", line 114, in Rebuild
    env=env)
  File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/marcel/Development/gocode/src/github.com/ry/v8worker2/depot_tools/gn', 'gen', '/Users/marcel/Development/gocode/src/github.com/ry/v8worker2/out/v8build', '--args=   is_component_build=false   is_debug=false   libcpp_is_static=false   symbol_level=1   treat_warnings_as_errors=false   use_custom_libcxx=false   use_sysroot=false   v8_deprecation_warnings=false   v8_embedder_string="-v8worker2"   v8_enable_gdbjit=false   v8_enable_i18n_support=false   v8_enable_test_features=false   v8_experimental_extra_library_files=[]   v8_extra_library_files=[]   v8_imminent_deprecation_warnings=false   v8_monolithic=true   v8_static_library=false   v8_target_cpu="x64"   v8_untrusted_code_mitigations=false   v8_use_external_startup_data=false   v8_use_snapshot=true ']' returned non-zero exit status 1

Before I go into detail inspection. Got anyone a hint?

@kitsonk
Copy link
Contributor

kitsonk commented Jun 4, 2018

After you cd $GOPATH/src/github.com/ry/v8worker2 what does git status say?

@colorhook
Copy link

I got same problem

@mknet
Copy link
Author

mknet commented Jun 4, 2018

@kitsonk

git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

	modified:   .gclient_entries
	modified:   v8 (new commits, modified content)

no changes added to commit (use "git add" and/or "git commit -a")

I assume the build.py modified those files. Should I reset the change?

@colorhook
Copy link

On MacOS v10.13.4, go version go1.8.2 darwin/amd64, and Python 2.7.15 :: Anaconda, Inc.

type ./build.py --use_ccache in v8worker2 directory

out_path None
Rebuilding V8
Fetching dependencies.
depot_tools update failed. Conflict in /Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/depot_tools
/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:56: trailing whitespace.
   
/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:71: trailing whitespace.

/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:73: trailing whitespace.
Windows only).
/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:77: trailing whitespace.

/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:225: trailing whitespace.
 
warning: squelched 596 whitespace errors
warning: 601 lines add whitespace errors.
error: Failed to merge in the changes.
Patch failed at 0001 Create the Next Generation of depot_tools. Eh.
The copy of the patch that failed is found in: /Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch

Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Syncing projects: 100% (24/24), done.                                   

________ running 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-clang-format -s v8/buildtools/mac/clang-format.sha1' in '.'
Failed to fetch file gs://chromium-clang-format/0679b295e2ce2fce7919d1e8d003e497475f24a3 for v8/buildtools/mac/clang-format. [Err: [E2018-06-04T17:23:46.522019+08:00 42618 0 annotate.go:242] goroutine 1:
[E2018-06-04T17:23:46.522053+08:00 42618 0 annotate.go:242] #0 go.chromium.org/luci/vpython/python/find.go:88 - python.Find()
[E2018-06-04T17:23:46.522067+08:00 42618 0 annotate.go:242]   annotation #0:
[E2018-06-04T17:23:46.522076+08:00 42618 0 annotate.go:242]     reason: no Python found
[E2018-06-04T17:23:46.522087+08:00 42618 0 annotate.go:242]   annotation #1:
[E2018-06-04T17:23:46.522096+08:00 42618 0 annotate.go:242]     reason: failed to get version for: "/Users/admin/anaconda3/envs/py2/bin/python"
[E2018-06-04T17:23:46.522108+08:00 42618 0 annotate.go:242]   annotation #2:
[E2018-06-04T17:23:46.522121+08:00 42618 0 annotate.go:242]     reason: failed to parse version from: "2.7.15 :: Anaconda, Inc."
[E2018-06-04T17:23:46.522130+08:00 42618 0 annotate.go:242]   annotation #3:
[E2018-06-04T17:23:46.522147+08:00 42618 0 annotate.go:242]     reason: non-canonical Python version string: "2.7.15 :: Anaconda, Inc."
[E2018-06-04T17:23:46.522155+08:00 42618 0 annotate.go:242] 
[E2018-06-04T17:23:46.522163+08:00 42618 0 annotate.go:242] #1 go.chromium.org/luci/vpython/venv/config.go:265 - venv.(*Config).resolvePythonInterpreter()
[E2018-06-04T17:23:46.522172+08:00 42618 0 annotate.go:242]   reason: could not find Python for: 
[E2018-06-04T17:23:46.522184+08:00 42618 0 annotate.go:242] 
[E2018-06-04T17:23:46.522195+08:00 42618 0 annotate.go:242] #2 go.chromium.org/luci/vpython/venv/config.go:187 - venv.(*Config).makeEnv()
[E2018-06-04T17:23:46.522204+08:00 42618 0 annotate.go:242]   reason: failed to resolve system Python interpreter
[E2018-06-04T17:23:46.522212+08:00 42618 0 annotate.go:242] 
[E2018-06-04T17:23:46.522220+08:00 42618 0 annotate.go:242] #3 go.chromium.org/luci/vpython/venv/venv.go:163 - venv.With()
[E2018-06-04T17:23:46.522229+08:00 42618 0 annotate.go:242] #4 go.chromium.org/luci/vpython/run.go:63 - vpython.Run()
[E2018-06-04T17:23:46.522237+08:00 42618 0 annotate.go:242] #5 go.chromium.org/luci/vpython/application/application.go:318 - application.(*application).mainImpl()
[E2018-06-04T17:23:46.522251+08:00 42618 0 annotate.go:242] #6 go.chromium.org/luci/vpython/application/application.go:402 - application.(*Config).Main.func1()
[E2018-06-04T17:23:46.522260+08:00 42618 0 annotate.go:242] #7 go.chromium.org/luci/vpython/application/support.go:47 - application.run()
[E2018-06-04T17:23:46.522268+08:00 42618 0 annotate.go:242] #8 go.chromium.org/luci/vpython/application/application.go:401 - application.(*Config).Main()
[E2018-06-04T17:23:46.522281+08:00 42618 0 annotate.go:242] #9 vpython/main.go:92 - main.mainImpl()
[E2018-06-04T17:23:46.522290+08:00 42618 0 annotate.go:242] #10 vpython/main.go:98 - main.main()
[E2018-06-04T17:23:46.522298+08:00 42618 0 annotate.go:242] #11 runtime/proc.go:198 - runtime.main()
[E2018-06-04T17:23:46.522307+08:00 42618 0 annotate.go:242] #12 runtime/asm_amd64.s:2361 - runtime.goexit()
]
0> Failed to fetch file gs://chromium-clang-format/0679b295e2ce2fce7919d1e8d003e497475f24a3 for v8/buildtools/mac/clang-format, skipping. [Err: [E2018-06-04T17:23:46.522019+08:00 42618 0 annotate.go:242] goroutine 1:
[E2018-06-04T17:23:46.522053+08:00 42618 0 annotate.go:242] #0 go.chromium.org/luci/vpython/python/find.go:88 - python.Find()
[E2018-06-04T17:23:46.522067+08:00 42618 0 annotate.go:242]   annotation #0:
[E2018-06-04T17:23:46.522076+08:00 42618 0 annotate.go:242]     reason: no Python found
[E2018-06-04T17:23:46.522087+08:00 42618 0 annotate.go:242]   annotation #1:
[E2018-06-04T17:23:46.522096+08:00 42618 0 annotate.go:242]     reason: failed to get version for: "/Users/admin/anaconda3/envs/py2/bin/python"
[E2018-06-04T17:23:46.522108+08:00 42618 0 annotate.go:242]   annotation #2:
[E2018-06-04T17:23:46.522121+08:00 42618 0 annotate.go:242]     reason: failed to parse version from: "2.7.15 :: Anaconda, Inc."
[E2018-06-04T17:23:46.522130+08:00 42618 0 annotate.go:242]   annotation #3:
[E2018-06-04T17:23:46.522147+08:00 42618 0 annotate.go:242]     reason: non-canonical Python version string: "2.7.15 :: Anaconda, Inc."
[E2018-06-04T17:23:46.522155+08:00 42618 0 annotate.go:242] 
[E2018-06-04T17:23:46.522163+08:00 42618 0 annotate.go:242] #1 go.chromium.org/luci/vpython/venv/config.go:265 - venv.(*Config).resolvePythonInterpreter()
[E2018-06-04T17:23:46.522172+08:00 42618 0 annotate.go:242]   reason: could not find Python for: 
[E2018-06-04T17:23:46.522184+08:00 42618 0 annotate.go:242] 
[E2018-06-04T17:23:46.522195+08:00 42618 0 annotate.go:242] #2 go.chromium.org/luci/vpython/venv/config.go:187 - venv.(*Config).makeEnv()
[E2018-06-04T17:23:46.522204+08:00 42618 0 annotate.go:242]   reason: failed to resolve system Python interpreter
[E2018-06-04T17:23:46.522212+08:00 42618 0 annotate.go:242] 
[E2018-06-04T17:23:46.522220+08:00 42618 0 annotate.go:242] #3 go.chromium.org/luci/vpython/venv/venv.go:163 - venv.With()
[E2018-06-04T17:23:46.522229+08:00 42618 0 annotate.go:242] #4 go.chromium.org/luci/vpython/run.go:63 - vpython.Run()
[E2018-06-04T17:23:46.522237+08:00 42618 0 annotate.go:242] #5 go.chromium.org/luci/vpython/application/application.go:318 - application.(*application).mainImpl()
[E2018-06-04T17:23:46.522251+08:00 42618 0 annotate.go:242] #6 go.chromium.org/luci/vpython/application/application.go:402 - application.(*Config).Main.func1()
[E2018-06-04T17:23:46.522260+08:00 42618 0 annotate.go:242] #7 go.chromium.org/luci/vpython/application/support.go:47 - application.run()
[E2018-06-04T17:23:46.522268+08:00 42618 0 annotate.go:242] #8 go.chromium.org/luci/vpython/application/application.go:401 - application.(*Config).Main()
[E2018-06-04T17:23:46.522281+08:00 42618 0 annotate.go:242] #9 vpython/main.go:92 - main.mainImpl()
[E2018-06-04T17:23:46.522290+08:00 42618 0 annotate.go:242] #10 vpython/main.go:98 - main.main()
[E2018-06-04T17:23:46.522298+08:00 42618 0 annotate.go:242] #11 runtime/proc.go:198 - runtime.main()
[E2018-06-04T17:23:46.522307+08:00 42618 0 annotate.go:242] #12 runtime/asm_amd64.s:2361 - runtime.goexit()
]
Downloading 1 files took 0.153860 second(s)
Error: Command 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-clang-format -s v8/buildtools/mac/clang-format.sha1' returned non-zero exit status 1 in .
Traceback (most recent call last):
  File "./build.py", line 149, in <module>
    main()
  File "./build.py", line 85, in main
    lib_fn = Rebuild()
  File "./build.py", line 97, in Rebuild
    EnsureDeps(v8_path)
  File "./build.py", line 146, in EnsureDeps
    env=env)
  File "/Users/admin/anaconda3/envs/py2/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gclient', 'sync', '--spec', "solutions = [{'managed': False, 'custom_vars': {'build_for_node': True}, 'url': 'https://chromium.googlesource.com/v8/v8.git', 'custom_deps': {'v8/third_party/catapult': None, 'v8/third_party/colorama/src': None, 'v8/testing/gmock': None, 'v8/tools/swarming_client': None, 'v8/third_party/instrumented_libraries': None, 'v8/tools/gyp': None, 'v8/third_party/android_tools': None, 'v8/test/wasm-js': None, 'v8/test/benchmarks/data': None, 'v8/test/mozilla/data': None, 'v8/tools/luci-go': None, 'v8/test/test262/data': None, 'v8/test/test262/harness': None}, 'deps_file': 'DEPS', 'name': 'v8'}]"]' returned non-zero exit status 2

type git status in v8worker2 directory

(py2) hk1k:v8worker2 admin$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

type ./gclient sync in v8worker2/depot_tools directory

(py2) hk1k:depot_tools admin$ ./gclient sync
depot_tools update failed. Conflict in .
/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:56: trailing whitespace.
   
/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:71: trailing whitespace.

/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:73: trailing whitespace.
Windows only).
/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:77: trailing whitespace.

/Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch:225: trailing whitespace.
 
warning: squelched 596 whitespace errors
warning: 601 lines add whitespace errors.
error: Failed to merge in the changes.
Patch failed at 0001 Create the Next Generation of depot_tools. Eh.
The copy of the patch that failed is found in: /Users/admin/.gvm/pkgsets/system/global/src/github.com/ry/v8worker2/.git/modules/depot_tools/rebase-apply/patch

Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Error: client not configured; see 'gclient config'

@colorhook
Copy link

colorhook commented Jun 5, 2018

I fixed it myself.

under v8workder/v8 directory, the DEPS file describes some dependencies, such as gn, clang-format, which cannot be download correctly while you are from the mainland of China.

wget --no-check-certificate https://storage.googleapis.com/chromium-clang-format/0679b295e2ce2fce7919d1e8d003e497475f24a3 -O v8/buildtools/mac/clang-format

wget --no-check-certificate https://storage.googleapis.com/chromium-gn/9be792dd9010ce303a9c3a497a67bcc5ac8c7666 -O v8/buildtools/mac/gn

wget --no-check-certificate https://storage.googleapis.com/v8-wasm-spec-tests/1a23e57c4eeff80ed93119c3e128d08b37c530f6 -O v8/test/wasm-spec-tests/tests.tar.gz

wget --no-check-certificate https://storage.googleapis.com/chromium-v8-closure-compiler/69937d3c239ca63e4c9045718886ddd096ffc054 -O v8/src/inspector/build/closure-compiler.tar.gz

And you must unzip the tar package manually, such as tests.tar.gz, closure-compiler.tar.gz.

I can build v8workder and deno now.

@hayd
Copy link
Contributor

hayd commented Jul 29, 2018

@colorhook This looks like it's maybe a bug (?) in LUCI, I don't quite understand how that fits in the toolchain.
https://github.com/luci/luci-go/blob/043220934aed46e9514844a3a1332792ad8b5254/vpython/python/interpreter_test.go#L95

They should probably use platform.python_version rather than grepping the version string...

Anaconda is very popular so hopefully it can be supported.

Edit: I have no idea where one is supposed to post issues for luci-go.

Note: This Anaconda issue perhaps ought to be a separate issue.

@ry
Copy link
Member

ry commented Aug 7, 2018

This should be fixed now.

@legal-username
Copy link

legal-username commented Jun 18, 2019

everybody, i fixed it on my private c++ demo preject. reson is Missing dir "buildtools" in same path with ".gn" file. the "buildtools" dir you can copy from chromium/src/buildtools. now i can compile my demo for learn how compile project to use gn/ninja.

piscisaureus pushed a commit to piscisaureus/deno that referenced this issue Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@ry @colorhook @mknet @kitsonk @hayd @legal-username and others