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

ObjectiveC build fails when using dynamic framework and oneof #1789

Closed
sercand opened this issue Jul 15, 2016 · 0 comments
Closed

ObjectiveC build fails when using dynamic framework and oneof #1789

sercand opened this issue Jul 15, 2016 · 0 comments
Assignees

Comments

@sercand
Copy link

sercand commented Jul 15, 2016

I have modified the HelloRequest at grpc helloworld.proto by adding oneof fileds.

message HelloRequest {
    string name = 1;    
    oneof data{
        string text = 2;
        int32 integer = 3;
        bool boolean = 4;
    }
}

As a result, building fails with following error

Undefined symbols for architecture x86_64:
  "_OBJC_IVAR_$_GPBDescriptor.oneofs_", referenced from:
      _HLWHelloRequest_ClearDataOneOfCase in Hello.pbobjc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My guess is this line is only accessible within framework (because @package directive), so when using dynamic framework it fails.

@thomasvl thomasvl self-assigned this Jul 15, 2016
thomasvl added a commit to thomasvl/protobuf that referenced this issue Jul 18, 2016
When building into frameworks, the generated code doesn't always have direct
access to the proto internals.  Instead of opening up the access, just use the
public method to fetch the correct oneof.

Fixes protocolbuffers#1789
jcanizales pushed a commit to jcanizales/protobuf that referenced this issue Jul 19, 2016
When building into frameworks, the generated code doesn't always have direct
access to the proto internals.  Instead of opening up the access, just use the
public method to fetch the correct oneof.

Fixes protocolbuffers#1789
adellahlou pushed a commit to adellahlou/protobuf that referenced this issue Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants