Skip to content

Build log incorrect when not installed python on Windows10 #36694

Closed
@himself65

Description

@himself65
  • Platform: Windows 10 after 1903

In the recent Windows 10 (after 1903), there is a fake python.exe in the %USERPROFILE%\AppData\Local\Microsoft\WindowsApps dir. when you click it, it will open MS Store. But in our build toolchains, it seems doesn't determine if it's a fake app for now.

For more info see: https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update, https://stackoverflow.com/questions/58754860/cmd-opens-window-store-when-i-type-python, https://superuser.com/questions/1437590/typing-python-on-windows-10-version-1903-command-prompt-opens-microsoft-stor

Error logs

PS node> .\vcbuild.bat debug
Looking for Python
Python found in C:\Users\himse\AppData\Local\Microsoft\WindowsApps\\python.exe
Looking for NASM
Cannot determine current version of Node.js
PS C:\Users\himse\Code\github\node> cross-env DEBUG_HELPER=1 .\vcbuild.bat

C:\Users\himse\Code\github\node>endlocal

C:\Users\himse\Code\github\node>if /I "" == "help" goto help

C:\Users\himse\Code\github\node>if /I "" == "--help" goto help

C:\Users\himse\Code\github\node>if /I "" == "-help" goto help

C:\Users\himse\Code\github\node>if /I "" == "/help" goto help

C:\Users\himse\Code\github\node>if /I "" == "?" goto help

C:\Users\himse\Code\github\node>if /I "" == "-?" goto help

C:\Users\himse\Code\github\node>if /I "" == "--?" goto help

C:\Users\himse\Code\github\node>if /I "" == "/?" goto help

C:\Users\himse\Code\github\node>cd C:\Users\himse\Code\github\node\

C:\Users\himse\Code\github\node>set JS_SUITES=default

C:\Users\himse\Code\github\node>set NATIVE_SUITES=addons js-native-api node-api

C:\Users\himse\Code\github\node>set "CI_NATIVE_SUITES=addons js-native-api node-api benchmark"

C:\Users\himse\Code\github\node>set "CI_JS_SUITES=default"

C:\Users\himse\Code\github\node>set CI_DOC=doctool

C:\Users\himse\Code\github\node>set "common_test_suites=default addons js-native-api node-api&set build_addons=1&set build_js_native_api_tests=1&set build_node_api_tests=1"

C:\Users\himse\Code\github\node>set config=Release

C:\Users\himse\Code\github\node>set target=Build

C:\Users\himse\Code\github\node>set target_arch=x64

C:\Users\himse\Code\github\node>set ltcg=

C:\Users\himse\Code\github\node>set target_env=

C:\Users\himse\Code\github\node>set noprojgen=

C:\Users\himse\Code\github\node>set projgen=

C:\Users\himse\Code\github\node>set nobuild=

C:\Users\himse\Code\github\node>set sign=

C:\Users\himse\Code\github\node>set nosnapshot=

C:\Users\himse\Code\github\node>set cctest_args=

C:\Users\himse\Code\github\node>set test_args=

C:\Users\himse\Code\github\node>set stage_package=

C:\Users\himse\Code\github\node>set package=

C:\Users\himse\Code\github\node>set msi=

C:\Users\himse\Code\github\node>set upload=

C:\Users\himse\Code\github\node>set licensertf=

C:\Users\himse\Code\github\node>set lint_js=

C:\Users\himse\Code\github\node>set lint_cpp=

C:\Users\himse\Code\github\node>set lint_md=

C:\Users\himse\Code\github\node>set lint_md_build=

C:\Users\himse\Code\github\node>set noetw=

C:\Users\himse\Code\github\node>set noetw_msi_arg=

C:\Users\himse\Code\github\node>set i18n_arg=

C:\Users\himse\Code\github\node>set download_arg=

C:\Users\himse\Code\github\node>set build_release=

C:\Users\himse\Code\github\node>set configure_flags=

C:\Users\himse\Code\github\node>set build_addons=

C:\Users\himse\Code\github\node>set dll=

C:\Users\himse\Code\github\node>set enable_static=

C:\Users\himse\Code\github\node>set build_js_native_api_tests=

C:\Users\himse\Code\github\node>set build_node_api_tests=

C:\Users\himse\Code\github\node>set test_node_inspect=

C:\Users\himse\Code\github\node>set test_check_deopts=

C:\Users\himse\Code\github\node>set v8_test_options=

C:\Users\himse\Code\github\node>set v8_build_options=

C:\Users\himse\Code\github\node>set http2_debug=

C:\Users\himse\Code\github\node>set nghttp2_debug=

C:\Users\himse\Code\github\node>set link_module=

C:\Users\himse\Code\github\node>set no_cctest=

C:\Users\himse\Code\github\node>set cctest=

C:\Users\himse\Code\github\node>set openssl_no_asm=

C:\Users\himse\Code\github\node>set doc=

C:\Users\himse\Code\github\node>set extra_msbuild_args=

C:\Users\himse\Code\github\node>set exit_code=0

C:\Users\himse\Code\github\node>set experimental_quic=

C:\Users\himse\Code\github\node>if "" == "" goto args-done

C:\Users\himse\Code\github\node>if defined build_release (
set config=Release
 set package=1
 set msi=1
 set licensertf=1
 set download_arg="--download=all"
 set i18n_arg=full-icu
 set projgen=1
 set cctest=1
 set ltcg=1
)

C:\Users\himse\Code\github\node>if defined msi set stage_package=1

C:\Users\himse\Code\github\node>if defined package set stage_package=1

C:\Users\himse\Code\github\node>set "node_exe=Release\node.exe"

C:\Users\himse\Code\github\node>set "node_gyp_exe="Release\node.exe" deps\npm\node_modules\node-gyp\bin\node-gyp"

C:\Users\himse\Code\github\node>set "npm_exe="C:\Users\himse\Code\github\node\Release\node.exe" C:\Users\himse\Code\github\node\deps\npm\bin\npm-cli.js"

C:\Users\himse\Code\github\node>if "" == "vs2019" set "node_gyp_exe="Release\node.exe" deps\npm\node_modules\node-gyp\bin\node-gyp --msvs_version=2019"

C:\Users\himse\Code\github\node>if "" == "lint" if exist "Release\node.exe" goto lint-cpp

C:\Users\himse\Code\github\node>if "Release" == "Debug" set configure_flags= --debug

C:\Users\himse\Code\github\node>if defined nosnapshot set configure_flags= --without-snapshot

C:\Users\himse\Code\github\node>if defined noetw set configure_flags= --without-etw  & set noetw_msi_arg=/p:NoETW=1

C:\Users\himse\Code\github\node>if defined ltcg set configure_flags= --with-ltcg

C:\Users\himse\Code\github\node>if defined release_urlbase set configure_flags= --release-urlbase=

C:\Users\himse\Code\github\node>if defined download_arg set configure_flags=

C:\Users\himse\Code\github\node>if defined dll set configure_flags= --shared

C:\Users\himse\Code\github\node>if defined enable_static set configure_flags= --enable-static

C:\Users\himse\Code\github\node>if defined no_NODE_OPTIONS set configure_flags= --without-node-options

C:\Users\himse\Code\github\node>if defined link_module set configure_flags=

C:\Users\himse\Code\github\node>if defined i18n_arg set configure_flags= --with-intl=

C:\Users\himse\Code\github\node>if defined config_flags set configure_flags=

C:\Users\himse\Code\github\node>if defined target_arch set configure_flags= --dest-cpu=x64

C:\Users\himse\Code\github\node>if defined openssl_no_asm set configure_flags= --dest-cpu=x64 --openssl-no-asm

C:\Users\himse\Code\github\node>if defined DEBUG_HELPER set configure_flags= --dest-cpu=x64 --verbose

C:\Users\himse\Code\github\node>if defined experimental_quic set configure_flags= --dest-cpu=x64 --verbose --experimental-quic

C:\Users\himse\Code\github\node>if "x64" == "x86" if "AMD64" == "AMD64" set configure_flags= --dest-cpu=x64 --verbose --no-cross-compiling

C:\Users\himse\Code\github\node>if "x64" == "arm64" set configure_flags= --dest-cpu=x64 --verbose --cross-compiling

C:\Users\himse\Code\github\node>if not exist "C:\Users\himse\Code\github\node\deps\icu" goto no-depsicu

C:\Users\himse\Code\github\node>if "Build" == "TestClean" (
echo deleting test/.tmp*
 if exist "test\.tmp*" for /F %i in ('dir /a:d /s /b test\.tmp*') do rmdir /S /Q "%i"
 goto exit
)

C:\Users\himse\Code\github\node>call tools\msvs\find_python.cmd

C:\Users\himse\Code\github\node>echo Looking for Python
Looking for Python

C:\Users\himse\Code\github\node>setlocal enabledelayedexpansion

C:\Users\himse\Code\github\node>set need_path=0

C:\Users\himse\Code\github\node>for /F "delims=" %a in ('where python.exe 2> nul') do (
set p=%~dpa
 goto :found-python
)

C:\Users\himse\Code\github\node>(
set p=C:\Users\himse\AppData\Local\Microsoft\WindowsApps\
 goto :found-python
)

C:\Users\himse\Code\github\node>echo Python found in C:\Users\himse\AppData\Local\Microsoft\WindowsApps\\python.exe
Python found in C:\Users\himse\AppData\Local\Microsoft\WindowsApps\\python.exe

C:\Users\himse\Code\github\node>endlocal     & set "pt=C:\Users\himse\AppData\Local\Microsoft\WindowsApps\"     & set "need_path_ext=0"

C:\Users\himse\Code\github\node>set "VCBUILD_PYTHON_LOCATION=C:\Users\himse\AppData\Local\Microsoft\WindowsApps\\python.exe"

C:\Users\himse\Code\github\node>if 0 == 1 set "PATH=C:\Users\himse\AppData\Local\Microsoft\WindowsApps\;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files (x86)\AdoptOpenJDK\jdk-11.0.8.10-hotspot\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\W
INDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Users\himse\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files (x86)\IncrediBuild;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\PuTTY\;C:\Program
Files\LLVM\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Program Files\qemu;C:\Library\Tool;C:\Program Files\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\himse\AppData\Local\Yarn\bin;C:\Users\himse\Code\telegram-buildpath\ThirdParty\
Strawberry\c\bin;C:\Users\himse\Code\telegram-buildpath\ThirdParty\Strawberry\perl\site\bin;C:\Users\himse\Code\telegram-buildpath\ThirdParty\Strawberry\perl\bin;C:\Library\ffmpeg\bin;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDeskt
op\version-bin;C:\Program Files\NASM;C:\Users\himse\.cargo\bin;C:\Users\himse\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\GitHub CLI\;C:\Users\himse\AppData\Local\Programs\Fiddler;C:\Users\himse\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\himse\.dotnet\to
ols;C:\Users\himse\Code\TBuild\ThirdParty\gyp;C:\Users\himse\Code\TBuild\ThirdParty\Ninja"

C:\Users\himse\Code\github\node>set "pt="

C:\Users\himse\Code\github\node>set "need_path_ext="

C:\Users\himse\Code\github\node>exit /b 0

C:\Users\himse\Code\github\node>if errorlevel 1 goto :exit

C:\Users\himse\Code\github\node>REM NASM is only needed on IA32 and x86_64.

C:\Users\himse\Code\github\node>if not defined openssl_no_asm if "x64" NEQ "arm64" call tools\msvs\find_nasm.cmd

C:\Users\himse\Code\github\node>ECHO Looking for NASM
Looking for NASM

C:\Users\himse\Code\github\node>FOR /F "delims=" %a IN ('where nasm 2> NUL') DO (EXIT /B 0 )

C:\Users\himse\Code\github\node>(EXIT /B 0 )

C:\Users\himse\Code\github\node>if errorlevel 1 echo Could not find NASM, install it or build with openssl-no-asm. See BUILDING.md.

C:\Users\himse\Code\github\node>call :getnodeversion   || exit /b 1

C:\Users\himse\Code\github\node>set NODE_VERSION=

C:\Users\himse\Code\github\node>set TAG=

C:\Users\himse\Code\github\node>set FULLVERSION=

C:\Users\himse\Code\github\node>for /F "usebackq tokens=*" %i in (`python "C:\Users\himse\Code\github\node\tools\getnodeversion.py"`) do set NODE_VERSION=%i

C:\Users\himse\Code\github\node>if not defined NODE_VERSION (
echo Cannot determine current version of Node.js
 exit /b 1
)
Cannot determine current version of Node.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions