sgerrand / alpine-pkg-glibc

A glibc compatibility layer package for Alpine Linux
2.07k stars 280 forks source link

/usr/lib/libstdc++.so.6: no version information available #80

Closed turnon closed 4 months ago

turnon commented 6 years ago

When working with heroku-cli in alpine container, it outputs

/usr/local/lib/heroku/bin/node: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/heroku/bin/node)

though it works well. Just want to know why ...

Dockerfile as below:

https://github.com/turnon/heroku/blob/master/Dockerfile

dennlinger commented 6 years ago

Your URL is corret, but the associated hyperlink is broken. The reason why it is failing seems to be the missing option ldconfig -p, which usually returns the required version information, and will successively lead to the displayed error message.

I am currently running into a similar issue, and unsuccessfully tried to resolve it so far.

RomainMuller commented 5 years ago

I found that installing libstdc++6 (instead of libstdc++) fixed the warnings in my case.

schumi2004 commented 5 years ago

@RomainMuller how did you managed to install libstdc++6? I'm having a similiar issue on my Synology NAS but can't seem to install libstdc++6.

travisfranck commented 5 years ago

Also same node issue on Synology NAS (intel processor, I think).

jeichenhofer commented 5 years ago

I am also running into this issue after crafting a script to install hugo on an alpine docker instance. Here is the script:

#!/bin/sh

HUGO_VERSION="0.57.0"
GLIBC_VERSION="2.30-r0"

apk --no-cache add make
apk --no-cache add zip
export HUGO_BINARY="hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz"
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/glibc-$GLIBC_VERSION.apk"
apk --no-cache add "glibc-$GLIBC_VERSION.apk"
rm "glibc-$GLIBC_VERSION.apk"
wget "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/glibc-bin-$GLIBC_VERSION.apk"
apk --no-cache add "glibc-bin-$GLIBC_VERSION.apk"
rm "glibc-bin-$GLIBC_VERSION.apk"
wget "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/glibc-i18n-$GLIBC_VERSION.apk"
apk --no-cache add "glibc-i18n-$GLIBC_VERSION.apk"
rm "glibc-i18n-$GLIBC_VERSION.apk"
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY}
tar xzf ${HUGO_BINARY}
rm -r ${HUGO_BINARY}
mv hugo /usr/bin
/usr/bin/hugo version

The relevant warning message:

$ /usr/bin/hugo version
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
Hugo Static Site Generator v0.57.0-9B00E647/extended linux/amd64 BuildDate: 2019-08-14T08:12:12Z

Is there any update on how to remedy this? It seems to be working, but I'd hate for something to break because of a precarious lucky coincidence.

ZZZXXX0110 commented 5 years ago

Getting the same error messages with Mathematica 12.0 running on Alpine-Term on Samsung Galaxy Note 9. Mathematica also seems to be working fine, but getting the error messages when starting up nontheless.

mneundorfer commented 5 years ago

The relevant warning message:

$ /usr/bin/hugo version
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
Hugo Static Site Generator v0.57.0-9B00E647/extended linux/amd64 BuildDate: 2019-08-14T08:12:12Z

Is there any update on how to remedy this? It seems to be working, but I'd hate for something to break because of a precarious lucky coincidence.

@jeichenhofer Did you find an answer on this?

jeichenhofer commented 5 years ago

The relevant warning message:

$ /usr/bin/hugo version
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
/usr/bin/hugo: /usr/lib/libstdc++.so.6: no version information available (required by /usr/bin/hugo)
Hugo Static Site Generator v0.57.0-9B00E647/extended linux/amd64 BuildDate: 2019-08-14T08:12:12Z

Is there any update on how to remedy this? It seems to be working, but I'd hate for something to break because of a precarious lucky coincidence.

@jeichenhofer Did you find an answer on this?

Unfortunately I did not. The warning messages still appear, but nothing has broken yet.

eddiewang commented 4 years ago

running into this as well. a bit scary not knowing if anything will break in production.

webdevotion commented 4 years ago

I believe to have a working solution for the problem:

# Snippet from Dockerfile 
#   based on Alpine 3.11 + Hugo Extended 0.62.2
RUN set -x && \
  apk add --no-cache --update \
    libc6-compat \
    libstdc++
$ docker build --tag webdevotion/hugo-extended-build .
$ docker run --rm -it webdevotion/hugo-extended-build:latest hugo version

Hugo Static Site Generator v0.62.2-83E50184/extended linux/amd64

Pointers were taken from this Medium Post by @flemay and one of the comments.

flemay commented 4 years ago

@webdevotion Hope the solution in the comment works. I ended up just using the standard hugo version, not the extended, as I didn't need SASS/SCSS support and it works fine with Alpine. :) https://github.com/flemay/docker-hugo

shettyrag commented 3 years ago

I am also facing similar issue in alpine container on cpp executable, In my case I am only getting the issue when its using stdc++6.0.28.

ls -lrt /usr/lib/libstdc++.so.6*

-rwxr-xr-x 1 root root 1657328 May 18 2020 /usr/lib/libstdc++.so.6.0.28 lrwxrwxrwx 1 root root 28 Jul 6 05:32 /usr/lib/libstdc++.so.6 -> /usr/lib/libstdc++.so.6.0.28

i dont see the issue when running alpine container with stdlibc++19 which i copied from centos container.

-rwxr-xr-x 1 root root 995840 Jun 26 05:22 /usr/lib/libstdc++.so.6.0.19 lrwxrwxrwx 1 root root 28 Jul 6 05:32 /usr/lib/libstdc++.so.6 -> /usr/lib/libstdc++.so.6.0.19

libstdc++.so.6.0.28 getting installed while running "apk add build-base" which installing libstdc++.

Is there way install libstdc++19 on alpine container?

majstorki88 commented 3 years ago

Hello,

I am starting our custom application in alpine:3 docker image.

Application executable has been build with pkg: pkg ci/out/application.js --targets node12-alpine-x64 --output ci/out/application and added into apline image.

When starting it, I got following warnings on boot:

application: /usr/lib/libstdc++.so.6: no version information available (required by application)
application: /usr/lib/libstdc++.so.6: no version information available (required by application)
application: /usr/lib/libstdc++.so.6: no version information available (required by application)
application: /usr/lib/libstdc++.so.6: no version information available (required by application)
application: /usr/lib/libstdc++.so.6: no version information available (required by application)
information

Application is working, but I cant remove those error messages.

Dockerfile looks like:

FROM alpine:3
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

ENV GLIBC_REPO=https://github.com/sgerrand/alpine-pkg-glibc
ENV GLIBC_VERSION=2.33-r0

RUN set -ex && \
    apk --update add libstdc++ && \
    for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION}; \
        do curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done && \
    apk add --allow-untrusted /tmp/*.apk && \
    rm -v /tmp/*.apk && \
    /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib

COPY --chown=1001:0 ci/out/ /app/
USER 1001
CMD [ "/app/application" ]  

ldd application response:

/lib64/ld-linux-x86-64.so.2 (0x7fde2bb31000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fde2bb31000)
        librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7fde2bb31000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fde2b990000)
        libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fde2bb31000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fde2b976000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fde2bb31000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fde2bb31000)
Error relocating aggregation: gnu_get_libc_version: symbol not found
Error relocating aggregation: __register_atfork: symbol not found
Error relocating aggregation: __strdup: symbol not found
Error relocating aggregation: setcontext: symbol not found
Error relocating aggregation: makecontext: symbol not found
Error relocating aggregation: backtrace: symbol not found
Error relocating aggregation: getcontext: symbol not found

Please note if I switch to debian:stretch everything works fine.

Also, on Debian, ldconfig -p return 81 libs, and on Alpine /usr/glibc-compat/sbin/ldconfig -p returns 46 libs...

Not sure what I need to do to skip those errors on boot...

Thanks in advance.

2424004764 commented 10 months ago

I input playwright install Error reporting: /opt/conda/envs/py38/lib/python3.8/site-packages/playwright/driver/node: /usr/lib/libstdc++.so.6: no version information available (required by /opt/conda/envs/py38/lib/python3.8/site-packages/playwright/driver/node) /opt/conda/envs/py38/lib/python3.8/site-packages/playwright/driver/node: /usr/lib/libstdc++.so.6: no version information available (required by /opt/conda/envs/py38/lib/python3.8/site-packages/playwright/driver/node)

sgerrand commented 4 months ago

I'm so sorry for not responding to this bug report sooner. Without an example Dockerfile it's hard to know what's causing these segmentation faults. If you're still experiencing this problem then would you please reply with an example Dockerfile which reproduces the error.

I suggest that if you have chosen to run non-musl based software inside Alpine Linux because of the size of Alpine's Docker images then you and any other future readers in a situation like this should consider running containers based on Docker images that are based on a GNU C library, rather than trying to run binaries which weren't compiled for musl inside Alpine Linux. As an example, Debian currently provide "slim" Docker images for each of their releases which are ~ 30 MB compressed.