I've followed the manual : https://deno.land/manual.html#buildfromsource
And i've the error:
import vs_toolchain
ImportError: No module named vs_toolchain
After checking in https://github.com/denoland/deno/blob/master/.appveyor.yml i have updated my PYTHONPATH to C:\temp\deno\third_party\python_packages
then i got:
Exception: Visual Studio version 2015 (from GYP_MSVS_VERSION) not supported. Supported versions are: 2017, 2019
Problem is i have already installed nodejs before and it sets this env variable. After changing it to :
GYP_MSVS_VERSION=2017
It works!
Maybe the documentation needs to be updated or i got a weird configuration?
Sounds like our python scripts should be updating sys.path ... that would take care of the first problem.
Not sure about the other problems - @piscisaureus thoughts?
So i found something. Maybe @piscisaureus could confirm:
instead of doing this:
git clone --recurse-submodules https://github.com/denoland/deno.git
I've done this (with Admin permissions with CMD)
git clone -c core.symlinks=true --recurse-submodules https://github.com/zekth/deno.git
Because doing the prompt of the config in the repo it appears that symlinks are disabled in the .git/config
PS C:\temp\deno> git config --get-all --show-origin core.symlinks
file:"C:\\ProgramData/Git/config" true
file:C:/Users/Zekth/.gitconfig true
file:.git/config false
So a solution would be to update the git config of the repo i guess? I think the Windows CI is still working due to the cache no?
In addition have to comment this line to make it work:
https://github.com/denoland/chromium_build/blob/89b12c46424e9d18499ebecda24cfc5fad0c2c4f/toolchain/win/tool_wrapper.py#L29
maybe it's due to my env
What version of git are you running?
I was up to date when i wrote it, so 2.21
Same behavior on 2.17
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Win/clang-353250-1.tgz .......... Done.
Traceback (most recent call last):
File "\denoproject\third_party\v8\tools\clang\scripts\update.py", line 1040, in
sys.exit(main())
File "\denoproject\third_party\v8\tools\clang\scripts\update.py", line 1036, in main
return UpdateClang(args)
File "\denoproject\third_party\v8\tools\clang\scripts\update.py", line 498, in UpdateClang
CopyDiaDllTo(os.path.join(LLVM_BUILD_DIR, 'bin'))
File "\denoproject\third_party\v8\tools\clang\scripts\update.py", line 425, in CopyDiaDllTo
GetWinSDKDir()
File "\denoproject\third_party\v8\tools\clang\scripts\update.py", line 404, in GetWinSDKDir
import vs_toolchain
ImportError: No module named vs_toolchain
After few updates on Deno repository, seems like the error do not show up anymore. Closing it.
Make sure you select "sysmlinks=true" while installing git to make symlinks work
or you can set this in the config file for git for windows. By default, this is located at C:\ProgramData\Git\config.
Find the [core] section and add symlinks = true to turn it on.
After few updates on Deno repository, seems like the error do not show up anymore. Closing it.
hi, the error still exists.
The issue occurred for me as well on windows 10. It occurs because the symlinks such as build_overrides, buildtools, node_modules etc. are checked out as text files instead of actual links.
I resolved it by following zekth's suggestion to run following with admin privileges:
git clone -c core.symlinks=true --recurse-submodules https://github.com/denoland/deno.git
Perhaps this should be mentioned in the "build from source" manual.
I'll update the documentation for the windows user so.
This is an issue for me still. I followed the above instructions...
PS C:\Users\ry\deno> ls build_overrides
Directory: C:\Users\ry\deno\build_overrides
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 6/17/2019 2:31 PM 1584 build.gni
-a---- 6/17/2019 2:31 PM 569 gtest.gni
-a---- 6/17/2019 2:31 PM 20 OWNERS
PS C:\Users\ry\deno> git version
git version 2.22.0.windows.1
PS C:\Users\ry\deno> cat .git/config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
symlinks = true
[submodule]
active = .
[remote "origin"]
url = https://github.com/denoland/deno.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[submodule "build"]
url = https://github.com/denoland/chromium_build.git
[submodule "js/deps/https/deno.land/x/std"]
url = https://github.com/denoland/deno_std.git
[submodule "third_party"]
url = https://github.com/denoland/deno_third_party.git
Just done with a fresh env. Seems to work properly as setup.py and test.py works. What's the deal with build_overrides ?
After some investigation, I found that third_party/v8/build was not a proper symlink. It should be linking to //build. Using MINGW bash shell, I did cd third_party/v8; ln -s ../../build . and that allowed setup.py to get further.
Also cd third_party; ln -s v8/third_party/googletest/ .
Actually the problem was not having core.symlinks=true set before checking out the repo. I've update the manual #2601.
Most helpful comment
I'll update the documentation for the windows user so.