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

protoc-gen-swift and protoc-gen-grpc-swift doesn't run on Alpine image based container #77

Closed
e-sung opened this issue May 2, 2021 · 3 comments

Comments

@e-sung
Copy link
Contributor

e-sung commented May 2, 2021

Summary

protoc-gen-swift and protoc-gen-grpc-swift doesn't run on Alpine Image based container.
It only runs properly on Ubuntu Image based container

Steps to Reproduce

  1. docker run --rm -it --name protoc --entrypoint /bin/sh thethingsindustries/protoc:development
  2. protoc-gen-swift --version

What do you see now?

./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libswiftCore.so)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libswiftCore.so)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libswiftCore.so)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libswiftCore.so)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libswiftCore.so)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libswiftCore.so)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libswiftCore.so)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libicuucswift.so.65)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libicuucswift.so.65)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libicuucswift.so.65)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libicui18nswift.so.65)
./protoc-gen-grpc-swift: /usr/lib/libstdc++.so.6: no version information available (required by /protoc-gen-swift/libicui18nswift.so.65)
./protoc-gen-grpc-swift: Relink `/usr/lib/libstdc++.so.6' with `/protoc-gen-swift/libm.so.6' for IFUNC symbol `floor'
Segmentation fault (core dumped)

What do you want to see instead?

protoc-gen-swift 1.9.0

Environment

The Things Network Command-line Interface: ttn-lw-cli
Version:             3.12.2
Build date:          2021-04-30T08:48:12Z
Git commit:          3403b3955
Go version:          go1.16.3
OS/Arch:             darwin/amd64

How do you propose to implement this?

The protoc-gen-swift and protoc-gen-grpc-swift works fine on "Ubuntu Image based Container".
It only doesn't work when it is run on alpine image based container. I'm currently not sure what's the fundemental difference between the two containers, but I think that finding that difference should be the key to resolve the issue.

This behavior was introduced by #76 . If you revert the PR, protoc-gen-swift and protoc-gen-grpc-swift would at least work.

@e-sung
Copy link
Contributor Author

e-sung commented May 2, 2021

I assume https://github.com/TheThingsIndustries/docker-protobuf/blob/12da98bd97879d76f2b0f733627e7c5fc2ac7f17/Dockerfile#L195 were supposed to make protoc-gen-swift plugins to run on Alpine based container. I guess something should be done here.

@rvolosatovs
Copy link
Owner

Previous issue regarding this: #57

@rvolosatovs
Copy link
Owner

I have added a test:

docker-protobuf/Dockerfile

Lines 409 to 410 in f38a9f5

--grpc-swift_out=/test \
--swift_out=/test \

Both plugins execute successfully on amd64.
Closing this for now, please reopen if you still experience issues (you can test 4.0.0-rc2 release)

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