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

support arm #126

Open
lp2jx0309 opened this issue Nov 28, 2019 · 17 comments
Open

support arm #126

lp2jx0309 opened this issue Nov 28, 2019 · 17 comments

Comments

@lp2jx0309
Copy link

hi, @sgerrand ,whether to consider supporting arm?thank you

@Rjerk
Copy link

Rjerk commented Jan 10, 2020

I build for arm64 version for my own usage:

https://github.com/Rjerk/alpine-pkg-glibc/releases/tag/2.30-r0-arm64

@tdesaules
Copy link

Hi !

This is for aarch64 right ? need to try to make a second one for the armhf :/

@kuwork
Copy link

kuwork commented Jul 22, 2020

I build for arm64 version for my own usage:

https://github.com/Rjerk/alpine-pkg-glibc/releases/tag/2.30-r0-arm64

UNTRUSTED signature

how can I fix this problem?

@Rjerk
Copy link

Rjerk commented Jul 22, 2020

UNTRUSTED signature

how can I fix this problem?

apk add --allow-untrusted should work.

--allow-untrusted Install packages with untrusted signature or no signature

@kuwork
Copy link

kuwork commented Jul 22, 2020

I build for arm64 version for my own usage:
https://github.com/Rjerk/alpine-pkg-glibc/releases/tag/2.30-r0-arm64

UNTRUSTED signature

how can I fix this problem?

FROM alpine:3.12

ENV LANG=C.UTF-8

# Here we install GNU libc (aka glibc) and set C.UTF-8 locale as default.

RUN ALPINE_GLIBC_BASE_URL="https://github.com/Rjerk/alpine-pkg-glibc/releases/download" && \
    ALPINE_GLIBC_PACKAGE_VERSION="2.30-r0" && \
    ALPINE_GLIBC_ARCHITECTURES="arm64" && \
    ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
    ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
    ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
    sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
    apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \
    echo \
        "-----BEGIN PUBLIC KEY-----\
        MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\
        y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\
        tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\
        m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\
        KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\
        Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\
        1QIDAQAB\
        -----END PUBLIC KEY-----" | sed 's/   */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \
    wget \
        "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION-$ALPINE_GLIBC_ARCHITECTURES/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION-$ALPINE_GLIBC_ARCHITECTURES/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION-$ALPINE_GLIBC_ARCHITECTURES/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
    apk add --no-cache \
        "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
    \
    rm "/etc/apk/keys/sgerrand.rsa.pub" && \
    /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true && \
    echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \
    \
    apk del glibc-i18n && \
    \
    rm "/root/.wget-hsts" && \
    apk del .build-dependencies && \
    rm \
        "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"

@Rjerk
Copy link

Rjerk commented Jul 22, 2020

    apk add --no-cache \
        "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \

add --allow-untrusted here I guess

@kuwork
Copy link

kuwork commented Jul 22, 2020

    apk add --no-cache \
        "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
        "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \

add --allow-untrusted here I guess

Thanks.

@CelsoSantos
Copy link

CelsoSantos commented Jul 28, 2020

@Rjerk you mean you built your own Docker image? I'm trying to replicate the build of this container on a rpi4 but it's failing with a message like /usr/glibc-compat/sbin/ldconfig: line 4: syntax error: unexpected word *expecting ")") and similar but in relation to /usr/glibc-compat/bin/localedef

How did you manage to build it?

@Rjerk
Copy link

Rjerk commented Jul 28, 2020

@Rjerk you mean you built your own Docker image? I'm trying to replicate the build of this container on a rpi4 but it's failing with a message like /usr/glibc-compat/sbin/ldconfig: line 4: syntax error: unexpected word *expecting ")") and similar but in relation to /usr/glibc-compat/bin/localedef

How did you manage to build it?

It looks like a cross-compiling error.

use file /usr/glibc-compat/bin/localedef to find out the file type. Also check your os arch using uname -a

@CelsoSantos
Copy link

CelsoSantos commented Jul 28, 2020

Humm, I think you are right, but I don't quite get what's wrong... Isn't this image arm64? Maybe I misunderstood something... .It does run on the pi using docker run, so I don't see what's the issue here..

Alpine, btw, seems like it doesn't have file command

@matonb
Copy link

matonb commented Sep 8, 2020

@Rjerk you mean you built your own Docker image? I'm trying to replicate the build of this container on a rpi4 but it's failing with a message like /usr/glibc-compat/sbin/ldconfig: line 4: syntax error: unexpected word *expecting ")") and similar but in relation to /usr/glibc-compat/bin/localedef
How did you manage to build it?

It looks like a cross-compiling error.

use file /usr/glibc-compat/bin/localedef to find out the file type. Also check your os arch using uname -a

@Rjerk you're quite right /usr/glibc-compat/bin/localedef is compiled for the wrong architecture:

file /usr/glibc-compat/bin/localedef

/usr/glibc-compat/bin/localedef: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /usr/glibc-compat/lib/ld-linux-x86-64.so.2, BuildID[sha1]=8c89aeed61904b61d0b0cba7c3b3a4efd990ebb0, for GNU/Linux 3.2.0, stripped

I'd be expecting to see ARM aarch64 not x86-64

 # uname -a
Linux 72511c90c9d4 5.4.51-v8+ #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 aarch64 Linux

Any ideas ?

@CelsoSantos
Copy link

CelsoSantos commented Sep 8, 2020

This one is working for me: https://github.com/CelsoSantos/docker-glibc-builder

I don't think there's anything too special about it, I think there aren't even any changes, but I use it here to produce an arm64 compatible version... The only thing is that I must build it on a RPi4 (in my case) or a compatible ARM machine

@matonb
Copy link

matonb commented Sep 10, 2020

This one is working for me: https://github.com/CelsoSantos/docker-glibc-builder

I don't think there's anything too special about it, I think there aren't even any changes, but I use it here to produce an arm64 compatible version... The only thing is that I must build it on a RPi4 (in my case) or a compatible ARM machine

@CelsoSantos Thanks for the link, I can probably use it but I was looking for an ARM version here as my interest is really in the upstream project https://github.com/AdoptOpenJDK/openjdk-docker

@CelsoSantos
Copy link

I agree it would make sense for this project to have it, IMHO.
Maybe point the openjdk-docker maintainer to that repo or, better yet, fork your own copy and work based off of that :)

ljfranklin added a commit to ljfranklin/alpine-pkg-glibc that referenced this issue Feb 18, 2021
- Needed until upstream adds supports for cross-building
  under different architectures:
  sgerrand#126
ljfranklin added a commit to ljfranklin/alpine-pkg-glibc that referenced this issue Feb 23, 2021
- Needed until upstream adds supports for cross-building
  under different architectures:
  sgerrand#126
@Lauri-Nomme
Copy link

cross building from x86_64 supported in this fork: https://github.com/Lauri-Nomme/alpine-glibc-xb

@chadlwilson
Copy link

Seems there were a few attempts all stuck in PRs on the sister project:

@adamqqqplay
Copy link

adamqqqplay commented Jan 18, 2024

I build for arm64 version for my own usage:

https://github.com/Rjerk/alpine-pkg-glibc/releases/tag/2.30-r0-arm64

@Rjerk Thanks for your contribution, it works for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants