-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Missing link /lib64/ld-linux-x86-64.so.2 -> /usr/glibc-compat/lib/ld-linux-x86-64.so.2 #183
Comments
@wilx: Would you please provide a minimal example |
I see the same thing. Alpine 3.17, adoptium openjdk jre 11.0.18 for x86_64, plus your alpine glibc 2.35-r1 (or r0). The JVM won't start - two undefined symbols in libjli.so. Re-pointing /lib64/ld-linux-x86-64.so.2 to /usr/glibc-compat/lib/ld-linux-x86-64.so.2 fixes the problem, but I don't know what the side effects might be. "Minimal" dockerfile attached - "dockerfile.txt" to get it to be acceptable to the file uploader.
|
f6114f8e863c:/jdk/bin# java -h I also encountered the same problem, can you share the solution? |
If you're asking me, then it is as I said....
|
FROM alpine:3.18.3
MAINTAINER lmzml
ENV VERSION_GLIBC="2.35-r1"
ENV VERSION_ALIYUN="3.18"
ENV URL_ALIYUN="http://mirrors.aliyun.com/alpine/v${VERSION_ALIYUN}"
ENV URL_GLIBC="https://github.com/sgerrand/alpine-pkg-glibc/releases/download"
ENV URL_PUB="https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub"
RUN echo "${URL_ALIYUN}/main" > /etc/apk/repositories
RUN echo "${URL_ALIYUN}/community" >> /etc/apk/repositories
RUN apk update
RUN apk add --no-cache curl ca-certificates
RUN curl -Lo /etc/apk/keys/sgerrand.rsa.pub "${URL_PUB}"
RUN curl -Lo glibc.apk "${URL_GLIBC}/${VERSION_GLIBC}/glibc-${VERSION_GLIBC}.apk"
RUN curl -Lo glibc-bin.apk "${URL_GLIBC}/${VERSION_GLIBC}/glibc-bin-${VERSION_GLIBC}.apk"
RUN curl -Lo glibc-i18n.apk "${URL_GLIBC}/${VERSION_GLIBC}/glibc-i18n-${VERSION_GLIBC}.apk"
RUN apk add --no-cache --force-overwrite glibc.apk glibc-bin.apk glibc-i18n.apk
RUN /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
ADD java.tar.gz /usr/java/
COPY ./fonts/* /usr/java/lib/fonts/
RUN apk --no-cache add tzdata
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo "Asia/Shanghai" > /etc/timezone
COPY ./locale.md /locale.md
RUN cat locale.md | xargs -i /usr/glibc-compat/bin/localedef -i {} -f UTF-8 {}.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
ENV JAVA_HOME=/usr/java
ENV PATH=${PATH}:${JAVA_HOME}/bin
RUN apk del curl
RUN rm -rf glibc.apk glibc-bin.apk glibc-i18n.apk locale.md /var/cache/apk/*
WORKDIR /opt |
I just got back to looking at this for my own use-case. I tried adding this to the APKBUILD file:
Alas,
I don't see any way around this. "options: !fhs" does not help. I therefore have to do it in my image that uses the resulting apk files. |
The package is providing link to
/usr/glibc-compat/lib/ld-linux-x86-64.so.2
in/lib
but does not provide one in/lib64
. This makes current Adoptium Temurin Java to fail to link at start because the/lib64/ld-linux-x86-64.so.2
points at MUSL's/lib/libc.musl-x86_64.so.1
instead.The failure:
The Java JRE binary wants linker from
/lib64/ld-linux-x86-64.so.2
:The text was updated successfully, but these errors were encountered: