Skip to content

Windows Artifact build failed for Python 2.7 after upgrade to Protobuf 3.12.0 #23011

@stanley-cheung

Description

@stanley-cheung

This stems from PR #22998

Problem

In that PR, we are trying to update third_party/protobuf to version v3.12.0. We ran into a Python test failure involving Python 2.7 Windows Artifact build.

Here's the error:

third_party\protobuf\src/google/protobuf/port_def.inc:457:54: error: expected primary-expression before ')' token
   PROTOBUF_EXPORT_TEMPLATE_##which##_##style(export, )
...
FAILED: build_artifact.python_windows_x64_Python27

Full Log: https://source.cloud.google.com/results/invocations/b95cf1f2-191b-4fdb-8554-413524992d91/targets/grpc%2Fcore%2Fpull_request%2Fwindows%2Fgrpc_build_artifacts/log

Investigation

Seems to be caused by this PR: protocolbuffers/protobuf#7344, and originally protocolbuffers/protobuf#6535

Same error encountered by other protobuf users in: protocolbuffers/protobuf#6659

Note: only Python 2.7 failed. Python 3.5 - 3.8 tests passed. We discovered the discrepancy is because we use mingw32 to compile for Python 2.7, but msvc for Python 3: https://github.com/grpc/grpc/blob/master/tools/run_tests/artifacts/artifact_targets.py#L168.

Alternative tried

We temporarily try to use msvc to compile for Python 2.7 but run into a different set of errors:

Error:

.\src/core/lib/iomgr/error.h(24) : fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory

Full Log: https://source.cloud.google.com/results/invocations/e40abd1d-971c-43bc-8eb3-8b958b9a4375/targets/grpc%2Fcore%2Fpull_request%2Fwindows%2Fgrpc_build_artifacts/log

Logging this issue separately to track this investigation.

Next steps

  • Either see if we can get mingw updated
  • Or see if we can switch to using msvc

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions