-
Notifications
You must be signed in to change notification settings - Fork 84
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
error while loading shared libraries: libatomic.so.1 #1312
Comments
Sorry about that. The -lrt -latomic was needed for the CI build to work after updating to the latest Envoy. But these flags were actually not needed to build on my local Debian. I would like to find a way to enable those flags only when building on CI, so we could remove the flags by default, including when building for Docker. There are signs that these libraries are complicated, if you search for "In particular" here: envoyproxy/envoy#1069 |
Meanwhile if it's possible to edit the docker file locally before you run it, you might be able to fix it with: apk add libatomic |
@eric846 there's no image base on tag, we can send a workaround fix with |
I see what you mean about the tags on docker hub. The most recent tag is 3 years old. Unfortunately I tried the
Please let me know if you find a workaround with the image. We will keep trying to find a solution. |
@eric846 I'm not familiar with the bazel build, but would static link be an option to solve this? |
That is a great idea, and it appears to work. Created #1314 |
I can workaround with following dockerfile: FROM envoyproxy/nighthawk-dev:latest AS source
FROM ubuntu:22.04@sha256:0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994d631587203f97
RUN apt-get update && apt-get install \
autoconf \
automake \
cmake \
curl \
libtool \
make \
ninja-build \
patch \
python3-pip \
unzip \
virtualenv -y
COPY --from=source /usr/local/bin/nighthawk_client /usr/local/bin/nighthawk_client
COPY --from=source /usr/local/bin/nighthawk_test_server /usr/local/bin/nighthawk_test_server
COPY --from=source /usr/local/bin/nighthawk_output_transform /usr/local/bin/nighthawk_output_transform
COPY --from=source /usr/local/bin/nighthawk_service /usr/local/bin/nighthawk_service
COPY --from=source /usr/local/bin/nighthawk_adaptive_load_client /usr/local/bin/nighthawk_adaptive_load_client
COPY --from=source /etc/envoy/envoy.yaml /etc/envoy/envoy.yaml
# Ports for nighthawk_test_server, see default-config.yaml
EXPOSE 10001
EXPOSE 10080
# The default port for nighthawk_service
EXPOSE 8443
CMD ["-c", "/etc/envoy/envoy.yaml"]
|
### Problem We had to add `-lrt -latomic` when #1309 updated to the latest Envoy. #1312 found that the Docker image no longer works because `libatomic.so.1` is not found. ### Solution The minimal solution to add `apk install libatomic` was not sufficient to fix the issue because of unknown Alpine issues. Migrating from Alpine to Ubuntu 22.04 and including `RUN apt-get update && apt-get install libatomic1` appears to work. (Ubuntu SHA is copied from Envoy: https://github.com/envoyproxy/envoy/blob/f2023ef77bdb4abaf9feef963c9a0c291f55568f/ci/Dockerfile-envoy) Just changing the `FROM` to Ubuntu 22.04, before adding `apt-get install libatomic1`, we start off with a similar error: ``` ci/do_ci.sh docker docker run envoyproxy/nighthawk-dev:latest nighthawk_client nighthawk_client: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory ``` After adding `apt-get install libatomic1`, the `nighthawk_client` executable can start: ``` ci/do_ci.sh docker docker run envoyproxy/nighthawk-dev:latest nighthawk_client Bad argument: A URI or --multi-target-* options must be specified. ``` It is a low risk to publish a new Docker image based on the minimal confirmation above. The image can't be worse than the current image on Docker Hub that doesn't work. Signed-off-by: eric846 <[email protected]>
The new image is live. Let us know if it works!
|
It looks like this issue was introduced in #1309. @eric846
The text was updated successfully, but these errors were encountered: