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

Cherry-pick of df719723: Simplify template exporting macros #7539

Merged

Conversation

stanley-cheung
Copy link
Contributor

@stanley-cheung stanley-cheung commented May 21, 2020

This is for grpc/grpc#23011 and #6659

Apparently this commit: df71972 has never been merged properly internally, and that got inadvertently merged back here in #7344.

So this PR attempts to re-apply this commit df71972

Apparently the commit ID df71972 == 479ec14, and we are cherry-picking this one particular commit in #6869.

@stanley-cheung
Copy link
Contributor Author

With this fix, it got past my original error, but now I got a new one

In file included from third_party/protobuf/src/google/protobuf/stubs/port.h:43:0,
                 from third_party/protobuf/src/google/protobuf/stubs/common.h:46,
                 from third_party/protobuf/src/google/protobuf/stubs/casts.h:34,
                 from third_party/protobuf/src/google/protobuf/message.h:118,
                 from include/grpcpp/impl/codegen/config_protobuf.h:30,
                 from ./src/compiler/config_protobuf.h:22,
                 from ./src/compiler/config.h:22,
                 from src/compiler/csharp_generator.cc:24:
third_party/protobuf/src/google/protobuf/port_def.inc:436:9: error: '#pragma' is not allowed here
 #pragma GCC diagnostic push
         ^~~
third_party/protobuf/src/google/protobuf/port_def.inc:437:52: error: expected declaration before end of line
 #pragma GCC diagnostic ignored "-Winvalid-offsetof"
                                                    ^
make: *** [Makefile:2949: /var/local/git/grpc/objs/dbg/src/compiler/csharp_generator.o] Error 1

There seems to be still more we need to do in this PR.

@stanley-cheung
Copy link
Contributor Author

stanley-cheung commented May 21, 2020

Here's how to reproduce the error above:

The environment is Alpine 3.5 + CONFIG=dbg

git clone https://github.com/stanley-cheung/grpc ./grpc-protobuf-pr-test
cd grpc-protobuf-pr-test/
git checkout proto3-presence-protoc-plugin
git submodule update --init --recursive
docker build -t grpc-alpine -f ./tools/dockerfile/test/cxx_alpine_x64/Dockerfile .  

[Edit:] Updating my base image from Alpine 3.5 to 3.9 seem to have fixed my problem. So this PR is good enough as is to fix my original problem.

@haberman haberman merged commit 29de97c into protocolbuffers:3.12.x May 21, 2020
@egorpugin
Copy link
Contributor

egorpugin commented May 28, 2020

I see errors after this change (3.12.1->3.12.2).
I use custom build system, maybe I need to adjust something, but build spec was not changed for many versions already.

When executing: [org.sw.demo.google.protobuf.protoc_lib-3.12.2]/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
D:\dev\swst\pkg\20\2f\b237\src\sdir\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
D:\dev\swst\pkg\20\2f\b237\src\sdir\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants