Build on Windows
- Dominant language
- C++
- Stars
- 2.6k
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to build ZetaSQL on Windows? I tried to build it using this GitHub action runner https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md but without success. Here is logs:
Logs
```
2021/09/22 09:04:08 Downloading https://releases.bazel.build/3.7.2/release/bazel-3.7.2-windows-x86_64.exe...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
DEBUG: C:/users/runneradmin/_bazel_runneradmin/7nprpp6p/external/io_grpc_grpc_java/java_grpc_library.bzl:184:14: Multiple values in 'deps' is deprecated in local_service_java_grpc
Analyzing: target //zetasql/local_service:local_service (1 packages loaded)
Analyzing: target //zetasql/local_service:local_service (1 packages loaded, 0 targets configured)
Analyzing: target //zetasql/local_service:local_service (11 packages loaded, 6 targets configured)
Analyzing: target //zetasql/local_service:local_service (11 packages loaded, 6 targets configured)
Analyzing: target //zetasql/local_service:local_service (11 packages loaded, 6 targets configured)
Analyzing: target //zetasql/local_service:local_service (11 packages loaded, 6 targets configured)
Analyzing: target //zetasql/local_service:local_service (52 packages loaded, 921 targets configured)
Analyzing: target //zetasql/local_service:local_service (66 packages loaded, 3974 targets configured)
Analyzing: target //zetasql/local_service:local_service (84 packages loaded, 7155 targets configured)
INFO: Analyzed target //zetasql/local_service:local_service (85 packages loaded, 7604 targets configured).
INFO: Found 1 target...
[0 / 764] [Prepa] Writing file external/com_google_protobuf/protoc_lib.lib-2.params [for host]
ERROR: D:/a/zetasql/zetasql/bazel/BUILD:40:15: error executing shell command: 'C:/Program Files/Git/bin/bash.exe -c function cleanup_function() {
local ecode=$?
rules_foreign_cc: Build failed!
if [ $ecode -eq 0 ]; then
rules_foreign_cc: Keeping temp build directory and dependencies directory for debug.
cleanup_on_success
rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify '--sandbox_debug' Bazel command line flag.
else
cleanup_on_failure
rules_foreign_cc: Printing build logs:
fi
}
_____ BEGIN BUILD LOGS _____
set -e
Bazel external C/C++ Rules #0.0.8. Building library 'm4'
function cleanup_on_success() {
Environment:______________INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt
pr...' failed (Exit 1): bash.exe failed: error executing command C:/Program Files/Git/bin/bash.exe -c ... (remaining 1 argument(s) skipped)
MSYS_NO_PATHCONV=1
RUNFILES_MANIFEST_ONLY=1
EXT_BUILD_ROOT=C:\users\runneradmin\_bazel_runneradmin\7nprpp6p\execroot\com_google_zetasql
EXEPATH=C:\Program Files\Git\bin
INSTALLDIR=C:\users\runneradmin\_bazel_runneradmin\7nprpp6p\execroot\com_google_zetasql/bazel-out/host/bin/bazel/m4
Target //zetasql/local_service:local_service failed to build
Use --verbose_failures to see the command lines of failed build steps.
SYSTEMDRIVE=C:
ERROR: D:/a/zetasql/zetasql/zetasql/local_service/BUILD:23:11 error executing shell command: 'C:/Program Files/Git/bin/bash.exe -c function cleanup_function() {
SYSTEMROOT=C:\Windows
local ecode=$?
***
if [ $ecode -eq 0 ]; then
HOME=/c/Users/runneradmin
cleanup_on_success
TMP=C:\Users\RUNNER~1\AppData\Local\Temp
else
BUILD_TMPDIR=/tmp/tmp.krC2lfcMVK
cleanup_on_failure
LIB=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64
fi
EXT_BUILD_DEPS=/tmp/tmp.XK0ib5gkIM
}
TERM=xterm-256color
set -e
SHLVL=2
function cleanup_on_success() {
PLINK_PROTOCOL=ssh
pr...' failed (Exit 1): bash.exe failed: error executing command C:/Program Files/Git/bin/bash.exe -c ... (remaining 1 argument(s) skipped)
BUILD_LOG=bazel-out/host/bin/bazel/m4/logs/Configure.log
INFO: Elapsed time: 180.455s, Critical Path: 3.11s
BUILD_SCRIPT=bazel-out/host/bin/bazel/m4/logs/Configure_script.sh
INFO: 24 processes: 22 internal, 2 local.
TEMP=C:\Users\RUNNER~1\AppData\Local\Temp
FAILED: Build did NOT complete successfully
MSYS2_ARG_CONV_EXCL=*
FAILED: Build did NOT complete successfully
MSYSTEM=MINGW64
PATH=C:\users\runneradmin\_bazel_runneradmin\7nprpp6p\execroot\com_google_zetasql:/mingw64/bin:/usr/bin:/c/bin:/bin:/usr/bin:/c/Windows:/c/Windows/System32:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Users/runneradmin/AppData/Local/bazelisk/downloads/bazelbuild/bazel-3.7.2-windows-x86_64/bin:/c/Program Files/PowerShell/7:/c/Users/runneradmin/.dotnet/tools:/c/Program Files/MongoDB/Server/5.0/bin:/c/aliyun-cli:/c/vcpkg:/c/cf-cli:/c/Program Files (x86)/NSIS:/c/tools/zstd:/c/Program Files/Mercurial:/c/hostedtoolcache/windows/stack/2.7.3/x64:/c/tools/ghc-9.0.1/bin:/c/Program Files/dotnet:/c/mysql/bin:/c/Program Files/R/R-4.1.1/bin/x64:/c/SeleniumWebDrivers/GeckoDriver:/c/Program Files (x86)/sbt/bin:/c/Rust/.cargo/bin:/c/Program Files (x86)/GitHub CLI:/bin:/c/Program Files (x86)/pipx_bin:/c/hostedtoolcache/windows/go/1.15.15/x64/bin:/c/hostedtoolcache/windows/Python/3.7.9/x64/Scripts:/c/hostedtoolcache/windows/Python/3.7.9/x64:/c/hostedtoolcache/windows/Ruby/2.5.9/x64/bin:/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.302-8/x64/bin:/c/npm/prefix:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/ProgramData/kind:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/Chocolatey/bin:/c/Program Files/Docker:/c/Program Files/PowerShell/7:/c/Program Files/Microsoft/Web Platform Installer:/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)/Windows Kits/10/Windows Performance Toolkit:/c/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/150/DTS/Binn:/c/Program Files/nodejs:/c/Program Files/OpenSSL/bin:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/chocolatey/lib/pulumi/tools/Pulumi/bin:/c/Program Files/TortoiseSVN/bin:/c/Program Files/OpenJDK/jdk-17/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.8.2/bin:/c/Program Files/Microsoft Service Fabric/bin/Fabric/Fabric.Code:/c/Program Files/Microsoft SDKs/Service Fabric/Tools/ServiceFabricLocalClusterManager:/cmd:/mingw64/bin:/usr/bin:/c/Program Files/GVFS:/c/tools/php:/c/Program Files (x86)/sbt/bin:/c/SeleniumWebDrivers/ChromeDriver:/c/SeleniumWebDrivers/EdgeDriver:/c/Program Files/Amazon/AWSCLIV2:/c/Program Files/Amazon/SessionManagerPlugin/bin:/c/Program Files/Amazon/AWSSAMCLI/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files (x86)/Microsoft BizTalk Server:/c/Users/runneradmin/AppData/Local/Microsoft/WindowsApps:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE//Extensions/Microsoft/IntelliCode/CLI:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/VCPackages:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/bin/Roslyn:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools:/c/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019//x64:/c/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/:/c/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/:/c/Program Files (x86)/HTML Help Workshop:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/devinit:/c/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64:/c/Program Files (x86)/Windows Kits/10/bin/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise//MSBuild/Current/Bin:/c/Windows/Microsoft.NET/Framework64/v4.0.30319:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/::/c/Windows/system32:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/Linux/bin/ConnectionManagerExe
_=/usr/bin/env
WINDIR=C:\Windows
__________________________PKG_CONFIG_PATH=
configure: WARNING: unrecognized options: --disable-nls
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: unsafe srcdir value: 'C:\users\runneradmin\_bazel_runneradmin\7nprpp6p\execroot\com_google_zetasql/external/m4'
_____ END BUILD LOGS _____
rules_foreign_cc: Build script location: bazel-out/host/bin/bazel/m4/logs/Configure_script.sh
rules_foreign_cc: Build log location: bazel-out/host/bin/bazel/m4/logs/Configure.log
```
There are many recommendations for bazel on Windows: https://docs.bazel.build/versions/1.0.0/install-windows.html. Do you have any additional recommendations, what compiler to use or what shell to use (cmd, pwsh, bash)?
Contributor guide
Assessment
This issue has not been assessed yet.