Protobuf: Released protoc 3.7.0 require libatomic1 (not statically linked?)

Created on 12 Mar 2019  路  4Comments  路  Source: protocolbuffers/protobuf

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.

packaging & distribution

Most helpful comment

+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

All 4 comments

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

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.

+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

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

Was this page helpful?
0 / 5 - 0 ratings