I want to give back to Brave. Trying to compile Brave Desktop source code & I keep on getting errors (Windows 10 x64). Please help

Hello Brave Team,

Operating System: Windows 10 x64.

All day today, I have been trying to compile the source code from the Brave Browser.

I followed the instructions from here, including all of the prerequisites.

I had a few problems, originally with the setup_toolchain.py file. I took care of that after creating my environment variables.

Now, Brave Browser won’t build, and I am very confused.

After I took care of the problems on setup_toolchain.py, I started getting these issues that the header files cannot be found. It’s funny, because I had to copy the header files from C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt and C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared to the Visual Studio include directory
(C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include)

  1. What is a better way than doing it like this? I know this isn’t the best way possible. I know this is part of the problem on why my Brave source code will not build. I know I shouldn’t be copying files from the Microsoft SDK to the Visual Studio include directory. I know there is a better way.

  2. I have Visual Studio 2019 Enterprise Installed, and I have Visual Studio 2017 installed. I installed all of the C++ libraries, along with the Microsoft SDK (Version 10.0.18362.0).

  3. I will post a reply to show environment variables

  4. I copied and pasted my entire contents of my command prompt. You can view that here

  5. Do I have to uninstall Visual Studio 2019? I had that prior to installing Visual Studio 2017. I am primarily a C# for my day job. 1. I installed the C++ packages for both VS 2017 and VS 2019.

I am lost on what to do. I cannot figure out what am I doing wrong so the installation and build process can read the dependencies from the appropriate directories.

I want to give back to the Brave community. Unfortunately, I find it a bit challenging to build this.

Environment Variables:
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\sprit\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
ComSpec=C:\Windows\system32\cmd.exe
DEPOT_TOOLS_WIN_TOOLCHAIN=0
DriverData=C:\Windows\System32\Drivers\DriverData
GYP_MSVS_OVERRIDE_PATH=C:\Program Files (x86)\Microsoft Visual Studio
GYP_MSVS_VERSION=2019
HOMEDRIVE=C:
HOMEPATH=\Users\sprit
INCLUDE=C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include;
LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\lib\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\lib\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;
LOCALAPPDATA=C:\Users\sprit\AppData\Local
LOGONSERVER=\DESKTOP-SPRITEM
MSMPI_BENCHMARKS=C:\Program Files\Microsoft MPI\Benchmarks
MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin
NUMBER_OF_PROCESSORS=12
OneDrive=C:\Users\sprit\OneDrive
OneDriveConsumer=C:\Users\sprit\OneDrive
OS=Windows_NT
Path=C:\src\depot_tools;C:\Python27;C:\Python27\Scripts;C:\Program Files\Microsoft MPI\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\nodejs;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;C:\MinGW\bin;C:\src\depot_tools;C:\Python27;C:\Python27\Scripts;C:\Program Files\Microsoft MPI\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\nodejs;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;C:\Users\sprit\AppData;C:\MinGW\bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=9e0a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\sprit\AppData\Local\Temp
TMP=C:\Users\sprit\AppData\Local\Temp
USERDOMAIN=DESKTOP-SPRITEM
USERDOMAIN_ROAMINGPROFILE=DESKTOP-SPRITEM
USERNAME=sprit
USERPROFILE=C:\Users\sprit
VBOX_MSI_INSTALL_PATH=D:\Program Files\Oracle\VirtualBox
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools
windir=C:\Windows