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

arm support? #54

Closed
yangxuan8282 opened this issue Jun 7, 2017 · 7 comments
Closed

arm support? #54

yangxuan8282 opened this issue Jun 7, 2017 · 7 comments

Comments

@yangxuan8282
Copy link

yangxuan8282 commented Jun 7, 2017

I'm trying to compile glibc for raspberry pi

and here is my commit:

yangxuan8282/docker-glibc-builder@b2e59b5

yangxuan8282/docker-alpine-abuild@c6b9cb3

yangxuan8282@d65d1ff

one change of APKBUILD is add:

ls -s /usr/glibc-compat/lib/ld-linux-armhf.so.3 ${pkgdir}/lib/ld-linux-armhf.so.3

but it will complaint:

ls: cannot access '/usr/glibc-compat/lib/ld-linux-armhf.so.3': No such file or directory
ls: cannot access '/home/builder/package/pkg/glibc/lib/ld-linux-armhf.so.3': No such file or directory

I'm not sure why this happen, because it look pretty same as original:

ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/lib/ld-linux-x86-64.so.2
ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/lib64/ld-linux-x86-64.so.2

when I extract glibc-bin-2.25.tar.gz, found the file did exist:

ls ./usr/glibc-compat/lib/ld-linux-armhf.so.3 
./usr/glibc-compat/lib/ld-linux-armhf.so.3
@yangxuan8282
Copy link
Author

I have updated my glibc apk build for armhf to latest 2.27-r0: https://github.com/yangxuan8282/alpine-pkg-glibc/releases .
It should works. If not, you can try this old one: https://github.com/armhf-docker-library/alpine-pkg-glibc/releases .

@marianopeck
Copy link

Hi,

I am trying to get it work on Raspberry Pi, using latest 2.29 I am also finding an issue: #113

Do you know if it is the same issue? Were your changes integrated in this upstream project or only in your fork? As far as I can see your latest release is for 2.27. Any idea how to try your fork for me issue?

Thanks in advance,

@Josua-SR
Copy link

Hi everyone,

I think this issue may be worth reopening.
I found that compiling glibc was no big deal, executing the docker-glibc-builder natively on an arm board was enough to produce working binaries, and the changes to the apkbuild aren't difficult either.

@sgerrand it would be really cool imo if you could be publishing binary releases for aarch32 and aarch64.
The place that I found your binaries used, and that could benefit from arm binaries, is the https://github.com/AdoptOpenJDK/openjdk-docker/ alpine containers. I was able to build and run their openjdk12/jdk-alpine with the glibc apk I built using this earlier built glibc package!

If there is something we can do to make that happen, please let us know.

@marianopeck
Copy link

+1 I would love aarch32 and aarch64 releases. In fact, I am ONLY using Alpine on Raspberry...

@marianopeck
Copy link

marianopeck commented Jul 25, 2019

Hi @yangxuan8282
I am giving a try to version 2.27 but I cannot add the correct pub key. I tried many different URLs:

RUN apk --no-cache add ca-certificates wget \
	&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.27-r0/sgerrand.rsa.pub \
	&& wget https://github.com/yangxuan8282/alpine-pkg-glibc/releases/download/2.27-r0/glibc-2.27-r0.apk \
	&& wget https://github.com/yangxuan8282/alpine-pkg-glibc/releases/download/2.27-r0/glibc-bin-2.27-r0.apk \
	&& wget https://github.com/yangxuan8282/alpine-pkg-glibc/releases/download/2.27-r0/glibc-i18n-2.27-r0.apk \
	&& apk add glibc-bin-2.27-r0.apk glibc-i18n-2.27-r0.apk glibc-2.27-r0.apk

I also tried
https://github.com/yangxuan8282/alpine-pkg-glibc/blob/master/sgerrand.rsa.pub
https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub
https://github.com/yangxuan8282/alpine-pkg-glibc/blob/2.27-r0/sgerrand.rsa.pub
https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub

But I always get:

"ERROR: glibc-bin-2.27-r0.apk: UNTRUSTED signature"

Do you know what is the correct link to pub file?

@gokalper
Copy link

gokalper commented Oct 5, 2019

I compiled an arm32v7 glibc 2.30 by changing the dockerfile for https://github.com/sgerrand/docker-glibc-builder and running the build on a raspberry pi:

FROM arm32v7/ubuntu:19.04
MAINTAINER Sasha Gerrand <[email protected]>
ENV PREFIX_DIR /usr/glibc-compat
ENV GLIBC_VERSION 2.30
RUN apt-get -q update \
	&& apt-get -qy install \
		bison \
		build-essential \
		gawk \
		gettext \
		openssl \
		python3 \
		texinfo \
		wget
COPY configparams /glibc-build/configparams
COPY builder /builder
ENTRYPOINT ["/builder"]

Then running this docker run --rm --env STDOUT=1 imagename/forabovedockerfile:tag 2.30 /usr/glibc-compat > glibc-bin.tar.gz to generate the required files and copying them into a new image to build the APK with:

FROM arm32v7/alpine:3.10

RUN apk add alpine-sdk && \
    git config --global user.name "Gokalp Ercilasun" && \
    git config --global user.email "[email protected]" && \
    git clone git://git.alpinelinux.org/aports && \
    sed -i "s/#PACKAGER=\"Your Name <[email protected]>\"/PACKAGER=\"Gokalp LASTNAME <[email protected]>\"/g" /etc/abuild.conf && \
    adduser --disabled-password --shell /bin/sh --gecos "User" appuser && \
    echo appuser:appuser | chpasswd && \
    sudo echo "appuser ALL=(ALL) ALL" >> /etc/sudoers && \
    sudo addgroup appuser abuild && \
    sudo mkdir -p /var/cache/distfiles && \
    sudo chmod a+w /var/cache/distfiles && \
    sudo chgrp abuild /var/cache/distfiles && \
    sudo chmod g+w /var/cache/distfiles
#    abuild-keygen -a -i -n

USER appuser

COPY glibc-bin.tar.gz /home/appuser/glibc-bin.tar.gz
COPY ld.so.conf /home/appuser/ld.so.conf 
COPY nsswitch.conf /home/appuser/nsswitch.conf
COPY APKBUILD /home/appuser/APKBUILD
COPY glibc-bin.trigger /home/appuser/glibc-bin.trigger

RUN abuild-keygen -a -i -n && \
    abuild checksum && \
    abuild -r

# COPY FILES OUT MANUALLY ALSO COPY PUBLIC KEY

ENTRYPOINT ["/bin/sh"] 

I hosted my compiled APK for alpine here: https://github.com/gokalper/glibc-alpine-arm32v7/tree/master/armv7

@halower
Copy link

halower commented Jun 18, 2021

aarch64:

 apk add glibc-bin-2.27-r0.apk glibc-i18n-2.27-r0.apk glibc-2.27-r0.apk 
returned a non-zero code: 99

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

5 participants