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

Released protoc 3.7.0 require libatomic1 (not statically linked?) #5875

Closed
anuraaga opened this issue Mar 12, 2019 · 4 comments
Closed

Released protoc 3.7.0 require libatomic1 (not statically linked?) #5875

anuraaga opened this issue Mar 12, 2019 · 4 comments

Comments

@anuraaga
Copy link
Contributor

anuraaga commented Mar 12, 2019

What version of protobuf and what language are you using?
Version: v3.7.0
Language: n/a

What operating system (Linux, Windows, ...) and version?

Linux
Docker image debian:stretch-slim

What runtime / compiler are you using (e.g., python version or gcc version)

None

What did you do?
Steps to reproduce the behavior:

  1. docker run -it --rm debian:stretch-slim
  2. apt update && apt -y install wget unzip
  3. wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.0/protoc-3.7.0-linux-x86_64.zip
  4. unzip protoc-3.7.0-linux-x86_64.zip
  5. ./bin/protoc

What did you expect to see

protoc runs and prints some help text

What did you see instead?

loader error

root@6a6b297121e5:/# ./bin/protoc
./bin/protoc: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

It runs if I install libatomic

apt -y install libatomic1

Is this an intended change? I guess it's supposed to be statically linked into the prebuilt binaries. v3.7.0 is the first version I see this issue with.

@augi
Copy link

augi commented Mar 12, 2019

Just encountered the same issue when using protoc in centos:7 Docker image.

@acozzette
Copy link
Member

Thanks for reporting this, I think the change with respect to libatomic was introduced in #5615. Let me see if there is some way we can build without this runtime dependency on libatomic.

@acozzette acozzette self-assigned this Mar 12, 2019
@TeBoring TeBoring added this to the v3.7.0 milestone Mar 12, 2019
@markkolich
Copy link

markkolich commented Mar 15, 2019

+1 here from protoc on a centos:7 Docker container.

In case anyone else hits this on Cent, a quick yum install libatomic in your Dockerfile does the trick:

[root@2bbd286d331a ~]# yum install -y -q libatomic && protoc --version
libprotoc 3.7.0

acozzette added a commit that referenced this issue Mar 20, 2019
We ran into problems with precompiled protoc binaries not working on
some systems because of the dependence on a dynamically linked
libatomic. However, I found that linking against libatomic is not
actually necessary in our protoc build environment. Inside configure.ac
there's a test which figures out if we need to pass -latomic, and it
does this by attempting to build a test binary. That binary was failing
to build, but it turns out this was because we need to pass -std=c++11,
not -latomic.

This fixes #5875.
@elvizlai
Copy link

elvizlai commented Mar 22, 2019

same issue for alpine and using apk add libatomic not solved.

/go # find / -name "libatomic*"
/usr/lib/libatomic.so.1
/usr/lib/libatomic.so.1.2.0

TeBoring pushed a commit that referenced this issue Mar 25, 2019
We ran into problems with precompiled protoc binaries not working on
some systems because of the dependence on a dynamically linked
libatomic. However, I found that linking against libatomic is not
actually necessary in our protoc build environment. Inside configure.ac
there's a test which figures out if we need to pass -latomic, and it
does this by attempting to build a test binary. That binary was failing
to build, but it turns out this was because we need to pass -std=c++11,
not -latomic.

This fixes #5875.
rmb938 added a commit to rmb938/open-match that referenced this issue Mar 31, 2019
jeremyje pushed a commit to googleforgames/open-match that referenced this issue Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants