brave / omaha

Omaha for brave-browser
Apache License 2.0
20 stars 19 forks source link

Omaha build error in windows 11 #99

Open Bhavyakala opened 1 month ago

Bhavyakala commented 1 month ago

I am trying to build omaha using creat_dist command and having the following error pasted below: I am following these two documentations to install the required dependencies and tools and have already done so with correct versions. https://github.com/brave/brave-browser/wiki/Brave-omaha https://github.com/google/omaha/blob/main/doc/DeveloperSetupGuide.md

PS C:\pingBrowser\src\brave> npm run create_dist Component --build_omaha --channel dev --tag_ap x64-be

> brave-core@1.68.8 create_dist
> node ./build/commands/scripts/commands.js create_dist Component dev x64-be

touch overridden files...
touch original files overridden by chromium_src...
...touch original files overridden by chromium_src done
touch original vector icon files overridden by brave/vector_icons...
...touch original vector icon files overridden by brave/vector_icons done
...touch overridden files done
update branding...
Recursing through GRD to find GRDP files...
Done recursing through GRD to find GRDP files.
...update branding done
generate ninja files...
update midl files...
...update midl files done
Widevine cdm host verification is disabled
...generate ninja files done
build create_dist (Component, id=28bbef1f-9cd2-4cfe-9736-8120d686bbed)...
-----------------------------------------------------------------------------------------------------------------------
C:\pingBrowser\src
> autoninja -C C:\pingBrowser\src\out\Component create_dist -k 1 --offline
ninja: Entering directory `C:\pingBrowser\src\out\Component'
[0/1] Regenerating ninja files
[1406/1411] ACTION //brave/vendor/omaha:build_omaha_installer(//build/toolchain/win:win_clang_x64)
FAILED: BraveBrowserDevelopmentSetup_125_1_68_0.exe BraveBrowserStandaloneDevelopmentSetup_125_1_68_0.exe BraveBrowserStandaloneSilentDevelopmentSetup_125_1_68_0.exe BraveBrowserStandaloneUntaggedDevelopmentSetup_125_1_68_0.exe
C:/pingBrowser/src/brave/vendor/depot_tools/bootstrap-2@3_11_8_chromium_35_bin/python3/bin/python3.exe ../../brave/vendor/omaha/build_omaha.py --root_out_dir=C:/pingBrowser/src/out/Component --brave_installer_exe=brave_installer.exe --stub_installer_exe=BraveBrowserDevelopmentSetup_125_1_68_0.exe --stub_untagged_exe=BraveBrowserUntaggedDevelopmentSetup_125_1_68_0.exe --standalone_installer_exe=BraveBrowserStandaloneDevelopmentSetup_125_1_68_0.exe --silent_installer_exe=BraveBrowserStandaloneSilentDevelopmentSetup_125_1_68_0.exe --untagged_installer_exe=BraveBrowserStandaloneUntaggedDevelopmentSetup_125_1_68_0.exe --guid={AFE6A462-C574-4B8A-AF43-4CC60DF4563B} --install_switch=--chrome-dev --tag_ap= --tag_app_name=Brave-Browser-Dev --brave_full_version=125.1.68.0 --tag_installdataindex=
in omaha builder
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.10.6
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64_x86'
OMAHA_PSEXEC_DIR: C:\Program Files (x86)\pstools
GOROOT: C:\go
OMAHA_PROTOBUF_BIN_DIR: C:\protobuf\bin
OMAHA_PROTOBUF_SRC_DIR: C:\protobuf\src
OMAHA_PYTHON_DIR: C:\Python27
OMAHA_WIX_DIR: C:\Program Files (x86)\WiX Toolset v3.14\\bin
OMAHA_WTL_DIR: C:\wtl\files
OMAHA_PLATFORM_SDK_DIR: C:\Program Files (x86)\Windows Kits\10\\
OMAHA_WINDOWS_SDK_10_0_VERSION: 10.0.22621.0
OMAHA_SIGNTOOL_SDK_DIR: C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64
SCONS_DIR: C:\Python27\Lib\site-packages\scons
SCT_DIR: C:\swtoolkit

scons: warning: No installed VCs
File "C:\swtoolkit\site_scons\site_init.py", line 426, in SiteInitMain

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swtoolkit\site_scons\site_init.py", line 426, in SiteInitMain
scons: Reading SConscript files ...

scons: warning: No installed VCs
File "C:\swtoolkit\site_scons\site_tools\target_platform_windows.py", line 283, in generate

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swtoolkit\site_scons\site_tools\target_platform_windows.py", line 283, in generate
Warning: Unable to load win32file module; using copy instead of hard linking for env.Install().  Is pywin32 present?
Building versions: 1.3.361.149
python "C:\pingBrowser\src\brave\vendor\omaha\omaha\tools\proxy_clsid_utils.py"
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: scons-out
________Compiling scons-out\opt-win\obj\base\file.objarm64
file.cc
C:\pingBrowser\src\brave\vendor\omaha\omaha/base/timer.h(127): error C2065: 'ARM64_PMCCNTR_EL0': undeclared identifier
C:\pingBrowser\src\brave\vendor\omaha\omaha/base/timer.h(127): error C3861: '_ReadStatusReg': identifier not found
scons: *** [scons-out\opt-win\obj\base\file.objarm64] Error 2
scons: building terminated because of errors.
Error in hammer.bat:132.
Traceback (most recent call last):
  File "C:\pingBrowser\src\brave\vendor\omaha\build_omaha.py", line 225, in <module>
    sys.exit(main())
             ^^^^^^
  File "C:\pingBrowser\src\brave\vendor\omaha\build_omaha.py", line 212, in main
    build(omaha_dir, installer_metadata_dir, args.debug)
  File "C:\pingBrowser\src\brave\vendor\omaha\build_omaha.py", line 46, in build
    sp.check_call(command, stderr=sp.STDOUT, env=env)
  File "C:\pingBrowser\src\brave\vendor\depot_tools\bootstrap-2@3_11_8_chromium_35_bin\python3\bin\Lib\subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['hammer.bat', 'MODE=opt-win', '--all', '--standalone_installers_dir=C:/pingBrowser/src/out/Component\\..\\..\\brave\\vendor\\omaha\\omaha\\scons-out\\opt-win\\Brave_Installers\\standalone']' returned non-zero exit status 2.
[1407/1411] ACTION //brave:create_dist_zips(//build/toolchain/win:win_clang_x64)
ninja: build stopped: subcommand failed.
null
null
PS C:\pingBrowser\src\brave>
simonhong commented 1 month ago

Not sure create_dist is supported to non-Release build. How about doing like this? first, do build for Release mode - npm run build Release -- --channel=nightly --target_arch=x64 then, do create_dist for Release mode - npm run create_dist Release -- --channel=nightly --target_arch=x64 --build_omaha --tag_ap=nightly --skip_signing

cc @mherrmann

Bhavyakala commented 4 weeks ago

Thanks for the reply simon, I am trying out these steps will update the issue with updates

Bhavyakala commented 3 weeks ago

@simonhong I am still hitting the same error after following both the commands pasted by you.

Bhavyakala commented 1 week ago

@simonhong @mherrmann Can you please help on this

mherrmann commented 1 week ago

@Bhavyakala I work for Brave through Omaha Consulting. We offer paid help with questions such as the one you are asking. You can reach us at hello@omaha-consulting.com.