ninja: error: loading 'build.ninja': The system cannot find the file specified. when build hello world in Visual studio - visual-studio

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

Related

nvim_treesitter installation on windows

bad English (sorry).
I'm trying to get nvim_treesitter to work on my windows machine, on my Linux one it worked great but now when I try on windows the :checkhealth nvim_treesitter gives:
health#nvim_treesitter#check
Installation
ERROR: tree-sitter executable not found
OK: git executable found.
ERROR: cc executable not found.
ADVICE:
Check that either gcc or clang is in your $PATH
Parser/Features H L F I
Legend: H[ighlight], L[ocals], F[olds], I[ndents]
*) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang}
and I'm totally new to this thing, any advice would help:)
The main issue from my perspective is "ERROR: cc executable not found.". It means nvim_treesitter couldn't find any compiler on your machine, and so no parsers could be compiled and installed when you issue ":TSInstall {some_parser_name}" commands.
If you have Visual Studio installed (since nvim gets compiled by VS 2017, it's fine to have 2017 or 2019 studio, I guess), try this:
Run "x64 Native Tools Command Prompt for VS 201x" if you've downloaded nvim-win64 release package or "x86 Native Tools Command Prompt for VS 201x" otherwise (nvim-win32 package)
Run nvim in this command prompt (i.e. nvim-qt GUI)
Install any parsers you want, let's say ":TSInstall c". Output should look like this:
Downloading...
Compiling...
Treesitter parser for c has been installed.
Optionally run :checkhealth nvim_treesitter again to see if everything is fine
Thereafter you can run nvim in any console, not via VS Tools one only (still use it to install or update parsers though).
Please also see https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support for various instructions.
For the Error: tree-sitter: You can checkout creating parsers and follow the description or you download the windows binary of the binary files and put it into a directory on your PATH.
For the Error: cc: You need to install gcc
Try to apply this vsc tutorial from Prerequisites №3
I had the same issue. It helped me.
Ok, here's what I've done and what helped me:
Go to https://www.msys2.org and follow ALL of the installation steps that are described there:
Download and install
Run pacman -Syu comman
Run pacman -S --needed base-devel mingw-w64-x86_64-toolchain and choose mingw-w64-x86_64-gcc there.
After everything is installed, put into your PATH Environment Variable the path to MinGW64\bin folder (if you installed everything to the default folder it will be c:\msys64\mingw64\bin)
And you are good to go! Now open nvim and run
:TSInstall <yourlang>
For example, :TSInstall php
PS: you can get the list of available languages using :TSInstallInfo

Getting KeyError: 'WINDOWSSDKDIR' while running Chromium browser source code on Windows

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

gammaray.exe - System Error: The code execution cannot proceed because Qt5Widgetsd.dll was not found. Reinstalling the program my fix this problem

Having built GammaRay from source code on Windows 10, I'm receiving these system errors while trying to run the gammaray.exe binary at C:\Program Files (x86)\GammaRay\bin:
gammaray.exe - System Error: The code execution cannot proceed because Qt5Widgetsd.dll was not found. Reinstalling the program my fix this problem
The error is also thrown for Qt5Cored.dll and Qt5Guid.dll.
Using Visual Studio 2017 Developer Command Prompt, inspired by repository Install.txt, I ran these commands inside the downloaded repository directory:
mkdir build
cd build
set Qt5Core_DIR=C:\Qt\Qt5.12.6\5.12.6\msvc2017_64\lib\cmake\Qt5Core
echo %Qt5Core_DIR%
set Qt5_DIR=C:\Qt\Qt5.12.6\5.12.6\msvc2017_64\lib\cmake\Qt5
echo %Qt5_DIR%
cmake -G "NMake Makefiles" ..
dir
nmake
nmake install
The last nmake install command needs administrative privileges.
Side Notes
I ran into such an issue while building, which is resolved by moving the repository directory to a shorter path like C:\GammaRay\ and building from there.
I have to set Qt5Core_DIR and Qt5_DIR variables due to some CMake complaints similar to this one.
By #Tsyvarev help, the error got resolved by adding C:\Qt\Qt5.12.6\5.12.6\msvc2017_64\bin to path environment variable:

Cannot generate solution file of v8 with gyp for visual studio 2013

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

External makefile in Atmel Studio won't build. Windows error 0xc0000142

I downloaded bitcloud, the atmel zigbee stack and I am trying to compile one of the default applications, ZLLDemo.
It is located currently at:
C:\Users\Ryan\Desktop\BitCloud_MEGARF_3_1_0\Applications\ZLLDemo\atmelStudio_projects\ATmega256RFR2.cproj
Everytime I try to compile the application I get a windows message screen for "mkdir.exe" error 0xc0000142. In the Output screen I see the line "make: *** [directories] Error -1073741502"
This same error and error code occurs later in the build process for cp.exe if I manually make the folders myself.
I have tried the following things to fix the error:
Change folder and contents to different owners, everyone having full
privileges
run make command manually from a command prompt window as admin
clean solution before retrying
all other examples files
ran directly from C: as "C:\BitCloud_MEGARF_3_1_0\Applications\ZLLDemo\atmelStudio_projects\ATmega256RFR2.cproj" - as per general suggestion for the windows error I tried
"sfc /scannow" in case mkdir had somehow been corrupted
Changed AppInitDLLs Reg key to 0 to load all DLLs at start of application
Disabled Internet security
Does this have a general fix or is there perhaps something else at work here? General compilations work, its just external ones. My friend did the same and it seems to work just fine for him.
Windows 8.1
Atmel Studio 6.2
Avrfreaks had a solution that I finally found here.
Their solution is to download an old version of the msys file for winavr. Which means that their is something more than likely wrong with the latest version of winavr for windows 8.1
sebastor wrote:
I found solution.
Copy this file:
http://www.madwizard.org/download/electronics/msys-1.0-vista64.zip
to utils\bin directory (WinAVR)

Resources