Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeException building protoc on Windows with mingw #6169

Closed
jayconrod opened this issue Sep 17, 2018 · 0 comments
Closed

RuntimeException building protoc on Windows with mingw #6169

jayconrod opened this issue Sep 17, 2018 · 0 comments
Labels
area-Windows Windows-specific issues and feature requests team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged

Comments

@jayconrod
Copy link
Contributor

Description of the problem / feature request:

Bazel crashes with the output below when building protoc on Windows with mingw.

$ bazel build --cpu=x64_windows --compiler=mingw-gcc @com_google_protobuf//:protobuf
Starting local Bazel server and connecting to it...
Unhandled exception thrown during build; message: Unrecoverable error while evaluating node '@com_google_protobuf//:protobuf BuildConfigurationValue.Key[b51eb5d60e4ad9bce200cdbb06583f55] false' (requested by nodes )
INFO: Elapsed time: 2.695s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (7 packages loaded)
java.lang.RuntimeException: Unrecoverable error while evaluating node '@com_google_protobuf//:protobuf BuildConfigurationValue.Key[b51eb5d60e4ad9bce200cdbb06583f55] false' (requested by nodes )
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:497)
        at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:368)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException
        at com.google.common.base.Preconditions.checkState(Preconditions.java:491)
        at com.google.devtools.build.lib.rules.cpp.LibrariesToLinkCollector.addDynamicInputLinkOptions(LibrariesToLinkCollector.java:290)
        at com.google.devtools.build.lib.rules.cpp.LibrariesToLinkCollector.addLinkerInputs(LibrariesToLinkCollector.java:258)
        at com.google.devtools.build.lib.rules.cpp.LibrariesToLinkCollector.collectLibrariesToLink(LibrariesToLinkCollector.java:203)
        at com.google.devtools.build.lib.rules.cpp.CppLinkActionBuilder.build(CppLinkActionBuilder.java:916)
        at com.google.devtools.build.lib.rules.cpp.CcLinkingHelper.createDynamicLibrary(CcLinkingHelper.java:923)
        at com.google.devtools.build.lib.rules.cpp.CcLinkingHelper.createCcLinkActions(CcLinkingHelper.java:713)
        at com.google.devtools.build.lib.rules.cpp.CcLinkingHelper.link(CcLinkingHelper.java:462)
        at com.google.devtools.build.lib.rules.cpp.CcLibrary.init(CcLibrary.java:286)
        at com.google.devtools.build.lib.rules.cpp.CcLibrary.create(CcLibrary.java:74)
        at com.google.devtools.build.lib.rules.cpp.CcLibrary.create(CcLibrary.java:55)
        at com.google.devtools.build.lib.analysis.ConfiguredTargetFactory.createRule(ConfiguredTargetFactory.java:320)
        at com.google.devtools.build.lib.analysis.ConfiguredTargetFactory.createConfiguredTarget(ConfiguredTargetFactory.java:205)
        at com.google.devtools.build.lib.skyframe.SkyframeBuildView.createConfiguredTarget(SkyframeBuildView.java:631)
        at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.createConfiguredTarget(ConfiguredTargetFunction.java:770)
        at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.compute(ConfiguredTargetFunction.java:320)
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:420)
        ... 4 more
java.lang.RuntimeException: Unrecoverable error while evaluating node '@com_google_protobuf//:protobuf BuildConfigurationValue.Key[b51eb5d60e4ad9bce200cdbb06583f55] false' (requested by nodes )
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:497)
        at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:368)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException
        at com.google.common.base.Preconditions.checkState(Preconditions.java:491)
        at com.google.devtools.build.lib.rules.cpp.LibrariesToLinkCollector.addDynamicInputLinkOptions(LibrariesToLinkCollector.java:290)
        at com.google.devtools.build.lib.rules.cpp.LibrariesToLinkCollector.addLinkerInputs(LibrariesToLinkCollector.java:258)
        at com.google.devtools.build.lib.rules.cpp.LibrariesToLinkCollector.collectLibrariesToLink(LibrariesToLinkCollector.java:203)
        at com.google.devtools.build.lib.rules.cpp.CppLinkActionBuilder.build(CppLinkActionBuilder.java:916)
        at com.google.devtools.build.lib.rules.cpp.CcLinkingHelper.createDynamicLibrary(CcLinkingHelper.java:923)
        at com.google.devtools.build.lib.rules.cpp.CcLinkingHelper.createCcLinkActions(CcLinkingHelper.java:713)
        at com.google.devtools.build.lib.rules.cpp.CcLinkingHelper.link(CcLinkingHelper.java:462)
        at com.google.devtools.build.lib.rules.cpp.CcLibrary.init(CcLibrary.java:286)
        at com.google.devtools.build.lib.rules.cpp.CcLibrary.create(CcLibrary.java:74)
        at com.google.devtools.build.lib.rules.cpp.CcLibrary.create(CcLibrary.java:55)
        at com.google.devtools.build.lib.analysis.ConfiguredTargetFactory.createRule(ConfiguredTargetFactory.java:320)
        at com.google.devtools.build.lib.analysis.ConfiguredTargetFactory.createConfiguredTarget(ConfiguredTargetFactory.java:205)
        at com.google.devtools.build.lib.skyframe.SkyframeBuildView.createConfiguredTarget(SkyframeBuildView.java:631)
        at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.createConfiguredTarget(ConfiguredTargetFunction.java:770)
        at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.compute(ConfiguredTargetFunction.java:320)
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:420)
FAILED: Build did NOT complete successfully (7 packages loaded)

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Just create a new directory with the WORKSPACE file below, then run the command above.

http_archive(
    name = "com_google_protobuf",
    # v3.6.1, latest as of 2018-08-06
    urls = ["https://codeload.github.com/google/protobuf/zip/48cb18e5c419ddd23d9badcfe4e9df7bde1979b2"],
    strip_prefix = "protobuf-48cb18e5c419ddd23d9badcfe4e9df7bde1979b2",
    type = "zip",
)

What operating system are you running Bazel on?

Windows 10

What's the output of bazel info release?

release 0.17.1

@jin jin added area-Windows Windows-specific issues and feature requests untriaged labels Sep 17, 2018
katre pushed a commit that referenced this issue Oct 16, 2018
The MSYS gcc and MINGW gcc toolchains do support linking against shared library. So the precondition check should be disabled for them.

CcProtoAspect.java should set emitInterfaceSharedObjects to true when the toolchain supports interface shared library.

Fixes #6171
Fixes #6292
Fixes #6169

RELNOTES: None
PiperOrigin-RevId: 216258674
katre pushed a commit that referenced this issue Oct 17, 2018
The MSYS gcc and MINGW gcc toolchains do support linking against shared library. So the precondition check should be disabled for them.

CcProtoAspect.java should set emitInterfaceSharedObjects to true when the toolchain supports interface shared library.

Fixes #6171
Fixes #6292
Fixes #6169

RELNOTES: None
PiperOrigin-RevId: 216258674
aehlig pushed a commit that referenced this issue Oct 23, 2018
The MSYS gcc and MINGW gcc toolchains do support linking against shared library. So the precondition check should be disabled for them.

CcProtoAspect.java should set emitInterfaceSharedObjects to true when the toolchain supports interface shared library.

Fixes #6171
Fixes #6292
Fixes #6169

RELNOTES: None
PiperOrigin-RevId: 216258674
katre pushed a commit that referenced this issue Oct 23, 2018
The MSYS gcc and MINGW gcc toolchains do support linking against shared library. So the precondition check should be disabled for them.

CcProtoAspect.java should set emitInterfaceSharedObjects to true when the toolchain supports interface shared library.

Fixes #6171
Fixes #6292
Fixes #6169

RELNOTES: None
PiperOrigin-RevId: 216258674
katre pushed a commit that referenced this issue Oct 23, 2018
The MSYS gcc and MINGW gcc toolchains do support linking against shared library. So the precondition check should be disabled for them.

CcProtoAspect.java should set emitInterfaceSharedObjects to true when the toolchain supports interface shared library.

Fixes #6171
Fixes #6292
Fixes #6169

RELNOTES: None
PiperOrigin-RevId: 216258674
aehlig pushed a commit that referenced this issue Oct 24, 2018
The MSYS gcc and MINGW gcc toolchains do support linking against shared library. So the precondition check should be disabled for them.

CcProtoAspect.java should set emitInterfaceSharedObjects to true when the toolchain supports interface shared library.

Fixes #6171
Fixes #6292
Fixes #6169

RELNOTES: None
PiperOrigin-RevId: 216258674
katre pushed a commit that referenced this issue Oct 24, 2018
The MSYS gcc and MINGW gcc toolchains do support linking against shared library. So the precondition check should be disabled for them.

CcProtoAspect.java should set emitInterfaceSharedObjects to true when the toolchain supports interface shared library.

Fixes #6171
Fixes #6292
Fixes #6169

RELNOTES: None
PiperOrigin-RevId: 216258674
aehlig pushed a commit that referenced this issue Oct 29, 2018
The MSYS gcc and MINGW gcc toolchains do support linking against shared library. So the precondition check should be disabled for them.

CcProtoAspect.java should set emitInterfaceSharedObjects to true when the toolchain supports interface shared library.

Fixes #6171
Fixes #6292
Fixes #6169

RELNOTES: None
PiperOrigin-RevId: 216258674
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged
Projects
None yet
Development

No branches or pull requests

3 participants