Repository navigation
Closed
Labels
area-WindowsWindows-specific issues and feature requestsplatform: windowsteam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websiteuntriagedHas not yet been seen by appropriate subteam
Description
Description of the problem / feature request:
I built a devbazel on Windows with Bazel 0.17.1rc1, but the resulting binary cannot be executed.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Building at 4d1d0b5
PS C:\Users\jingwen\Code\bazel> bazel build //src:bazel.exe
Starting local Bazel server and connecting to it...
WARNING: C:/users/jingwen/code/bazel/src/main/cpp/BUILD:71:12: in srcs attribute of cc_binary rule //src/main/cpp:client: please do not import '//src/main/native/windows:resources.o' directly. You should either move the file to this package or depend on an appropriate rule there
INFO: Analysed target //src:bazel.exe (219 packages loaded).
INFO: Found 1 target...
INFO: From Linking src/main/tools/linux-sandbox.exe:
LINK : warning LNK4044: unrecognized option '/lm'; ignored
INFO: From Compiling src/main/cpp/util/path_windows.cc:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include\algorithm(1443): warning C4244: '=': conversion from 'wint_t' to 'char', possible loss of data
src/main/cpp/util/path_windows.cc(73): note: see reference to function template instantiation '_OutIt std::transform<std::_String_iterator<std::_String_val<std::_Simple_types<_Ty>>>,std::_String_iterator<std::_String_val<std::_Simple_types<_Ty>>>,wint_t(__cdecl *)(wint_t)>(const _InIt,const _InIt,_OutIt,_Fn)' being compiled
with
[
_OutIt=std::_String_iterator<std::_String_val<std::_Simple_types<char>>>,
_Ty=char,
_InIt=std::_String_iterator<std::_String_val<std::_Simple_types<char>>>,
_Fn=wint_t (__cdecl *)(wint_t)
]
INFO: From Executing genrule @bazel_tools//tools/jdk:platformclasspath [for host]:
warning: [options] bootstrap class path not set in conjunction with -source 8
1 warning
INFO: From Linking src/main/native/windows/windows_jni.dll:
Creating library bazel-out/x64_windows-fastbuild/bin/src/main/native/windows/windows_jni.dll.if.lib and object bazel-out/x64_windows-fastbuild/bin/src/main/native/windows/windows_jni.dll.if.exp
INFO: From Linking third_party/grpc/cpp_plugin.exe [for host]:
LINK : warning LNK4044: unrecognized option '/lm'; ignored
INFO: From Generating Java (Immutable) proto_library //src/main/protobuf:desugar_deps_proto:
[libprotobuf WARNING external/com_google_protobuf/src/google/protobuf/compiler/java/java_file.cc:228] The optimize_for = LITE_RUNTIME option is no longer supported by protobuf Java code generator and may generate broken code. It will be ignored by protoc in the future and protoc will always generate full runtime code for Java. To use Java Lite runtime, users should use the Java Lite plugin instead. See:
https://github.com/google/protobuf/blob/master/java/lite.md
INFO: From Generating Java (Immutable) proto_library //src/tools/android/java/com/google/devtools/build/android/proto:resources_proto:
[libprotobuf WARNING external/com_google_protobuf/src/google/protobuf/compiler/java/java_file.cc:228] The optimize_for = LITE_RUNTIME option is no longer supported by protobuf Java code generator and may generate broken code. It will be ignored by protoc in the future and protoc will always generate full runtime code for Java. To use Java Lite runtime, users should use the Java Lite plugin instead. See:
https://github.com/google/protobuf/blob/master/java/lite.md
[libprotobuf WARNING external/com_google_protobuf/src/google/protobuf/compiler/java/java_file.cc:228] The optimize_for = LITE_RUNTIME option is no longer supported by protobuf Java code generator and may generate broken code. It will be ignored by protoc in the future and protoc will always generate full runtime code for Java. To use Java Lite runtime, users should use the Java Lite plugin instead. See:
https://github.com/google/protobuf/blob/master/java/lite.md
[libprotobuf WARNING external/com_google_protobuf/src/google/protobuf/compiler/java/java_file.cc:228] The optimize_for = LITE_RUNTIME option is no longer supported by protobuf Java code generator and may generate broken code. It will be ignored by protoc in the future and protoc will always generate full runtime code for Java. To use Java Lite runtime, users should use the Java Lite plugin instead. See:
https://github.com/google/protobuf/blob/master/java/lite.md
INFO: From SkylarkAction external/googleapis/google_bytestream_bytestream_java_grpc_srcs.jar:
google/bytestream/bytestream.proto: warning: Import google/protobuf/wrappers.proto but not used.
INFO: From Generating Java (Immutable) proto_library @googleapis//:google_devtools_build_v1_build_events_proto:
google/devtools/build/v1/build_events.proto: warning: Import google/rpc/status.proto but not used.
INFO: From Generating Java (Immutable) proto_library @googleapis//:google_bytestream_bytestream_proto:
google/bytestream/bytestream.proto: warning: Import google/protobuf/wrappers.proto but not used.
INFO: From Compiling Java headers src/main/java/com/google/devtools/build/lib/libbuild-base-hjar.jar (473 files):
Action failed to execute: java.io.IOException: ERROR: src/main/native/windows/processes-jni.cc(161): CreateProcessWithExplicitHandles("C:\users\jingwen\_bazel_jingwen\wqlyjfgb\execroot\io_bazel\external\embedded_jdk\bin\java.exe" -Xverify:none -XX:+UseParallelOldGC -XX:-CompactStrings --add-exports=jdk.compiler/com.sun.tools.javac.a(...)): command is longer than CreateProcessW's limit (32768 characters)
Target //src:bazel.exe up-to-date:
C:/users/jingwen/_bazel_jingwen/wqlyjfgb/execroot/io_bazel/bazel-out/x64_windows-fastbuild/bin/src/bazel.exe
INFO: Elapsed time: 337.407s, Critical Path: 92.09s
INFO: 1699 processes: 1392 local, 307 worker.
INFO: Build completed successfully, 1825 total actions
PS C:\Users\jingwen\Code\bazel> .\bazel-bin\src\bazel.exe
Extracting Bazel installation...
[libprotobuf FATAL third_party/protobuf/3.6.0/src/google/protobuf/generated_message_reflection.cc:2372] CHECK failed: file != NULL:
What operating system are you running Bazel on?
Windows 10.
What's the output of bazel info release?
PS C:\Users\jingwen\Code\bazel> bazel info release
release 0.17.1rc1
What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
https://github.com/bazelbuild/bazel
4d1d0b5
4d1d0b5
Metadata
Metadata
Assignees
Labels
area-WindowsWindows-specific issues and feature requestsplatform: windowsteam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websiteuntriagedHas not yet been seen by appropriate subteam
Activity
jin commentedon Aug 31, 2018
@laszlocsomor @meteorcloudy did I miss a setup step somewhere?
jin commentedon Aug 31, 2018
Ah.. maybe this line has something to do with it?
cushon commentedon Sep 1, 2018
I think this is the same issue as #4096.
It looks like the build recovered from that and still succeeded, which is consistent with the other bug:
The principled solution to this was blocked on deferred param files, which are now available, so we can make sure header compilation actions are always using params files for command lines that exceed platform-specific limits.
meteorcloudy commentedon Sep 3, 2018
@jin I think this is a protobuf bug with Visual Studio 2017
See protocolbuffers/protobuf#4773
meteorcloudy commentedon Sep 3, 2018
We should update protobuf version to 3.6.1 to fix this issue
https://github.com/protocolbuffers/protobuf/releases/tag/v3.6.1
jin commentedon Sep 4, 2018
Thanks for the quick fix! Now I'm running into this issue:
laszlocsomor commentedon Sep 4, 2018
Protobuf is not yet updated in upstream Bazel. Did you patch in #6065 and #6068 ?
The problem you just described was fixed upstream by ea642d6
laszlocsomor commentedon Sep 4, 2018
(FYI, ea642d6 depends on 131e31c.)
jin commentedon Sep 4, 2018
filipesilva commentedon Sep 5, 2018
@laszlocsomor I just tried building master on windows (HEAD at 5939235) and got the same error as @jin:
laszlocsomor commentedon Sep 5, 2018
@filipesilva : You probably need to
bazel clean.bazel-out/x64_windows-fastbuild/genfiles/tools/cpp/runfiles/runfiles.his a stale output from an older build.laszlocsomor commentedon Sep 5, 2018
...but given that sandboxing is not supported on Windows and all actions run non-sandboxed (under the execution root) the compilation action for
@bazel_tools//tools/cpp/runfilesmistakenly picks up this stale header file.laszlocsomor commentedon Sep 5, 2018
FYI, protobuf is updated to 3.6.1 at HEAD.
filipesilva commentedon Sep 5, 2018
Can confirm that I was able to build after
bazel clean👍