MAIN OBJECTIVE: I'm trying to build and run Chromium browser source code on my Windows. I want to create my own browser. The doc I'm following: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
PROBLEM: I'm trying to follow every step and command as mentioned in the doc. I'm having trouble while running this command gn gen out/Default. I'm getting the following error (see the screenshot):
KeyError: 'WINDOWSSDKDIR'
ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
Here is vs_toolchain.py: https://github.com/arkadee/demo_files/blob/master/vs_toolchain.py
I'm using the latest version of VS Code. I've tried finding the solution myself, but, there are limited resources on the internet about Chromium. Any help will be appreciated, thanks!
Looks like WindowsSdkDir env variable is missing on your computer. You should install Visual Studio (VS Code is different) and the Window SDK, though it doesn't use VC compiler or linker anymore but GN build system needs the path of Windows SDK to copy all the relevant files to the build folder. Go to command prompt and type set, do you see WindowsSdkDir env variable? If not then either the SDK is missing or the env variable has been wiped out
Related
I created a Go(lang) project in Visual Studio Code. I created a main.go file that I will compile to WebAssembly, and another main.go that I will run as a server (to serve my Web Assembly glue file).
For reference, I'm following the tutorial here: https://golangbot.com/webassembly-using-go/
In a Visual Studio Code terminal, I do the following:
[cd to my wasm source folder with the first main.go]
${env:GOOS} = "js"
${env:GOARCH} = "wasm"
go build -o ../../assets/json.wasm
[cd to my server folder with the other main.go]
go run main.go
[I get the following error]
exec: "C:\Users\...\AppData\Local\Temp\go-build3258126417\b001\exe\main": file does not exist
I was able to run this server prior to the build. What's going on?
This should have just run. But now I'm not able to run the server. I get that strange "file does not exist" error.
I spent a lot of time trying to figure this out and finally got it! Here's the deal:
Either or both of the GOOS and GOARCH environment variables that are required by the build go command (for webassembly) seem to conflict with the go run command. I don't know why. I discovered this in a backwards kind of way.
(TLDR: use different terminals to build and run and don't set these environment variables globally -- set them prior to every build. Use the Terminal>Split Terminal to maintain the build settings between tests! ).
Using the Visual Studio Code Powershell terminal, I set these 2 variables (or so I thought) and then ran the build. Then I ran the server to try to see the fruits of my labor and got a strange error in the Chrome console (something about expecting one magic word but receiving another). It turns out this error is fairly generic and after some googling, determined it probably meant something happened with my build. After trying a few more times unsuccessfully to build, I decided to set the environment variables in windows (as SYSTEM variables) so that I didn't have to keep setting them when I did my build.
I built again (still no build errors), but then when I went to run the server, I got the
exec: "C:\Users...\AppData\Local\Temp\go-build3258126417\b001\exe\main": file does not exist
error. At this point, I couldn't run any of my Go servers in any project. Since the only "global" thing I'd done was set those 2 environment variables, I decided to remove them. I could now run my Go servers. But I still couldn't execute my builds in the browser. What's going on??
I figured that since setting the global environment variables had an effect (albeit, a negative effect) whereas I hadn't experienced that issue when manually setting them directly in the terminal prior to each build, then maybe there was something wrong with the way I was setting the variables (I don't use Powershell very often).
After more googling and some experimentation, I discovered the "correct" way to set these variables in the terminal (noted in my original question). So manually setting them (the right way) prior to the build fixed the build issue (it wasn't building correctly since those variables weren't being set properly).
Now I knew the variable were getting set properly because now I was getting that error when I set them manually prior to the build. So now what?
I killed the terminal after build, and then started a new terminal, and the run was successful.
So bottom line: the GOOS and GOARCH environment variables should not be set when running a server, so don't start a server in the same terminal that you used to build the web assembly code!
I have followed esp-idf guideline to install and test to build the hello world and blink sample code but both the code met this problem.
Visual studio try to build hello world
> Executing task: ninja <
ninja: error: loading 'build.ninja': The system cannot find the file specified.
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1.
I have tested all the ways I can find to fix it but I'm not sure anything I missed or not.
This is one of the way that I test but also met some problem.
cmd try to run the command below
C:\Espressif\frameworks\esp-idf-v4.4>python -m pip install --user -r %IDF_PATH%/requirements.txt
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
This possible problem is the python environment is exist so I cannot do this command, but I try many ways to disabled or deactivated it still cannot.
python path
system environment
After trying to debug this for a long time, I made a backup copy of the entire project folder, then just went hog-wild deleting files. I deleted almost every file I didn't author. Only left the main/CMakeLists.txt, main/component.mk, main/main.c, main/main.h, .gitignore, CMakeLists.txt, and Makefile. Then I ran idf.py set-target esp32 and idf.py -p /dev/ttyACM0 flash monitor and it worked fine again.
VS Code & ESP-IDF on Ubuntu 20.04.05 LTS
Check if the compiler is properly selected. If you don't select a proper c/c++ compiler, then you might get this error. I had mingw in my system, but vs code did not auto detect the compiler. Then I manually added mingw and selected it for compilation after which this issue was resolved.
What worked for me after updating to the new stable release (v5.0) was
Go to the folder S:\esp\esp-idf\esp-idf-v5.0
Run command prompt at this directory and execute install.bat and later export.bat
After trying to build the program in VSCode the error "ninja: error: loading 'build.ninja'" shows up.
Update the path in the ESP-IDF extension in VSCode using ESP-IDF:Configure Paths
locate your project folder e.g. "V:\simpleTest_using_EspIDF_v5_0"
Open command prompt and execute: idf.py build
Now it builds also in VSCode using the Espressif IDF extension.
You not have a build.ninja file. Find this file on proje
I am new to Dart/flutter. I have installed flutter SDK and VS Code on windows 10 machine, updated the system path, run flutter doctor, which shows that flutter is indeed installed (flutter doctor output). I read that installing flutter is enough, and I don't have to install Dart SDK too, as it comes build in with flutter (please correct me if I am wrong).
I wrote a very short Dart code for testing, but I couldn't run it from VS Code terminal (run in terminal output), as it returns the following error: "bash: dart: command not found".
But when I debug the code in VS Code, it returns the expected output (debug output).
Can someone please explain to me if I am doing something wrong, or if I am missing something? Why can't I run the program from the bash terminal?
Thanks
You should enter the full path directory instead of file name. For doing so right click on the dart file then choose Copy Path.
Then run following code on terminal:
dart (paste main file path)
For more information about creating and running Dart console application using VSCode please check out THIS answer.
I would require some guidance in regards to installing a module/package in pycharm (free edition). I have to mention that i have not worked with this IDE yet and wanted to try it out on a little project containing smartcards.
When i try to install "pyscard" i get the error that boils down to
error: command 'swig.exe' failed: No such file or directory
People say just install SWIG, which i guessed already ^^.
The issue i have is that i actually have no idea how to... and none of the pages i found has really enlightended me on this issue.
I downloaded the zip "swigwin-3.0.12" but i am at a loss what to do with it now. EDIT: According to the SWIG page this is an already compiled version and i have to somehow make pycharm recognize that the folder it is in contains the swig.exe it requires.
EDIT2: Adding the folder containing the swig.exe to the PATH variable also did not work ... which i thought would be the issue
EDIT3+Answer:
Ok the link in the comments from "wp78de" was correct my problem was that pycharm/pc restart were needed for it to catch the added PATH variable to the swig.exe (for pycharm that is)
Any advice is appriciated.
Envoirment:
Windows 8.1 Pro 64-bit
Pycharm 2017.2.4
Python 3.6
Basically, you just have to add the directory that contains the swig executable the PATH environment variable. You can do it via CMD or the Windows UI.
If you have added swig to your path, you should be able to call it in the command prompt from any directory: open "cmd", and type swig --help" on that prompt.
A restart of PyCharm (or whatever your IDE is) and Windows might be required.
This is really painful.
I followed the instruction from https://github.com/v8/v8/wiki/Building%20with%20Gyp.
fetch v8
cd v8
And when fetching is finished,
set DEPOT_TOOLSPWIN_TOOLCHAIN=0
Instruction said to use command "python build\gyp_v8" but obviously, my v8 clone does not have "build\gyv_v8" file. I googled about this, And found gyp_v8 is in that "gypfiles" folder, not in "build" folder. So command I used was
python gypfiles\gyp_v8
It seemed like working at first. cmd put out the response "Updating projects from gyp files...". No warning or error. But nothing happens!
I think it should generate solution file for my VS. But even after process is finished, no solution file was found.
Am I missing something?
Im almost dying for this. T-T
Please, help me.
Try setting this environment variable before running GYP:
set GYP_GENERATORS=msvs
Then, after running GYP, do a recursive search for .sln files in your V8 directory :)
It seems the google is using a new build system instead of gyp. It is called "gn" and i could generate the Visual Studio solution by executing following code in the v8 directory:
gn gen --ide=vs out/Default
The all.sln is then located in .\v8\out\Default\
Source: http://dev.chromium.org/developers/how-tos/get-the-code